Skip to directory

MongoDB MCP

MongoDB

stdio (local); remote MCP (Atlas Managed; client setup documented by MongoDB)11+ documented tools19

About MongoDB MCP

MongoDB's MCP offering connects AI clients to MongoDB database deployments and Atlas resources. It is available as a locally run server and as a separately managed Atlas-hosted server; available tools differ by deployment mode and configuration.

What you can use it for

  • Explore MongoDB databases and collections using natural language
  • Run queries, aggregations, and inspect collection schemas
  • Manage Atlas organizations, projects, clusters, and related resources when configured
  • Search official MongoDB documentation through assistant knowledge tools
Connection and setup
Hosting
Both: local server and MongoDB Atlas Managed MCP Server
Transport
stdio (local); remote MCP (Atlas Managed; client setup documented by MongoDB)
Endpoint
Local process; no hosted endpoint documented
Authentication
Local server uses a MongoDB connection string for database access and optional Atlas service-account API credentials for Atlas management tools. Atlas Managed uses MongoDB Atlas authentication/App Connections and the user's permitted Atlas access.

Requirements

  • MongoDB deployment and connection URI for local database access
  • Node.js 22.12 or later recommended for local setup
  • Atlas account / service account credentials only for Atlas management functions that require them
  • Docker required for local Atlas deployment tools
  • Enable read-only mode unless write access is specifically needed

Setup steps

  1. Choose between MongoDB Atlas Managed MCP and Local MCP; they are distinct deployment modes with different tool availability.
  2. For local mode, use MongoDB's guided setup: `npx mongodb-mcp-server@latest setup`, or follow the documented Docker setup.
  3. Select the intended MCP client, enable read-only mode unless writes are needed, and provide the MongoDB URI through local configuration. Never paste the URI or credentials into chat.
  4. Add optional Atlas service-account credentials only if using Atlas administration tools; grant the minimum documented permissions.
  5. For Atlas Managed mode, configure MongoDB Atlas App Connections in a supported client and complete the Atlas sign-in/authorization flow.
  6. Verify using a read-only query such as listing databases or a bounded `find` request.
Tools 11+

MongoDB documents separate Atlas, local Atlas deployment, database, and Assistant tool families. Availability differs by Atlas Managed versus Local mode and configured credentials. The stored exact names are representative and are not a complete merged inventory.

  • find

    Run a MongoDB database query.

    01
  • aggregate

    Run an aggregation pipeline.

    02
  • count

    Count documents in a collection.

    03
  • collection-schema

    Inspect a collection schema (listed by official getting-started documentation).

    04
  • insert-many

    Insert documents into a collection.

    05
  • update-one

    Modify one document.

    06
  • atlas-list-orgs

    List Atlas organizations.

    07
  • atlas-list-projects

    List Atlas projects.

    08
  • atlas-list-clusters

    List Atlas clusters.

    09
  • list-knowledge-sources

    List data sources for MongoDB Assistant knowledge.

    10
  • search-knowledge

    Search MongoDB Assistant knowledge sources.

    11

This server’s available tools can vary by account, permissions, or configuration. The list shown is not its full runtime catalog.

Limitations and notes
  • Exact tools depend on deployment mode, credentials, read-only settings, and enabled configuration.
  • Database tools can insert, update, or delete data when write access is enabled; use read-only mode unless writes are needed.
  • Atlas performance-advisor tools have documented Atlas role and cluster-tier requirements.
  • Connection strings and service-account secrets must remain local and must not be exposed in prompts or logs.
Original sources
  • official tool reference

    MongoDB’s official reference separates Atlas management, local Atlas deployments, database operations, and Assistant knowledge tools. Tool availability differs between Atlas Managed and Local deployments and depends on configured credentials; the 11 stored names are representative, not a complete merged catalog.

  • official documentation or source

    MongoDB’s official reference separates Atlas management, local Atlas deployments, database operations, and Assistant knowledge tools. Tool availability differs between Atlas Managed and Local deployments and depends on configured credentials; the 11 stored names are representative, not a complete merged catalog.

Documentation checked 2026-10-28T12:38:00.000Z. Connection has not been runtime tested.