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
+52Lines changed: 52 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -341,6 +341,7 @@ The MongoDB MCP Server can be configured using multiple methods, with the follow
341
341
342
342
1. Command-line arguments
343
343
2. Environment variables
344
+
3. Configuration File
344
345
345
346
### Configuration Options
346
347
@@ -562,6 +563,57 @@ For a full list of roles and their privileges, see the [Atlas User Roles documen
562
563
563
564
### Configuration Methods
564
565
566
+
#### Configuration File
567
+
568
+
Store configuration in a JSON file and load it using the `MDB_MCP_CONFIG` environment variable.
569
+
570
+
> **🔒 Security Best Practice:** Prefer using the `MDB_MCP_CONFIG` environment variable for sensitive fields over the configuration file or `--config` CLI argument. Command-line arguments are visible in process listings.
571
+
572
+
> **🔒 File Security:** Ensure your configuration file has proper ownership and permissions, limited to the user running the MongoDB MCP server:
573
+
>
574
+
> **Linux/macOS:**
575
+
>
576
+
> ```bash
577
+
> chmod 600 /path/to/config.json
578
+
> chown your-username /path/to/config.json
579
+
>```
580
+
>
581
+
>**Windows:** Right-click the file → Properties → Security → Restrict access to your user account only.
582
+
583
+
Create a JSON file with your configuration (all keys use camelCase):
0 commit comments