@@ -109,7 +109,7 @@ Use your Atlas API Service Accounts credentials. Must follow all the steps in [A
109
109
Start Server using npx command:
110
110
111
111
``` shell
112
- npx -y mongodb-mcp-server --apiClientId=" your-atlas-service-accounts-client-id" --apiClientSecret=" your-atlas-service-accounts-client-secret" --readOnly
112
+ npx -y mongodb-mcp-server@latest --apiClientId=" your-atlas-service-accounts-client-id" --apiClientSecret=" your-atlas-service-accounts-client-secret" --readOnly
113
113
```
114
114
115
115
- For a complete list of arguments see [ Configuration Options] ( #configuration-options )
@@ -118,7 +118,7 @@ Start Server using npx command:
118
118
#### Option 4: Standalone Service using environment variables
119
119
120
120
``` shell
121
- npx -y mongodb-mcp-server --readOnly
121
+ npx -y mongodb-mcp-server@latest --readOnly
122
122
```
123
123
124
124
You can use environment variables in the config file or set them and run the server via npx.
@@ -247,13 +247,13 @@ You can run the MongoDB MCP Server as an HTTP server instead of the default stdi
247
247
To start the server with HTTP transport, use the ` --transport http ` option:
248
248
249
249
``` shell
250
- npx -y mongodb-mcp-server --transport http
250
+ npx -y mongodb-mcp-server@latest --transport http
251
251
```
252
252
253
253
By default, the server will listen on ` http://127.0.0.1:3000 ` . You can customize the host and port using the ` --httpHost ` and ` --httpPort ` options:
254
254
255
255
``` shell
256
- npx -y mongodb-mcp-server --transport http --httpHost=0.0.0.0 --httpPort=8080
256
+ npx -y mongodb-mcp-server@latest --transport http --httpHost=0.0.0.0 --httpPort=8080
257
257
```
258
258
259
259
- ` --httpHost ` (default: 127.0.0.1): The host to bind the HTTP server.
@@ -352,7 +352,7 @@ export MDB_MCP_LOGGERS="disk,stderr"
352
352
##### Example: Set logger via command-line argument
353
353
354
354
``` shell
355
- npx -y mongodb-mcp-server --loggers mcp stderr
355
+ npx -y mongodb-mcp-server@latest --loggers mcp stderr
356
356
```
357
357
358
358
##### Log File Location
@@ -529,7 +529,7 @@ export MDB_MCP_LOG_PATH="/path/to/logs"
529
529
Pass configuration options as command-line arguments when starting the server:
530
530
531
531
``` shell
532
- npx -y mongodb-mcp-server --apiClientId=
" your-atlas-service-accounts-client-id" --apiClientSecret=
" your-atlas-service-accounts-client-secret" --connectionString=
" mongodb+srv://username:[email protected] /myDatabase" --logPath=/path/to/logs --readOnly --indexCheck
532
+ npx -y mongodb-mcp-server
@latest --apiClientId=
" your-atlas-service-accounts-client-id" --apiClientSecret=
" your-atlas-service-accounts-client-secret" --connectionString=
" mongodb+srv://username:[email protected] /myDatabase" --logPath=/path/to/logs --readOnly --indexCheck
533
533
```
534
534
535
535
#### MCP configuration file examples
0 commit comments