MongoDB MCP Server
Query, inspect, and manage MongoDB database collections via natural language commands.
Data last scanned yesterday · Reviewed 2 months ago
Overview
The MongoDB MCP Server allows AI assistants to interact directly with MongoDB databases. By providing a connection string, users can enable their tools to perform operations on collections and documents, facilitating data-driven tasks directly from the chat interface.
Our verdict
This server carries a high-risk rating due to significant security concerns. Most notably, there is no authentication mechanism, meaning any entity with access to the configuration can interact with the database. Additionally, it lacks formal support for OAuth and is maintained by the community rather than the official vendor, leaving users without direct recourse. It should only be used in highly controlled, isolated environments.
- Supports 30 direct dependencies for a reduced supply-chain footprint.
- Features active maintenance with 44 contributors.
- Documentation provided in the repository README.
- Lack of built-in authentication exposes the server to unauthorized access.
- Absence of OAuth support restricts secure credential management.
- Community-maintained project without official vendor backing.
Setup
{
"mcpServers": {
"mongodb-mcp-server": {
"args": [
"-y",
"mongodb-mcp-server"
],
"command": "npx"
}
}
}Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows), then restart Claude Desktop. Some servers require API keys or tokens as environment variables — check the project's README and add an "env" object if needed.
- No read-only mode — running this grants full read/write access.
- No built-in authentication — anyone with access to this config can invoke every tool it exposes.
Tools
| Tool | Description | Risk |
|---|---|---|
| aggregate | Run an aggregation against a MongoDB collection | low |
| aggregate-db | Run an aggregation against a MongoDB database | low |
| collection-indexes | Describe the indexes for a collection | low |
| collection-schema | Describe the schema for a collection | low |
| collection-storage-size | Gets the size of the collection | low |
| connect | Connect to a MongoDB instance | low |
| count | Gets the number of documents in a MongoDB collection using db.collection.count() and query as an optional filter parameter | low |
| create-collection | Creates a new collection in a database. If the database doesn't exist, it will be created automatically. | medium |
| create-index | Create an index for a collection | medium |
| db-stats | Returns statistics that reflect the use state of a single database | low |
Compatibility
| Client | Local | Docker | Remote | Read-only |
|---|---|---|---|---|
| ChatGPT | ||||
| Claude Desktop | ||||
| Cursor | ||||
| VS Code | ||||
| Windsurf |
Frequently asked questions
›What are the Node.js version requirements?
This server requires Node.js v22.13.0 or later. Support for Node 20.x is deprecated.
›What credentials are required to use MongoDB Atlas tools?
You must use Atlas Service Account API credentials to access MongoDB Atlas tools.
›Can I connect to a MongoDB instance without Atlas credentials?
Yes, you can use a standard MongoDB connection string to connect directly to your MongoDB instance.
›How can I ensure the server operates with limited database access?
You can configure the server with the --readOnly command-line argument to restrict operations.
›Are there specific security practices recommended for Atlas credentials?
You should assign only the minimum required permissions to the service account used for Atlas API access.
Alternatives
Changelog
- Securityv1.15.0-alpha.2
2026-07-16
- Newv1.15.0-alpha.1
2026-07-16
- Fixv1.14.0
2026-07-14
- Fixv1.14.0-prerelease.3
2026-07-12
- Improvedmongodb-atlas-mcp-remote/v0.2.0
2026-07-09
- Fixv1.14.0-prerelease.2
2026-07-03
- Fixv1.14.0-prerelease.1
2026-07-01
- Newv1.14.0-prerelease.0
2026-06-26
- Fixv1.13.0
2026-06-16
- Newv1.12.0
2026-06-04
Badge
Maintain this server? Add the live badge to your README.