@@ -157,8 +157,6 @@ The MongoDB MCP Server can be configured using multiple methods, with the follow
157157
1581581 . Command-line arguments
1591592 . Environment variables
160- 3 . Configuration file
161- 4 . Default values
162160
163161### Configuration Options
164162
@@ -167,6 +165,12 @@ The MongoDB MCP Server can be configured using multiple methods, with the follow
167165| ` apiClientId ` | Atlas API client ID for authentication |
168166| ` apiClientSecret ` | Atlas API client secret for authentication |
169167| ` connectionString ` | MongoDB connection string for direct database connections (optional users may choose to inform it on every tool call) |
168+ | ` logPath ` | Folder to store logs |
169+
170+ ** Default Log Path:**
171+
172+ - Windows: ` %LOCALAPPDATA%\mongodb\mongodb-mcp\.app-logs `
173+ - macOS/Linux: ` ~/.mongodb/mongodb-mcp/.app-logs `
170174
171175### Atlas API Access
172176
@@ -195,23 +199,6 @@ To use the Atlas API tools, you'll need to create a service account in MongoDB A
195199
196200### Configuration Methods
197201
198- #### Configuration File
199-
200- Create a JSON configuration file at one of these locations:
201-
202- - Linux/macOS: ` /etc/mongodb-mcp.conf `
203- - Windows: ` %LOCALAPPDATA%\mongodb\mongodb-mcp\mongodb-mcp.conf `
204-
205- Example configuration file:
206-
207- ``` json
208- {
209- "apiClientId" : " your-atlas-client-id" ,
210- "apiClientSecret" : " your-atlas-client-secret" ,
211- "connectionString" : " mongodb+srv://username:password@cluster.mongodb.net/myDatabase"
212- }
213- ```
214-
215202#### Environment Variables
216203
217204Set environment variables with the prefix ` MDB_MCP_ ` followed by the option name in uppercase with underscores:
@@ -223,14 +210,16 @@ export MDB_MCP_API_CLIENT_SECRET="your-atlas-client-secret"
223210
224211# Set a custom MongoDB connection string
225212export MDB_MCP_CONNECTION_STRING=" mongodb+srv://username:password@cluster.mongodb.net/myDatabase"
213+
214+ export MDB_MCP_LOG_PATH=" /path/to/logs"
226215```
227216
228217#### Command-Line Arguments
229218
230219Pass configuration options as command-line arguments when starting the server:
231220
232221``` shell
233- node dist/index.js --apiClientId=" your-atlas-client-id" --apiClientSecret=" your-atlas-client-secret" --connectionString=" mongodb+srv://username:password@cluster.mongodb.net/myDatabase"
222+ node dist/index.js --apiClientId=" your-atlas-client-id" --apiClientSecret=" your-atlas-client-secret" --connectionString=" mongodb+srv://username:password@cluster.mongodb.net/myDatabase" --logPath=/path/to/logs
234223```
235224
236225## 🤝 Contributing
0 commit comments