Skip to content

Commit fd0a38e

Browse files
committed
feat: add smithery config
1 parent 3b9e002 commit fd0a38e

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

.dockerignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
dist
2+
node_modules
3+
.vscode/mcp.json
4+
.github/prompts/*
5+
6+
# Environment variables
7+
.env
8+
9+
# Sensitive
10+
state.json
11+
12+
tests/tmp
13+
coverage

Dockerfile

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Use a base image with Node.js
2+
FROM node:23-bookworm-slim
3+
4+
# Install MongoDB Community Edition
5+
RUN apt-get update && \
6+
apt-get install -y gnupg curl python3 build-essential && \
7+
curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg --dearmor && \
8+
echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] http://repo.mongodb.org/apt/debian bookworm/mongodb-org/8.0 main" | tee /etc/apt/sources.list.d/mongodb-org-8.0.list && \
9+
apt-get update && \
10+
apt-get install -y mongodb-org && \
11+
apt-get clean && \
12+
rm -rf /var/lib/apt/lists/*
13+
14+
# Create a directory for the application
15+
WORKDIR /app
16+
17+
# Copy package.json and package-lock.json
18+
COPY . .
19+
20+
# Install application dependencies
21+
RUN npm ci
22+
23+
RUN npm run build
24+
25+
RUN mongod --fork --logpath /var/log/mongodb.log
26+
27+
# Start MongoDB and the application
28+
CMD ["node", "dist/index.js --connectionString mongodb://localhost:27017"]

smithery.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Smithery.ai configuration
2+
startCommand:
3+
type: stdio
4+
configSchema:
5+
type: object
6+
properties:
7+
connectionString:
8+
type: string
9+
required:
10+
- connectionString
11+
commandFunction:
12+
# A function that produces the CLI command to start the MCP on stdio.
13+
|-
14+
(config) => ({
15+
"command": "node",
16+
"args": [
17+
"dist/index.js"
18+
],
19+
"env": {
20+
"MDB_MCP_CONNECTION_STRING": config.connectionString
21+
}
22+
})

0 commit comments

Comments
 (0)