Skip to content

Commit c70853e

Browse files
committed
fix: use esm as default
1 parent bf35972 commit c70853e

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ jobs:
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/cjs/index.js --connectionString "mongodb://localhost"
58+
- run: npx -y @modelcontextprotocol/inspector --cli --method tools/list -- node dist/esm/index.js --connectionString "mongodb://localhost"

.smithery/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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/cjs/index.js"]
30+
CMD ["node", "dist/esm/index.js"]

.smithery/smithery.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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/cjs/index.js'];
43+
const args = ['dist/esm/index.js'];
4444
if (config) {
4545
if (config.atlasClientId) {
4646
args.push('--apiClientId');

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"request": "launch",
1919
"name": "Launch Program",
2020
"skipFiles": ["<node_internals>/**"],
21-
"program": "${workspaceFolder}/dist/cjs/index.js",
21+
"program": "${workspaceFolder}/dist/esm/index.js",
2222
"preLaunchTask": "tsc: build - tsconfig.build.json",
2323
"outFiles": ["${workspaceFolder}/dist/**/*.js"]
2424
}

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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/cjs/index.js"
36+
"command": "/path/to/mongodb-mcp-server/dist/esm/index.js"
3737
}
3838
}
3939
}
@@ -104,7 +104,7 @@ npm run inspect
104104
This is equivalent to:
105105

106106
```shell
107-
npx @modelcontextprotocol/inspector -- node dist/cjs/index.js
107+
npx @modelcontextprotocol/inspector -- node dist/esm/index.js
108108
```
109109

110110
## Pull Request Guidelines

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"url": "https://github.com/mongodb-js/mongodb-mcp-server.git"
2323
},
2424
"bin": {
25-
"mongodb-mcp-server": "dist/cjs/index.js"
25+
"mongodb-mcp-server": "dist/esm/index.js"
2626
},
2727
"publishConfig": {
2828
"access": "public"
@@ -34,9 +34,9 @@
3434
"build:esm": "tsc --project tsconfig.esm.json",
3535
"build:cjs": "tsc --project tsconfig.cjs.json",
3636
"build:package-json": "tsx scripts/write-package-json.ts",
37-
"build:chmod": "chmod +x dist/cjs/index.js",
37+
"build:chmod": "chmod +x dist/esm/index.js",
3838
"build": "npm run build:clean && npm run build:esm && npm run build:cjs && npm run build:package-json && npm run build:chmod",
39-
"inspect": "npm run build && mcp-inspector -- dist/cjs/index.js",
39+
"inspect": "npm run build && mcp-inspector -- dist/esm/index.js",
4040
"prettier": "prettier",
4141
"check": "npm run build && npm run check:types && npm run check:lint && npm run check:format",
4242
"check:lint": "eslint .",

0 commit comments

Comments
 (0)