diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..249005e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,35 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +# Use Node.js LTS image as the base +FROM node:18-alpine AS builder + +# Create app directory +WORKDIR /app + +# Copy package.json and package-lock.json +COPY package.json package-lock.json ./ + +# Install app dependencies +RUN npm install + +# Copy app source code +COPY . . + +# Build the application +RUN npm run build + +# Use Node.js LTS image for production +FROM node:18-alpine AS production + +# Create app directory +WORKDIR /app + +# Copy only necessary files for production +COPY --from=builder /app/dist ./dist +COPY --from=builder /app/node_modules ./node_modules +COPY --from=builder /app/package.json ./ + +# Expose the application's port +EXPOSE 3000 + +# Start the application +CMD ["node", "dist/main.js"] diff --git a/README.md b/README.md index 68d2ca6..77856b3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # NestJS MCP Server Module +[![smithery badge](https://smithery.ai/badge/@rekog-labs/MCP-Nest)](https://smithery.ai/server/@rekog-labs/MCP-Nest) 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. @@ -11,6 +12,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/MCP-Nest): + +```bash +npx -y @smithery/cli install @rekog-labs/MCP-Nest --client claude +``` + +### Manual Installation ```bash npm install @rekog/mcp-nest reflect-metadata @modelcontextprotocol/sdk zod ``` diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..a889d25 --- /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. + |- + config => ({ command: 'node', args: ['dist/main.js'], env: {} })