From a871bb98217bf94ed39858235d1950cf00fad03a Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Sun, 26 Jan 2025 11:37:08 +0800 Subject: [PATCH 1/3] Add Dockerfile --- Dockerfile | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..003839a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,37 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +# Use an official Node.js runtime as a parent image +FROM node:20-alpine AS builder + +# Set the working directory in the container +WORKDIR /app + +# Copy the package files and install the dependencies +COPY package.json package-lock.json ./ +RUN npm install + +# Copy the rest of the application code +COPY . . + +# Build the TypeScript code +RUN npm run build + +# Use a minimal Node.js image for the final build +FROM node:20-alpine + +# Set the working directory in the container +WORKDIR /app + +# Copy built files and node_modules from the builder +COPY --from=builder /app/build /app/build +COPY --from=builder /app/node_modules /app/node_modules +COPY --from=builder /app/package.json /app/package.json + +# Expose any ports the app is expected to listen on +# EXPOSE + +# Set environment variables (if any) +ENV COSENSE_PROJECT_NAME=your_project_name +# ENV COSENSE_SID=your_sid + +# Run the server +ENTRYPOINT ["node", "build/index.js"] \ No newline at end of file From 4a6b5cfc2665d38af305afe87f9c7e5a6d685e4d Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Sun, 26 Jan 2025 11:37:09 +0800 Subject: [PATCH 2/3] Add Smithery configuration --- smithery.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 smithery.yaml diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..230bd62 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,21 @@ +# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml + +startCommand: + type: stdio + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + required: + - cosenseProjectName + properties: + cosenseProjectName: + type: string + description: The project name for the COSENSE server. + cosenseSid: + type: string + default: "" + description: The SID for a private COSENSE project. + commandFunction: + # A function that produces the CLI command to start the MCP on stdio. + |- + (config) => ({command: 'node', args: ['build/index.js'], env: {COSENSE_PROJECT_NAME: config.cosenseProjectName, COSENSE_SID: config.cosenseSid}}) \ No newline at end of file From e2c4bec9beea3f5dc92417e4fd3259325175bae8 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Sun, 26 Jan 2025 11:37:10 +0800 Subject: [PATCH 3/3] Update README --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 9da2eb0..6e86eb3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Cosense MCP Server +[![smithery badge](https://smithery.ai/badge/@yosider/cosense-mcp-server)](https://smithery.ai/server/@yosider/cosense-mcp-server) MCP server for [Cosense](https://cosen.se) Forked from [funwarioisii/cosense-mcp-server](https://github.com/funwarioisii/cosense-mcp-server) @@ -9,6 +10,15 @@ Forked from [funwarioisii/cosense-mcp-server](https://github.com/funwarioisii/co ## Installation +### Installing via Smithery + +To install Cosense for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@yosider/cosense-mcp-server): + +```bash +npx -y @smithery/cli install @yosider/cosense-mcp-server --client claude +``` + +### Manual Installation ```bash git clone https://github.com/funwarioisii/cosense-mcp-server.git cd cosense-mcp-server