File tree Expand file tree Collapse file tree 8 files changed +13
-13
lines changed
Expand file tree Collapse file tree 8 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 5555 rm -rf node_modules
5656 npm pkg set scripts.prepare="exit 0"
5757 npm install --omit=dev
58- - run : npx -y @modelcontextprotocol/inspector --cli --method tools/list -- node dist/index.js --connectionString "mongodb://localhost"
58+ - run : npx -y @modelcontextprotocol/inspector --cli --method tools/list -- node dist/cjs/ index.js --connectionString "mongodb://localhost"
Original file line number Diff line number Diff line change @@ -27,4 +27,4 @@ RUN npm ci --production --ignore-scripts
2727# Expose no ports (stdio only)
2828
2929# Default command
30- CMD ["node" , "dist/index.js" ]
30+ CMD ["node" , "dist/cjs/ index.js" ]
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ startCommand:
4040 # A function that produces the CLI command to start the MCP on stdio.
4141 |-
4242 (config) => {
43- const args = ['dist/index.js'];
43+ const args = ['dist/cjs/ index.js'];
4444 if (config) {
4545 if (config.atlasClientId) {
4646 args.push('--apiClientId');
Original file line number Diff line number Diff line change 1818 "request" : " launch" ,
1919 "name" : " Launch Program" ,
2020 "skipFiles" : [" <node_internals>/**" ],
21- "program" : " ${workspaceFolder}/dist/index.js" ,
21+ "program" : " ${workspaceFolder}/dist/cjs/ index.js" ,
2222 "preLaunchTask" : " tsc: build - tsconfig.build.json" ,
2323 "outFiles" : [" ${workspaceFolder}/dist/**/*.js" ]
2424 }
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ This project implements a Model Context Protocol (MCP) server for MongoDB and Mo
3333 {
3434 "mcpServers" : {
3535 "MongoDB" : {
36- "command" : " /path/to/mongodb-mcp-server/dist/index.js"
36+ "command" : " /path/to/mongodb-mcp-server/dist/cjs/ index.js"
3737 }
3838 }
3939 }
@@ -104,7 +104,7 @@ npm run inspect
104104This is equivalent to:
105105
106106``` shell
107- npx @modelcontextprotocol/inspector -- node dist/index.js
107+ npx @modelcontextprotocol/inspector -- node dist/cjs/ index.js
108108```
109109
110110## Pull Request Guidelines
Original file line number Diff line number Diff line change 66 "exports" : {
77 "." : {
88 "import" : {
9- "types" : " ./dist/lib.d.ts" ,
10- "default" : " ./dist/lib.js"
9+ "types" : " ./dist/esm/ lib.d.ts" ,
10+ "default" : " ./dist/esm/ lib.js"
1111 },
1212 "require" : {
1313 "types" : " ./dist/cjs/lib.d.ts" ,
2222 "url" : " https://github.com/mongodb-js/mongodb-mcp-server.git"
2323 },
2424 "bin" : {
25- "mongodb-mcp-server" : " dist/index.js"
25+ "mongodb-mcp-server" : " dist/cjs/ index.js"
2626 },
2727 "publishConfig" : {
2828 "access" : " public"
3333 "build:update-package-info" : " tsx scripts/update-package-info.ts" ,
3434 "build:esm" : " tsc --project tsconfig.esm.json && echo '{\" type\" :\" module\" }' > dist/package.json" ,
3535 "build:cjs" : " tsc --project tsconfig.cjs.json && echo '{\" type\" :\" commonjs\" }' > dist/cjs/package.json" ,
36- "build:chmod" : " chmod +x dist/index.js" ,
36+ "build:chmod" : " chmod +x dist/cjs/ index.js" ,
3737 "build" : " npm run build:clean && npm run build:esm && npm run build:cjs && npm run build:chmod" ,
38- "inspect" : " npm run build && mcp-inspector -- dist/index.js" ,
38+ "inspect" : " npm run build && mcp-inspector -- dist/cjs/ index.js" ,
3939 "prettier" : " prettier" ,
4040 "check" : " npm run build && npm run check:types && npm run check:lint && npm run check:format" ,
4141 "check:lint" : " eslint ." ,
Original file line number Diff line number Diff line change 33 "compilerOptions" : {
44 "module" : " esnext" ,
55 "moduleResolution" : " bundler" ,
6- "outDir" : " ./dist"
6+ "outDir" : " ./dist/esm "
77 }
88}
You can’t perform that action at this time.
0 commit comments