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
chore: update readme following sec recommendations
This commit ensures that our examples promote use of environment
variables for providing sensitive configuration options. Additionally we
callout, whereever necessary, our recommendation of choosing env
variables over command line arguments for the same.
Copy file name to clipboardExpand all lines: README.md
+72-62Lines changed: 72 additions & 62 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,9 @@ node -v
47
47
48
48
### Quick Start
49
49
50
-
**Note:** When using Atlas API credentials, be sure to assign only the minimum required permissions to your service account. See [Atlas API Permissions](#atlas-api-permissions) for details.
50
+
> **🔒 Security Recommendation 1:** When using Atlas API credentials, be sure to assign only the minimum required permissions to your service account. See [Atlas API Permissions](#atlas-api-permissions) for details.
51
+
52
+
> **🔒 Security Recommendation 2:** For enhanced security, we strongly recommend using environment variables to pass sensitive configuration such as connection strings and API credentials instead of command line arguments. Command line arguments can be visible in process lists and logged in various system locations, potentially exposing your secrets. Environment variables provide a more secure way to handle sensitive information.
51
53
52
54
Most MCP clients require a configuration file to be created or modified to add the MCP server.
53
55
@@ -60,30 +62,27 @@ Note: The configuration file syntax can be different across clients. Please refe
60
62
61
63
> **Default Safety Notice:** All examples below include `--readOnly` by default to ensure safe, read-only access to your data. Remove `--readOnly` if you need to enable write operations.
62
64
63
-
#### Option 1: Connection String args
65
+
#### Option 1: Connection String
64
66
65
-
You can pass your connection string via args, make sure to use a valid username and password.
67
+
You can pass your connection string via environment variables, make sure to use a valid username and password.
> **⚠️ Security Notice:** This server now supports Streamable HTTP transport for remote connections. **HTTP transport is NOT recommended for production use without implementing proper authentication and security measures.**
236
243
@@ -316,6 +323,8 @@ NOTE: atlas tools are only available when you set credentials on [configuration]
316
323
317
324
## Configuration
318
325
326
+
> **🔒 Security Best Practice:** We strongly recommend using environment variables for sensitive configuration such as API credentials (`MDB_MCP_API_CLIENT_ID`, `MDB_MCP_API_CLIENT_SECRET`) and connection strings (`MDB_MCP_CONNECTION_STRING`) instead of command-line arguments. Environment variables are not visible in process lists and provide better security for your sensitive data.
327
+
319
328
The MongoDB MCP Server can be configured using multiple methods, with the following precedence (highest to lowest):
Pass configuration options as command-line arguments when starting the server:
553
562
563
+
> **🔒 Security Note:** For sensitive configuration like API credentials and connection strings, use environment variables instead of command-line arguments.
0 commit comments