Skip to content
Agent Search Engine.

Record · mongodb-mcp-MCP serverOpen sourceVerified Sep 23, 2026

MongoDB MCP Server

MongoDB's official MCP server for querying databases and managing Atlas clusters from AI agents.

Sources and review

Checked against public documentation on . Suitability guidance is our editorial judgment; this is not a performance benchmark or an endorsement.

Best for

Exploring collections, writing queries and managing Atlas from an AI coding assistant.

About MongoDB MCP Server

MongoDB's official MCP server connects AI agents to MongoDB databases and MongoDB Atlas. It runs locally against any self-managed deployment, optionally in read-only mode, and ships in official MongoDB plugins for Cursor, VS Code, Claude, Codex and GitHub Copilot CLI; MongoDB recommends its hosted Atlas MCP server over OAuth for Atlas users.

MongoDB MCP Server is an open-source project written primarily in TypeScript, with 1.1k stars on GitHub. It was last updated in September 2026.

Add MongoDB MCP Server to your MCP client

Generated from the launch command in the project's README. Your client starts the server on demand.

Claude CodeRun in your terminal
claude mcp add mongodb-mcp-server -e MDB_MCP_CONNECTION_STRING=mongodb://localhost:27017/myDatabase -- npx -y mongodb-mcp-server@latest --readOnly
Cursor~/.cursor/mcp.json or .cursor/mcp.json
{
  "mcpServers": {
    "mongodb-mcp-server": {
      "command": "npx",
      "args": ["-y", "mongodb-mcp-server@latest", "--readOnly"],
      "env": {
        "MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/myDatabase"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "mongodb-mcp-server": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "mongodb-mcp-server@latest", "--readOnly"],
      "env": {
        "MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/myDatabase"
      }
    }
  }
}
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "mongodb-mcp-server": {
      "command": "npx",
      "args": ["-y", "mongodb-mcp-server@latest", "--readOnly"],
      "env": {
        "MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/myDatabase"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.mongodb-mcp-server]
command = "npx"
args = ["-y", "mongodb-mcp-server@latest", "--readOnly"]
env = { MDB_MCP_CONNECTION_STRING = "mongodb://localhost:27017/myDatabase" }

Check the project's README for required accounts, keys and permissions before connecting. Setup guide for each client →

For agent buildersMake your product part of the discovery.Explore advertising

MongoDB MCP Server vs. the alternatives

All 163 alternatives →
RecordStarsPricing
MongoDB MCP ServerMCP serverthis listing1.1kOpen source
MCP Reference ServersMCP server91kOpen source
context7MCP server62kOpen source
chrome-devtools-mcpMCP server53kOpen source
Playwright MCPMCP server37kOpen source
github-mcp-serverMCP server33kOpen source

See all 163 MongoDB MCP Server alternatives, compared →