MongoDB is a Databases MCP server that lets Claude Code, Cursor, Windsurf and any MCP-compatible AI agent mongoDB Atlas database operations. Install in 1 minute with mcpizy install mongodb.
Databases
MongoDB Atlas database operations
Official homepageScored on licence, adoption, maintenance and documentation of mongodb-js/mongodb-mcp-server. We show the grade whether it flatters the server or not.
last commit today · 1,094 stars · Apache-2.0 licence · 31 open issues
Read the full audit on CheckMCPmcpizy install mongodbnpx -y mongodb-mcp-serverfindRun a find query on a collection
Inputs
databasestringrequiredcollectionstringrequiredfilterobjectoptionalaggregateRun an aggregation pipeline on a collection
Inputs
databasestringrequiredcollectionstringrequiredpipelineobject[]requiredinsert_manyInsert multiple documents into a collection
Inputs
databasestringrequiredcollectionstringrequireddocumentsobject[]requiredupdate_manyUpdate documents that match a filter
Inputs
filterobjectrequiredupdateobjectrequireddelete_manyDelete documents that match a filter
Inputs
filterobjectrequiredlist_databasesList all databases on the cluster
list_collectionsList collections in a database
Inputs
databasestringrequiredWorks identically across clients. Only the config file path differs.
~/.claude.json{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"mongodb-mcp-server",
"--connectionString",
"${MDB_MCP_CONNECTION_STRING}"
],
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb+srv://user:[email protected]"
}
}
}
}.cursor/mcp.json{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"mongodb-mcp-server",
"--connectionString",
"${MDB_MCP_CONNECTION_STRING}"
],
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb+srv://user:[email protected]"
}
}
}
}~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"mongodb-mcp-server",
"--connectionString",
"${MDB_MCP_CONNECTION_STRING}"
],
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb+srv://user:[email protected]"
}
}
}
}Create a database user with readWrite access
MDB_MCP_CONNECTION_STRINGAdd your IP (or 0.0.0.0/0 for dev) to the Network Access allowlist
Paste any of these prompts into Claude Code, Cursor or another MCP-compatible client.
“Show me the 10 most recent documents in the `users` collection”
Uses: find
“How many orders were placed this month, grouped by status?”
Uses: aggregate
“Delete all test documents where `env = 'staging'`”
Uses: delete_many
“List every collection in the `production` database”
Uses: list_collections
If MongoDB doesn't fit your stack, these Databases MCP servers solve similar problems.
The MongoDB MCP server is an Databases Model Context Protocol server that lets Claude Code, Cursor, Windsurf, VS Code with Copilot, and other MCP-compatible AI agents mongoDB Atlas database operations. It exposes MongoDB's capabilities as tools the AI can call directly from your editor or CLI.
The fastest way is the MCPizy CLI: run `mcpizy install mongodb` and MCPizy will add the server to your `.claude.json` automatically. You can also install it manually by adding an entry under `mcpServers` in `.claude.json` with the command `npx -y mongodb-mcp-server` and restarting Claude Code.
Yes. The MongoDB MCP server is free and open source (see the GitHub repository linked on this page). You may still need a MongoDB account or API key to connect the server to the underlying service, but the MCP layer itself has no MCPizy subscription cost.
Yes. Any MCP-compatible client works — including Claude Code, Claude Desktop, Cursor (via `.cursor/mcp.json`), Windsurf, VS Code with Copilot Chat, and custom agents built on the MCP SDK. The same install command targets all of them; only the config file path differs.
Once installed, your AI agent can mongoDB Atlas database operations directly inside your conversation. Typical use cases include asking Claude Code or Cursor to run MongoDB operations, inspect results, chain MongoDB with other MCP servers (see our Workflow Recipes), and automate repetitive databases tasks without leaving your editor.