Back
Directory/MongoDB

TL;DR

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.

🍃

MongoDB

Verified 7 tools

Databases

Last updated August 9, 2026 · By MCPizy team

MongoDB Atlas database operations

Official homepage
A

Repo audit: 94/100 — actively maintained, documented and licensed

Scored 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 CheckMCP

Install MongoDB

Via MCPizy CLI (recommended):
mcpizy install mongodb
Or run directly:
npx -y mongodb-mcp-server
View on GitHub

Tools exposed

7 tools available
find

Run a find query on a collection

Inputs

  • databasestringrequired
  • collectionstringrequired
  • filterobjectoptional
aggregate

Run an aggregation pipeline on a collection

Inputs

  • databasestringrequired
  • collectionstringrequired
  • pipelineobject[]required
insert_many

Insert multiple documents into a collection

Inputs

  • databasestringrequired
  • collectionstringrequired
  • documentsobject[]required
update_many

Update documents that match a filter

Inputs

  • filterobjectrequired
  • updateobjectrequired
delete_many

Delete documents that match a filter

Inputs

  • filterobjectrequired
list_databases

List all databases on the cluster

list_collections

List collections in a database

Inputs

  • databasestringrequired

Configuration

Works identically across clients. Only the config file path differs.

Claude Code~/.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.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]"
      }
    }
  }
}
Windsurf~/.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]"
      }
    }
  }
}

Authentication setup

  1. 1

    Create a database user with readWrite access

    Get it MDB_MCP_CONNECTION_STRING
  2. 2

    Add your IP (or 0.0.0.0/0 for dev) to the Network Access allowlist

    Get it

What you can do with MongoDB MCP

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

Works with

Claude Code
Claude Desktop
Cursor
Windsurf
VS Code + Copilot
Any MCP Client

More Databases MCPs

⚡

DynamoDB

AWS DynamoDB NoSQL database operations

🐬

MariaDB

MariaDB relational database server

🪳

CockroachDB

Distributed SQL database for cloud apps

🗃️

SQLite

Local SQLite database access and management

Alternatives to MongoDB

If MongoDB doesn't fit your stack, these Databases MCP servers solve similar problems.

🔵

Neo4j

Graph database queries

🔍

Elasticsearch

Full-text search and analytics engine

🎯

Qdrant

Vector similarity search engine

Key Takeaways

  • MongoDB exposes 7 tools for databases workflows in Claude Code, Cursor and Windsurf.
  • Authentication: 2 steps (MDB_MCP_CONNECTION_STRING).
  • Install in 1 command: mcpizy install mongodb — config written to your client automatically.
  • Free and open source (GitHub source linked above) — verified compatible with every MCP client (Claude Code, Claude Desktop, Cursor, Windsurf, VS Code + Copilot).
  • Best use case: "Show me the 10 most recent documents in the `users` collection".

Frequently asked questions

What is the MongoDB MCP server?

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.

How do I install MongoDB MCP with Claude Code?

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.

Is MongoDB MCP free?

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.

Does MongoDB MCP work with Cursor and Windsurf?

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.

What can I do with MongoDB MCP?

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.

Manage all your MCPs in one place

Monitor usage, track costs, and discover new MCPs.

Get Started Free