Skip to main content
Watch: I Built an AI App Without Leaving Databricks

Databases - official MongoDB server

MongoDB MCP server

Self-run MCP server for querying and managing MongoDB databases (Atlas, Atlas Local, Community and Enterprise) and, with Atlas service account credentials, administering Atlas clusters, users, access lists and stream processing. Runs via npx or Docker. It runs locally from mongodb-mcp-server (npm) with API key auth.

Last verified 15 tools6 sources

Install

Snippet
/plugin install mongodb@claude-plugins-official
Terminal
codex plugin marketplace add mongodb/agent-skills

Generic

JSON
{
  "mcpServers": {
    "MongoDB": {
      "command": "npx",
      "args": ["-y", "mongodb-mcp-server@latest", "--readOnly"],
      "env": {
        "MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/myDatabase"
      }
    }
  }
}

Tools

find
Run a find query against a MongoDB collection.
aggregate
Run an aggregation against a MongoDB collection.
collection-schema
Describe the schema for a collection.
collection-indexes
Describe the indexes for a collection.
create-index
Create an index for a collection.
insert-many
Insert an array of documents into a MongoDB collection.
update-many
Updates all documents that match the specified filter for a collection.
delete-many
Removes all documents that match the filter from a MongoDB collection.
explain
Returns statistics describing the execution of the winning query plan.
list-databases
List all databases for a MongoDB connection.
export
Export a query or aggregation results in the specified EJSON format.
atlas-list-clusters
List MongoDB Atlas clusters.
atlas-create-free-cluster
Create a free MongoDB Atlas cluster.
atlas-get-performance-advisor
Get Atlas Performance Advisor recommendations and recent slow query logs.
search-knowledge
Search the MongoDB Assistant knowledge base of official documentation and expert guidance.

As documented on October 17, 2026. A running server reports its current list through tools/list.

Notes and caveats

  • Latest npm release 3.1.0 published 2026-10-15.
  • Requires Node.js 22.12 or later per the docs (README says 22.13; Node 20 support deprecated).
  • Auth is a MongoDB connection string and/or Atlas service account client ID and secret (Atlas tools only appear when Atlas credentials are set).
  • Default examples use --readOnly.
  • Transport defaults to stdio; --transport http is also supported.
  • Interactive setup: npx -y mongodb-mcp-server@latest setup.
  • Claude Code and Codex entries are the documented plugin installs (Claude Code then runs the /mongodb:mongodb-mcp-setup skill; Codex then installs mongodb from /plugins).
  • Cursor and VS Code are documented as marketplace or one-click installs, not config snippets.
  • Atlas Local tools need Docker.
  • Not supported on Atlas Infinite clusters during that product's public preview.
  • Originally announced in public preview (2025); current docs carry no lifecycle label, so status is left unknown.

FAQ

What does the MongoDB MCP server do?

Self-run MCP server for querying and managing MongoDB databases (Atlas, Atlas Local, Community and Enterprise) and, with Atlas service account credentials, administering Atlas clusters, users, access lists and stream processing. Runs via npx or Docker. The vendor documents 15 tools, including find, aggregate, collection-schema and collection-indexes.

How do I add the MongoDB MCP server to Claude Code?

Run /plugin install mongodb@claude-plugins-official, copied from MongoDB's docs. This page also has snippets for Codex and Generic.

Does the MongoDB MCP server need authentication?

Yes, API key. Transport: stdio, Streamable HTTP. Status: Unlabelled, last checked October 17, 2026.

Sources

Last verified against 6 MongoDB pages, then re-checked independently.

Newsletter

New MCP servers, the week they ship

One email per week. New official MCP servers, the coding tools that support them and how developers wire them up.