MongoDB MCP Server
MongoDB's officially maintained MCP server covers both database operations and Atlas cloud management: querying documents, analysing collection structure, inspecting indexes, and administering Atlas clusters and users.
Schema exploration is especially valuable here — document databases have no fixed schema, so "what fields do documents in this collection actually have?" normally means sampling by hand. The AI just works it out.
What it does for you
Connects your AI to MongoDB — query collections, run aggregations, inspect document shapes, in plain language instead of query syntax.
Capabilities
- Query collections with filters
- Run aggregations
- Inspect collection structure and indexes
Once installed, try asking your AI
Say this directly in Claude / Cursor or any client with this server connected
- ›“Count orders per country in the orders collection”
- ›“Find active users who haven't logged in for the last 7 days”
Install / Connect
claude mcp add mongodb-mcp-server -- npx -y mongodb-mcp-serverFollow the official README; env and args vary per server.
Works with these clients
- Claude Desktopnpx
- Claude Codenpx
- Cursornpx
- VS Codenpx
- Windsurfnpx
Derived from the registry manifest (package type and transport) — we have not installed it ourselves. Check the official README before relying on it.
Why use it
Good for: developers on MongoDB or Atlas, particularly when inheriting someone else's database and needing to understand its shape first.
Before connecting: read-only mode is supported — enable it for production. Atlas management touches cluster operations, so scope those permissions even more tightly.
Similar / alternative servers
spotify-mcp
MCP to connect your LLM with Spotify.
io.github.googleapis/mcp-toolbox
MCP Toolbox for Databases
postman-mcp-server
Postman MCP Server — connect AI agents (Claude Code, Cursor, VS Code Copilot, Ge
@pinecone-database/mcp
Connect your Pinecone projects to Cursor, Claude, and other AI assistants
Frequently Asked Questions
Does it support self-hosted MongoDB as well as Atlas?
Both. Self-hosted uses a connection string; Atlas management needs an Atlas API key.
Can it be locked to read-only?
Yes, the server offers a read-only configuration — recommended for production.