Skip to content

Commit 6cd6d69

Browse files
[packages/mcp] deployment: Dockerfile and Smithery config (#300)
1 parent 19ee70e commit 6cd6d69

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

packages/mcp/Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config
2+
# syntax=docker/dockerfile:1
3+
4+
# Builder stage
5+
FROM node:lts-alpine AS builder
6+
WORKDIR /app
7+
8+
# Install dependencies and build
9+
COPY package.json tsconfig.json ./
10+
COPY src ./src
11+
RUN npm install
12+
RUN npm run build
13+
14+
# Final stage
15+
FROM node:lts-alpine
16+
WORKDIR /app
17+
18+
# Install only production dependencies
19+
COPY package.json ./
20+
RUN npm install --production
21+
22+
# Copy built artifacts
23+
COPY --from=builder /app/dist ./dist
24+
25+
# Expose no specific port since this is stdio MCP server
26+
# Default command
27+
CMD ["node", "dist/index.js"]

packages/mcp/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,14 @@ The Sourcebot MCP server enables precise regular expression code search across r
146146
}
147147
```
148148
</details>
149+
<br/>
150+
151+
Alternatively, you can install using via [Smithery](https://smithery.ai/server/@sourcebot-dev/sourcebot). For example:
152+
153+
```bash
154+
npx -y @smithery/cli install @sourcebot-dev/sourcebot --client claude
155+
```
156+
149157
<br/>
150158

151159
4. Tell your LLM to `use sourcebot` when prompting.

packages/mcp/smithery.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Smithery configuration file: https://smithery.ai/docs/build/project-config
2+
3+
startCommand:
4+
type: stdio
5+
configSchema:
6+
# JSON Schema defining the configuration options for the MCP.
7+
type: object
8+
required: []
9+
properties:
10+
sourcebotHost:
11+
type: string
12+
description: Optional URL of the Sourcebot server (e.g., http://localhost:3000).
13+
commandFunction:
14+
# A JS function that produces the CLI command based on the given config to start the MCP on stdio.
15+
|-
16+
(config) => {
17+
const env = {};
18+
if (config.sourcebotHost) {
19+
env.SOURCEBOT_HOST = config.sourcebotHost;
20+
}
21+
return { command: 'node', args: ['dist/index.js'], env };
22+
}
23+
exampleConfig:
24+
sourcebotHost: http://localhost:3000

0 commit comments

Comments
 (0)