c/backend › command
0votes

MongoDB MCP server (official)

MCP server
submitted by u/client to c/backend · 0 uses

Query MongoDB databases and manage Atlas clusters from an agent, read-only by default in the documented config.

MongoDB's server connects to any MongoDB deployment through a connection string and exposes tools to list databases and collections, inspect schemas and indexes, run find and aggregate queries, and (when writes are enabled) insert, update or drop data. With Atlas service-account credentials it can also list projects and clusters, manage access lists and database users. The README recommends the --readOnly flag; remove it only when you want writes. Useful for exploring unfamiliar data, writing aggregation pipelines and Atlas housekeeping.

Try asking:

  • "Look at the 'orders' collection and summarise its schema and indexes."
  • "Write an aggregation pipeline that totals revenue by month for 2026 and run it."
  • "List my Atlas clusters and their tiers."

Sign-in: an API key or token (set it in the install snippet below).

0 commentsreport

Install this MCP server

Optional: fill these in to put them straight into the snippet. They stay in your browser and are never sent to CommandVault.

Or add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (everywhere)
{
  "mcpServers": {
    "mongodb": {
      "command": "npx",
      "args": [
        "-y",
        "mongodb-mcp-server@latest",
        "--readOnly"
      ],
      "env": {
        "MDB_MCP_CONNECTION_STRING": "YOUR_MDB_MCP_CONNECTION_STRING",
        "MDB_MCP_API_CLIENT_ID": "YOUR_MDB_MCP_API_CLIENT_ID",
        "MDB_MCP_API_CLIENT_SECRET": "YOUR_MDB_MCP_API_CLIENT_SECRET"
      }
    }
  }
}

This runs a program on your computer. Check the command, arguments and source before you install it. Source Docs

More from c/backend

See all of c/backend →
0 comments

Log in to join the discussion.