You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+96-15Lines changed: 96 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,32 +35,33 @@ A Model Context Protocol server for interacting with MongoDB Atlas. This project
35
35
Common prerequisites:
36
36
37
37
- Node.js v20.x
38
-
- A MongoDB connection string or Atlas API credentials
38
+
- A MongoDB connection string or Atlas API credentials, the Server will not start unless configured, see [configuration](#configuration) section for more details.
39
39
40
40
### WindSurf
41
41
42
42
The latest instructions can be found at https://docs.windsurf.com/windsurf/mcp
43
43
44
44
Step 1: Create MCP configuration file
45
45
46
-
47
46
Create or edit the configuration file at `~/.codeium/windsurf/mcp_config.json`:
48
47
49
48
```json
50
49
{
51
50
"servers": {
52
51
"MongoDB": {
53
52
"command": "npx",
54
-
"args": [
55
-
"-y",
56
-
"mongodb-mcp-server"
57
-
]
53
+
"args": ["-y", "mongodb-mcp-server"]
58
54
}
59
55
}
60
56
}
61
57
```
62
58
63
-
Step 2: Follow the [configuration](#configuration) section for more details on how to connect to a MongoDB instance or Atlas.
59
+
Step 2: Setup a connection string or Atlas API credentials
60
+
61
+
- Option 1: Connection String via args [example](#connection-string-with-args)
62
+
- Option 2: Atlas API credentials via args [example](#atlas-api-credentials-with-args)
63
+
- Option 3: Connection String via environment variables [example](#connection-string-with-environment-variables)
64
+
- Option 4: Atlas API credentials via environment variables [example](#atlas-api-credentials-with-environment-variables)
64
65
65
66
### VSCode
66
67
@@ -89,16 +90,16 @@ Note: the file should look like:
89
90
}
90
91
```
91
92
92
-
Step 2: Follow the [configuration](#configuration) section for more details on how to connect to a MongoDB instance or Atlas.
93
+
Step 2: Setup a connection string or Atlas API credentials
93
94
95
+
- Option 1: Connection String via args [example](#connection-string-with-args)
96
+
- Option 2: Atlas API credentials via args [example](#atlas-api-credentials-with-args)
97
+
- Option 3: Connection String via environment variables [example](#connection-string-with-environment-variables)
98
+
- Option 4: Atlas API credentials via environment variables [example](#atlas-api-credentials-with-environment-variables)
94
99
95
100
### Claude Desktop
96
101
97
-
Step 1: Install claude and login
98
-
99
-
Note: follow instructions at https://claude.ai/download
100
-
101
-
Step 2: Launch Claude Settings -> Developer -> Edit Config
102
+
Step 1: Launch Claude Settings -> Developer -> Edit Config
102
103
103
104
Paste the mcp server configuration into the file
104
105
@@ -113,9 +114,12 @@ Paste the mcp server configuration into the file
113
114
}
114
115
```
115
116
116
-
Step 3: Close and Relaunch Claude Desktop and click on the hammer icon, the MongoDB MCP server should be detected.
117
+
Step 2: Setup a connection string or Atlas API credentials
117
118
118
-
Follow the [configuration](#configuration) section for more details on how to connect to a MongoDB instance or Atlas.
119
+
- Option 1: Connection String via args [example](#connection-string-with-args)
120
+
- Option 2: Atlas API credentials via args [example](#atlas-api-credentials-with-args)
121
+
- Option 3: Connection String via environment variables [example](#connection-string-with-environment-variables)
122
+
- Option 4: Atlas API credentials via environment variables [example](#atlas-api-credentials-with-environment-variables)
##### Atlas API credentials with command-line arguments
348
+
349
+
```json
350
+
{
351
+
"servers": {
352
+
"MongoDB": {
353
+
"command": "npx",
354
+
"args": [
355
+
"-y",
356
+
"mongodb-mcp-server",
357
+
"--apiClientId",
358
+
"your-atlas-client-id",
359
+
"--apiClientSecret",
360
+
"your-atlas-client-secret"
361
+
]
362
+
}
363
+
}
364
+
}
365
+
```
366
+
286
367
## 🤝 Contributing
287
368
288
369
Interested in contributing? Great! Please check our [Contributing Guide](CONTRIBUTING.md) for guidelines on code contributions, standards, adding new tools, and troubleshooting information.
0 commit comments