-
Notifications
You must be signed in to change notification settings - Fork 72
chore: default examples with --readOnly #347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates all Quick Start examples and badges in README.md to include the --readOnly
flag by default, ensuring safer, read-only access.
- Added
--readOnly
to allnpx
, JSON config, and Docker examples. - Introduced a Default Safety Notice about read-only mode.
- Updated VS Code and Cursor install badges to pass the new flag.
Comments suppressed due to low confidence (2)
README.md:45
- [nitpick] This note is missing the
>
markdown blockquote marker, making its formatting inconsistent with other callouts in the document. Consider adding>
before it for consistency.
**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.
README.md:2
- The Cursor install badge
config
URL parameter uses a different encoding format and may not decode correctly. Consider encoding the updated JSON config as Base64 or ensuring consistency with the original format.
[](https://cursor.com/install-mcp?name=MongoDB&config=JTdCJTIyY29tbWFuZCUyMiUzQSUyMm5weCUyMC15JTIwbW9uZ29kYi1tY3Atc2VydmVyJTIwLS1yZWFkT25seSUyMiU3RA%3D%3D)
README.md
Outdated
@@ -131,15 +135,15 @@ You may provide either a MongoDB connection string OR Atlas API credentials: | |||
|
|||
```shell | |||
docker run --rm -i \ | |||
mongodb/mongodb-mcp-server:latest | |||
mongodb/mongodb-mcp-server:latest --readOnly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we sure this is passing the args correctly to the server or do we need a --
first? I'm a docker noob, so sorry if it's a stupid question 🫣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope! It was my auto-complete everywhere, let me fix to follow the pattern of using env variables
@@ -179,7 +189,8 @@ With connection string: | |||
"-i", | |||
"-e", | |||
"MDB_MCP_CONNECTION_STRING=mongodb+srv://username:[email protected]/myDatabase", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be passing the config parameters via env variables - I think we should consistently use the same patterns (i.e. either command-line args or env variables).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice catch! thx updating
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One missed update, otherwise, seems good from my side
@@ -148,7 +153,7 @@ docker run --rm -i \ | |||
docker run --rm -i \ | |||
-e MDB_MCP_API_CLIENT_ID="your-atlas-service-accounts-client-id" \ | |||
-e MDB_MCP_API_CLIENT_SECRET="your-atlas-service-accounts-client-secret" \ | |||
mongodb/mongodb-mcp-server:latest | |||
mongodb/mongodb-mcp-server:latest --readOnly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mongodb/mongodb-mcp-server:latest --readOnly | |
-e MDB_MCP_READ_ONLY="true" \ | |
mongodb/mongodb-mcp-server:latest |
Proposed changes
Checklist