From f9eb04821739a64f510e2ae70c5f2c6b594d5cbe Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Thu, 6 Feb 2025 12:01:08 +0800 Subject: [PATCH 1/3] Add Dockerfile --- Dockerfile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7d44445 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,35 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +# Use an official Node.js runtime as a parent image +FROM node:18-alpine AS builder + +# Set the working directory +WORKDIR /usr/src/app + +# Copy package.json and package-lock.json for npm install +COPY package*.json ./ + +# Install dependencies +RUN npm install --ignore-scripts + +# Copy the rest of the application code +COPY . . + +# Build the application +RUN npm run build + +# Create a new stage with a smaller base image +FROM node:18-alpine + +# Set the working directory +WORKDIR /usr/src/app + +# Copy only the build output and node_modules from the builder stage +COPY --from=builder /usr/src/app/dist ./dist +COPY --from=builder /usr/src/app/node_modules ./node_modules +COPY --from=builder /usr/src/app/package.json ./ + +# Expose the application port +EXPOSE 3000 + +# Run the web service on container startup +CMD ["node", "dist/main.js"] From 274d32547ce5922f0c5bf12789cc48563ca61eff Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Thu, 6 Feb 2025 12:01:09 +0800 Subject: [PATCH 2/3] Add Smithery configuration --- smithery.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 smithery.yaml diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..50bfbb7 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,13 @@ +# 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: [] + properties: {} + commandFunction: + # A function that produces the CLI command to start the MCP on stdio. + |- + () => ({ command: 'node', args: ['dist/main.js'], env: {} }) From 1f34ec88a3c2a9af9afafb01c458ea52ac7f884c Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Thu, 6 Feb 2025 12:01:09 +0800 Subject: [PATCH 3/3] Update README --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 68d2ca6..0ef80dd 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # NestJS MCP Server Module +[![smithery badge](https://smithery.ai/badge/@rekog-labs/Nest-MCP)](https://smithery.ai/server/@rekog-labs/Nest-MCP) + A NestJS module for exposing your services as an MCP (Model Context Protocol) server with Server-Sent Events (SSE) transport. This package simplifies exposing tools that clients can discover and execute via SSE. ## Features @@ -11,6 +13,15 @@ A NestJS module for exposing your services as an MCP (Model Context Protocol) se ## Installation +### Installing via Smithery + +To install NestJS MCP Server Module for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@rekog-labs/Nest-MCP): + +```bash +npx -y @smithery/cli install @rekog-labs/Nest-MCP --client claude +``` + +### Manual Installation ```bash npm install @rekog/mcp-nest reflect-metadata @modelcontextprotocol/sdk zod ```