MongoDB MCP Server
MongoDB's own server for querying, changing and administering databases and Atlas clusters
What it does
This is the MCP server MongoDB publishes as mongodb-mcp-server. Pointed at a connection string, it lets an assistant list databases and collections, read schemas and indexes, run find and aggregation queries, and, unless you restrict it, insert, update and delete documents and drop collections or whole databases. With Atlas service-account credentials it also exposes Atlas administration tools, which the README says only appear once those credentials are set. Two further tools search MongoDB's documentation.
The server writes by default. The README's own examples all add --readOnly, and we confirmed what that flag does: the tool list fell from 27 to 18, with every create, update, delete and drop tool gone. Some destructive tools ask for confirmation by default, but that depends on the client supporting the prompt.
Usage telemetry is sent to MongoDB unless you turn it off. For Atlas, MongoDB now recommends its hosted Atlas MCP server over OAuth instead of running this package; we tested only the local package.
Tools
Listed by starting the server ourselves on Nov 27, 2026. The grouping uses the server's own annotations.
Read-only · 18
aggregate-dbaggregatecollection-indexescollection-schemacollection-storage-sizeconnectcountdb-statsdisconnectexplainexportfindlist-collectionslist-connectionslist-databasesmongodb-logssearch-knowledgelist-knowledge-sources
Writes or acts · 3
create-collectioncreate-indexinsert-many
Marked destructive · 6
delete-manydrop-collectiondrop-databasedrop-indexrename-collectionupdate-many
Install
Launch command (any stdio client)
Tested Nov 27, 2026 on Linux arm64 container, Node.js 24, stdio test clientWe started the server with this command in a clean Linux container and confirmed it completes the MCP handshake and answers tools/list:
MDB_MCP_TELEMETRY=disabled MDB_MCP_CONNECTION_STRING="mongodb://localhost:27017/myDatabase" npx -y mongodb-mcp-server@latest --readOnly
Remove --readOnly only if the assistant should be able to write. We ran it with a placeholder connection string and with none; no database was connected, so no query tool was called. Use the same command and arguments in any client that launches local servers. We have not yet tested it inside a specific client.
Before you adopt it
6 of 6 key facts checked- Tools and what they can changeExactly what an agent can read, write or delete
- 27 tools when started with no credentials: 18 read-only, 3 that write, 6 marked destructive by the server. Destructive: delete-many, drop-collection, drop-database, drop-index, rename-collection, update-many. Writing but not marked destructive: create-collection, create-index, insert-many. Atlas administration tools are not in this count; the README says they are registered only when Atlas API credentials are set.Checked Nov 27, 2026 · source
- Required credentials and scopesLeast-privilege setup with no first-run failure
- None needed to start: it listed its tools with no connection string and no Atlas credentials. To do anything it needs either a MongoDB connection string (MDB_MCP_CONNECTION_STRING) or Atlas service-account credentials (MDB_MCP_API_CLIENT_ID and MDB_MCP_API_CLIENT_SECRET). The README recommends giving the service account the minimum permissions and passing secrets as environment variables, not command-line arguments, which can show up in process lists.Checked Nov 27, 2026 · source
- Tool-definition token costContext used on every request
- About 19,702 tokens for the 27 default tool definitions, and about 14,533 for the 18 left in read-only mode (size of the tools/list reply divided by four; an estimate, not a tokeniser count).Checked Nov 27, 2026 · source
- Package and versionThe exact package or image you will run, and who publishes it
- mongodb-mcp-server 3.4.0 on npm, published by MongoDB. The server reports itself as "MongoDB MCP Server" 3.4.0 in the handshake.Checked Nov 27, 2026 · source
- Where your data goesLocal only, or through the vendor's cloud; any telemetry
- Runs locally and connects directly to the database or to the Atlas API. Telemetry is on by default and sends usage data to MongoDB; turn it off with MDB_MCP_TELEMETRY=disabled or --telemetry disabled. The two knowledge-search tools query MongoDB's hosted knowledge service (default base URL knowledge.mongodb.com).Checked Nov 27, 2026 · source
- Last releaseThe spec and upstream APIs change fast
- v3.4.0 · Nov 24, 2026Checked Nov 27, 2026 · source
- Resources and promptsWhat it exposes beyond tools
- 2 resources listed in our run and no prompts. The README documents a redacted config resource, a connectivity debug resource and a template for reading exported query results.Checked Nov 27, 2026 · source
- Runtime requirementsNode, Python, Docker, operating system
- Node.js 22.13.0 or later. The README says Node 20 support is deprecated and will be removed. A Docker image is also documented.Checked Nov 27, 2026 · source
- Read-only modeSafe use against production data
- Yes: --readOnly or MDB_MCP_READ_ONLY=true. The README says tools with create, update or delete operation types are then not registered at all, and in our run the list went from 27 tools to 18. Individual tools or categories can also be switched off with --disabledTools, and --indexCheck rejects queries that would scan a whole collection.Checked Nov 27, 2026 · source
- Security recordProvenance and published advisories
- By default these tools ask for confirmation before running: drop-database, drop-collection, delete-many, drop-index and four Atlas tools. Aggregations containing $out or $merge stages also ask first. The README shows how to disable the prompts for unattended agents and advises doing that only together with read-only mode or a disabled-tools list.Checked Nov 27, 2026 · source
