MongoDB MCP Server
Query MongoDB collections and manage Atlas clusters, database users and access lists.
Officialby MongoDBHosted or on your computerChecked November 8, 2026
MongoDB's official MCP server lets Claude find and aggregate documents, inspect schemas and indexes, and manage Atlas projects, clusters and database users. You can use the Atlas Managed MCP Server that MongoDB hosts, connected through MongoDB's plugin with your Atlas sign-in, or run the open-source server locally with a connection string. The local server allows writes by default, and MongoDB recommends turning on read-only mode unless you need them.
Who is MongoDB MCP for?
- Developers building on MongoDB or Atlas
- Teams exploring document data in plain English
- Atlas administrators
What can you ask MongoDB MCP to do?
Once it is connected, ask in plain words. Your AI tool decides when to use the server and asks before it changes anything important.
Show me the schema of the orders collection and the indexes it has.Find the ten customers with the highest total order value this year.Create a free Atlas cluster called staging and a read-only database user for it.How to connect MongoDB to Claude
MCP is an open standard. The setup steps below cover this server in Claude Code, Claude app, Codex, ChatGPT, Cursor, VS Code, Gemini CLI, Antigravity, OpenCode, Windsurf. Pick your tool:
New to MCP? Read what an MCP server is and how to add one.
Connect the MongoDB MCP server to Claude Code for me: run this command: claude mcp add --transport stdio mongodb --env MDB_MCP_CONNECTION_STRING=YOUR_CONNECTION_STRING -- npx -y mongodb-mcp-server@latest --readOnly
If a value starts with YOUR_, ask me for it first. When it is connected, help me sign in if needed and show me one thing I can ask it to do.Or do it yourself:
claude mcp add --transport stdio mongodb --env MDB_MCP_CONNECTION_STRING=YOUR_CONNECTION_STRING -- npx -y mongodb-mcp-server@latest --readOnlyType /mcp inside Claude Code, pick the server and choose Authenticate to sign in.
Hosted address: https://mcp.mongodb.com
Unlock the setup steps
Free. Leave your email once to open the setup steps for all 152 servers, and get the best new connectors each month.
Good to know
The hosted Atlas server works only after an organization owner turns on AI client access under App Connections. In Claude Code, MongoDB recommends its plugins: /plugin install mongodb-atlas@claude-plugins-official for the hosted server, or /plugin install mongodb@claude-plugins-official for the local one.
How did we check MongoDB MCP?
Checked on November 8, 2026: MongoDB's MCP docs (get started, AI client access, rate limits, read-only mode and tools), the mongodb-js/mongodb-mcp-server repo (Apache-2.0, 1,158 stars, release v3.2.2 on November 4, 2026) and its npm package. A test MCP initialize request to https://mcp.mongodb.com returned HTTP 401 (Unauthorized), the expected answer before sign-in.
What do people ask about MongoDB MCP?
Which Mongo MCP server should I use, hosted or local?
Use the Atlas Managed MCP Server if your data is in Atlas: MongoDB runs it, you sign in through the plugin, and you handle no connection strings. Run the local server for self-managed MongoDB or when you want to work from a connection string; it needs Node.js or Docker and can also create local Atlas deployments for testing.
Why can't I connect to the hosted MongoDB Atlas server?
AI client access is off by default for existing Atlas organizations. An organization owner turns it on in the organization settings under App Connections and picks a mode: Read, Read and write, or Disabled.
Can I give Claude read-only access to MongoDB?
Yes. On the local server, start it with --readOnly or set MDB_MCP_READ_ONLY=true, because writes are allowed by default. On the hosted server, the organization's Read mode hides the write tools, and a user's own Atlas role still caps what any AI client can do.
How long does hosted access last, and are there rate limits?
Access ends after 7 days without use or 30 days after you granted it, whichever comes first, and an organization owner can shorten that. The hosted server allows 500 requests per minute per user and 2,000 per IP address, and MongoDB says these limits may change.
We wrote these answers from the official pages of each product named, read on November 8, 2026.
More database servers
Building a site around tools like MongoDB? Our Builders course, in early access, covers planning, design without a designer, launch and getting found on Google.