MongoDB MCP Server 🔌 MCP server Free
Official MongoDB and Atlas MCP server
- GitHub stars
- 1.1k
- Stars this week
- +1
- Forks
- 296
- Licence
- Apache-2.0
- Last push
- 2026-10-01
- Maintainer
- mongodb-js
Third-party MCP servers run with your permissions. Read the source before installing, and prefer pinned versions.
Works with
Built on the open MCP standard, so it works in every app that supports MCP.
About MongoDB MCP Server
What it does
MongoDB MCP Server is MongoDB's official server for connecting AI agents to MongoDB databases and Atlas, MongoDB's cloud service. With a connection string, the agent can explore databases and collections, infer a collection's schema, run finds and aggregations, check indexes and query plans, and, if you allow it, insert, update or delete data. With Atlas service-account credentials, it can also manage Atlas itself: create projects and clusters, including free ones, set up database users and IP access lists, and read Performance Advisor suggestions. The project is Apache-2.0 licensed.
Tools it gives your agent
- Database:
find,aggregate,count,collection-schema,collection-indexes,explain,export, plus insert, update, delete, create and drop tools - Atlas: list and create projects and clusters,
atlas-create-free-cluster, database users, access lists, alerts, Performance Advisor and Stream Processing - Atlas Local: create and connect to local Atlas deployments
- Assistant: search MongoDB's documentation and knowledge base
Works with
The local server runs through npx and needs Node.js 22.13 or newer. It works with any MCP client, and MongoDB's docs cover Claude Desktop, Cursor, Codex, Devin and others. MongoDB also runs a hosted Atlas MCP server that you sign in to with OAuth. There are official plugins for Claude, Cursor, VS Code, Codex, Copilot CLI, Gemini and Grok: mongodb-atlas connects to the hosted server, and mongodb runs the local one.
How to connect
Interactive setup:
npx -y mongodb-mcp-server@latest setup
Or add it to your client's config, read-only:
{ "mcpServers": { "MongoDB": { "command": "npx", "args": ["-y", "mongodb-mcp-server@latest", "--readOnly"], "env": { "MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/myDatabase" } } } }
Cost and limits
The server is free. Costs depend on your MongoDB deployment. Atlas has a free cluster tier, but tools such as atlas-create-cluster can create paid clusters.
Safety notes
Use --readOnly or MDB_MCP_READ_ONLY=true, which the README's own examples do by default. It blocks every create, update and delete tool. You can turn off specific tools or whole categories with --disabledTools. Give the Atlas service account the minimum roles it needs, and pass secrets as environment variables, not command-line arguments. The local server has no authentication, so never expose it on a network. Telemetry is on by default. Turn it off with MDB_MCP_TELEMETRY=disabled or DO_NOT_TRACK=1.
Pros
- Official
- Read-only mode
Cons
- MongoDB-specific
Similar MCP servers
All database & backend MCP servers →Supabase MCP 🔌 MCP serverFreemium
Manage Supabase projects, databases, migrations and edge functions from your agent
Neon MCP 🔌 MCP serverFreemium
Neon's MCP server: manage serverless Postgres with natural language
🔥 Startups: up to $200K (VC-backed) in creditsQdrant MCP Server 🔌 MCP serverOpen source
Official Qdrant server that gives agents a semantic memory: store and search text in a vector DB
🔥 Qdrant for Startups: 20% off Qdrant Cloud for 12 months (pre-seed/seed/Series A, under 5 years old, <$5M raised)OpenViking 🔌 MCP serverOpen source
Open-source context database giving agents shared memory, resources and skills
MCP Server for MySQL 🔌 MCP serverOpen source
Read-only-by-default MySQL access with opt-in writes, SSH tunnels and PII masking