File tree Expand file tree Collapse file tree 1 file changed +30
-5
lines changed
Expand file tree Collapse file tree 1 file changed +30
-5
lines changed Original file line number Diff line number Diff line change @@ -115,27 +115,52 @@ You can run the MongoDB MCP Server in a Docker container, which provides isolati
115115
116116#### Run with Environment Variables
117117
118- You need to provide either a MongoDB connection string OR Atlas API credentials:
118+ You may provide either a MongoDB connection string OR Atlas API credentials:
119119
120- ##### Option A: With MongoDB connection string
120+ ##### Option A: No configuration
121121
122122``` shell
123- docker run -i \
123+ docker run --rm -i \
124+ mongodb/mongodb-mcp-server:latest
125+ ```
126+
127+ ##### Option B: With MongoDB connection string
128+
129+ ``` shell
130+ docker run --rm -i \
124131 -e MDB_MCP_CONNECTION_STRING=" mongodb+srv://username:password@cluster.mongodb.net/myDatabase" \
125132 mongodb/mongodb-mcp-server:latest
126133```
127134
128- ##### Option B : With Atlas API credentials
135+ ##### Option C : With Atlas API credentials
129136
130137``` shell
131- docker run -i \
138+ docker run --rm - i \
132139 -e MDB_MCP_API_CLIENT_ID=" your-atlas-service-accounts-client-id" \
133140 -e MDB_MCP_API_CLIENT_SECRET=" your-atlas-service-accounts-client-secret" \
134141 mongodb/mongodb-mcp-server:latest
135142```
136143
137144##### Docker in MCP Configuration File
138145
146+ Without options:
147+
148+ ``` json
149+ {
150+ "mcpServers" : {
151+ "MongoDB" : {
152+ "command" : " docker" ,
153+ "args" : [
154+ " run" ,
155+ " --rm" ,
156+ " -i" ,
157+ " mongodb/mongodb-mcp-server:latest"
158+ ]
159+ }
160+ }
161+ }
162+ ```
163+
139164With connection string:
140165
141166``` json
You can’t perform that action at this time.
0 commit comments