[packages/mcp] deployment: Dockerfile and Smithery config (#300)

This commit is contained in:
smithery-ai[bot] 2025-05-08 09:54:36 -07:00 committed by GitHub
parent 19ee70ea68
commit 6cd6d69817
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 59 additions and 0 deletions

27
packages/mcp/Dockerfile Normal file
View file

@ -0,0 +1,27 @@
# Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config
# syntax=docker/dockerfile:1
# Builder stage
FROM node:lts-alpine AS builder
WORKDIR /app
# Install dependencies and build
COPY package.json tsconfig.json ./
COPY src ./src
RUN npm install
RUN npm run build
# Final stage
FROM node:lts-alpine
WORKDIR /app
# Install only production dependencies
COPY package.json ./
RUN npm install --production
# Copy built artifacts
COPY --from=builder /app/dist ./dist
# Expose no specific port since this is stdio MCP server
# Default command
CMD ["node", "dist/index.js"]

View file

@ -146,6 +146,14 @@ The Sourcebot MCP server enables precise regular expression code search across r
} }
``` ```
</details> </details>
<br/>
Alternatively, you can install using via [Smithery](https://smithery.ai/server/@sourcebot-dev/sourcebot). For example:
```bash
npx -y @smithery/cli install @sourcebot-dev/sourcebot --client claude
```
<br/> <br/>
4. Tell your LLM to `use sourcebot` when prompting. 4. Tell your LLM to `use sourcebot` when prompting.

View file

@ -0,0 +1,24 @@
# Smithery configuration file: https://smithery.ai/docs/build/project-config
startCommand:
type: stdio
configSchema:
# JSON Schema defining the configuration options for the MCP.
type: object
required: []
properties:
sourcebotHost:
type: string
description: Optional URL of the Sourcebot server (e.g., http://localhost:3000).
commandFunction:
# A JS function that produces the CLI command based on the given config to start the MCP on stdio.
|-
(config) => {
const env = {};
if (config.sourcebotHost) {
env.SOURCEBOT_HOST = config.sourcebotHost;
}
return { command: 'node', args: ['dist/index.js'], env };
}
exampleConfig:
sourcebotHost: http://localhost:3000