MongoDB MCP Server
Query, inspect, and manage MongoDB database collections via natural language commands.
Data last scanned today · Reviewed yesterday
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 |
| delete-many | Removes all documents that match the filter from a MongoDB collection | high |
| drop-collection | Removes a collection or view from the database. The method also removes any indexes associated with the dropped collection. | high |
| drop-database | Removes the specified database, deleting the associated data files | high |
| drop-index | Drop an index for the provided database and collection. | high |
| explain | Returns statistics describing the execution of the winning plan chosen by the query optimizer for the evaluated method | low |
| export | Export a query or aggregation results in the specified EJSON format. | low |
| find | Run a find query against a MongoDB collection | low |
| insert-many | Insert an array of documents into a MongoDB collection. If the list of documents is above com.mongodb/maxRequestPayloadBytes, consider inserting them in batches. | medium |
| list-collections | List all collections for a given database | low |
| list-databases | List all databases for a MongoDB connection | low |
| mongodb-logs | Returns the most recent logged mongod events | low |
| rename-collection | Renames a collection in a MongoDB database | medium |
| switch-connection | Switch to a different MongoDB connection | low |
| update-many | Updates all documents that match the specified filter for a collection. If the list of documents is above com.mongodb/maxRequestPayloadBytes, consider updating them in batches. | medium |
| atlas-connect-cluster | Connect to MongoDB Atlas cluster | low |
| atlas-create-access-list | Allow Ip/CIDR ranges to access your MongoDB Atlas clusters. | medium |
| atlas-create-cluster | Create a MongoDB Atlas cluster (M10–M80, replica set or single shard). Compute autoscaling is enabled by default: min instance size is set to the selected instance size, max is set two tiers above. Disk autoscaling is always enabled. The tool returns immediately, use the atlas-inspect-cluster tool to poll the cluster state for readiness (state: IDLE). Connection strings are unavailable until the cluster reaches IDLE state. | medium |
| atlas-create-db-user | Create an MongoDB Atlas database user | medium |
| atlas-create-free-cluster | Create a free MongoDB Atlas cluster | medium |
| atlas-create-project | Create an MongoDB Atlas project | medium |
| atlas-get-performance-advisor | Get MongoDB Atlas performance advisor recommendations and suggestions, which includes the operations: suggested indexes, drop index suggestions, schema suggestions, and a sample of the most recent (max 50) slow query logs | low |
| atlas-inspect-access-list | Inspect Ip/CIDR ranges with access to your MongoDB Atlas clusters. | low |
| atlas-inspect-cluster | Inspect metadata of a MongoDB Atlas cluster | low |
| atlas-list-alerts | List triggered alerts for a MongoDB Atlas project. These are alerts Atlas has raised, not the alert configurations that define them. Defaults to OPEN alerts; set status to TRACKING or CLOSED to see others. | low |
| atlas-list-clusters | List MongoDB Atlas clusters | low |
| atlas-list-db-users | List MongoDB Atlas database users | low |
| atlas-list-orgs | List MongoDB Atlas organizations | low |
| atlas-list-projects | List MongoDB Atlas projects | low |
| atlas-load-sample-dataset | Load a MongoDB sample dataset into an Atlas cluster, or check the status of a previously-initiated load. To start a new load, provide clusterName — the load runs asynchronously and the response includes a jobId and initial state. To check progress, call this tool again with jobId (sample dataset loads typically take 1–5 minutes). State can be WORKING, COMPLETED, or FAILED. | medium |
| atlas-pause-resume-cluster | Pause or resume a dedicated (M10+) MongoDB Atlas cluster. | medium |
| atlas-streams-build | Create Atlas Stream Processing resources. Use this tool for 'set up a Kafka pipeline', 'create a workspace', 'add a connection', or 'deploy a processor'. Use resource='workspace' to create a new workspace (specify cloud provider, region, and tier). Use resource='connection' to add a data source or sink to an existing workspace. Use resource='processor' to deploy a stream processor with a pipeline. Use resource='privatelink' to set up private networking. Typical workflow: create workspace → add connections → deploy processor. | medium |
| atlas-streams-discover | Discover and inspect Atlas Stream Processing resources. Also use for 'why is my processor failing', 'what workspaces do I have', 'show processor stats', or 'check processor health'. Use 'list-workspaces' to see all workspaces in a project. Use inspect actions for details on a specific resource. Use 'diagnose-processor' for a combined health report including state, stats, connection health, and recent errors. Use 'get-networking' for PrivateLink and account details. | low |
| atlas-streams-manage | Manage Atlas Stream Processing resources: start/stop processors, modify pipelines, update configurations. Also use for 'change the pipeline', 'scale up my processor', or 'update my workspace tier'. Common workflow: action='stop-processor' → action='modify-processor' → action='start-processor'. Use atlas-streams-discover with action 'inspect-processor' to check state before managing. | medium |
| atlas-streams-teardown | Delete Atlas Stream Processing resources. Also use for 'remove my workspace', 'disconnect a source', 'delete all processors', or 'clean up my streams environment'. Performs basic safety checks before deletion: summarizes counts of processors and connections, highlights connections referenced by processors where possible, and surfaces API errors if processors are still running when deletion is attempted. Use atlas-streams-discover to review resources before deleting. | high |
| atlas-upgrade-cluster | Upgrade a MongoDB Atlas cluster tier. Upgrades Free (M0) clusters to Flex or M10 Dedicated, or Flex clusters to M10 Dedicated. The upgrade path is determined automatically from the current tier unless overridden with targetTier. Note to LLM: If provider and region are not already known, ask for both together in a single question before calling this tool. Common region mappings by provider (default recommendation: AWS US_EAST_1): | medium |
| atlas-local-connect-deployment | Connect to a MongoDB Atlas Local deployment | low |
| atlas-local-create-deployment | Create a MongoDB Atlas local deployment. Default image is preview. When the user does not specify an image tag, inform them that preview is used by default and provide this link for more information: https://hub.docker.com/r/mongodb/mongodb-atlas-local | medium |
| atlas-local-delete-deployment | Delete a MongoDB Atlas local deployment | high |
| atlas-local-list-deployments | List MongoDB Atlas local deployments | low |
| list-knowledge-sources | List available data sources in the MongoDB Assistant knowledge base. Use this to explore available data sources or to find search filter parameters to use in search-knowledge. | low |
| search-knowledge | Search for information in the MongoDB Assistant knowledge base. This includes official documentation, curated expert guidance, and other resources provided by MongoDB. Supports filtering by data source and version. | low |
| insert-document | Inserts a document into a collection. | medium |
| update-document | Updates a document in a collection. | medium |
| delete-document | Deletes a document from a collection. | medium |
| list-clusters | Lists MongoDB Atlas clusters. | low |
| create-cluster | Creates a new MongoDB Atlas cluster. | medium |
| list-indexes | Lists indexes for a specific collection. | low |
| infer-collection-schema | Infers the schema of a MongoDB collection. | low |
Compatibility
| Client | Local | Docker | Remote | Read-only |
|---|---|---|---|---|
| Claude Desktop | ||||
| Cursor | ||||
| VS Code | ||||
| Windsurf | ||||
| ChatGPT |
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.