Skip to content

chore: provides dedicated cli and library entrypoints - MCP-6 #325

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ jobs:
rm -rf node_modules
npm pkg set scripts.prepare="exit 0"
npm install --omit=dev
- run: npx -y @modelcontextprotocol/inspector --cli --method tools/list -- node dist/index.js --connectionString "mongodb://localhost"
- run: npx -y @modelcontextprotocol/inspector --cli --method tools/list -- node dist/cli.cjs --connectionString "mongodb://localhost"
2 changes: 1 addition & 1 deletion .smithery/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ RUN npm ci --production --ignore-scripts
# Expose no ports (stdio only)

# Default command
CMD ["node", "dist/index.js"]
CMD ["node", "dist/cli.cjs"]
2 changes: 1 addition & 1 deletion .smithery/smithery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ startCommand:
# A function that produces the CLI command to start the MCP on stdio.
|-
(config) => {
const args = ['dist/index.js'];
const args = ['dist/cli.cjs'];
if (config) {
if (config.atlasClientId) {
args.push('--apiClientId');
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"request": "launch",
"name": "Launch Program",
"skipFiles": ["<node_internals>/**"],
"program": "${workspaceFolder}/dist/index.js",
"program": "${workspaceFolder}/dist/cli.cjs",
"preLaunchTask": "tsc: build - tsconfig.build.json",
"outFiles": ["${workspaceFolder}/dist/**/*.js"]
}
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ This project implements a Model Context Protocol (MCP) server for MongoDB and Mo
{
"mcpServers": {
"MongoDB": {
"command": "/path/to/mongodb-mcp-server/dist/index.js"
"command": "/path/to/mongodb-mcp-server/dist/cli.cjs"
}
}
}
Expand Down Expand Up @@ -104,7 +104,7 @@ npm run inspect
This is equivalent to:

```shell
npx @modelcontextprotocol/inspector -- node dist/index.js
npx @modelcontextprotocol/inspector -- node dist/cli.cjs
```

## Pull Request Guidelines
Expand Down
Loading
Loading