MCP Catalogs
Home

mongodb-mcp-server

by mongodb-js·1,023·Score 55

MongoDB MCP Server connects to MongoDB databases and Atlas clusters, offering tools for database operations and Atlas management.

databasedeveloper-toolscloud-storage
241
Forks
30
Open issues
this month
Last commit
2d ago
Indexed

Overview

The MongoDB MCP Server is a comprehensive implementation for interacting with MongoDB databases through the Model Context Protocol. It provides three categories of tools: MongoDB Atlas tools for cluster management, MongoDB database tools for CRUD operations, and MongoDB Assistant tools for advanced functionalities. The server supports multiple authentication methods including direct connection strings and Atlas API credentials, with built-in security features like read-only mode.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:AI agents querying and analyzing MongoDB databases without direct database access
you:Automating MongoDB Atlas cluster management through MCP-enabled clients
you:Building RAG applications that can access MongoDB data as contextual resources
you:Can this MCP server connect to both local MongoDB instances and Atlas clusters?
you:Is there a read-only mode available?

When to choose this

Choose this when working with MongoDB databases or Atlas clusters and need secure AI access to your data without building custom integrations.

When NOT to choose this

Avoid if you need write access by default (must explicitly remove readOnly flag) or if you require support for non-MongoDB databases.

Tools this server exposes

12 tools extracted from the README
  • query_database

    Execute queries against MongoDB databases

  • create_document

    Create a new document in a MongoDB collection

  • update_document

    Update an existing document in a MongoDB collection

  • delete_document

    Delete documents from a MongoDB collection

  • list_databases

    List available MongoDB databases

  • list_collections

    List collections in a MongoDB database

  • create_index

    Create an index in a MongoDB collection

  • get_atlas_clusters

    Retrieve MongoDB Atlas clusters

  • create_atlas_cluster

    Create a new MongoDB Atlas cluster

  • get_atlas_performance

    Get performance metrics for Atlas clusters

  • get_atlas_alerts

    Retrieve Atlas alerts

  • get_database_stats

    Get statistics for a MongoDB database

Note: Tool names and descriptions were inferred from the README's structure and categories (MongoDB Atlas Tools, MongoDB Database Tools, MongoDB Assistant Tools) but exact function signatures weren't provided in the documentation. The README ment

Comparable tools

supabase-mcpneon-mcppostgres-mcpredis-mcp

Installation

Installation

Via NPM (for Claude Desktop)

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

Via Docker

{
  "mcpServers": {
    "MongoDB": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-e",
        "MDB_MCP_READ_ONLY=true",
        "-i",
        "mongodb/mongodb-mcp-server:latest"
      ]
    }
  }
}

FAQ

Can this MCP server connect to both local MongoDB instances and Atlas clusters?
Yes, it supports connecting to both local MongoDB instances using connection strings and MongoDB Atlas clusters using either connection strings or Atlas API credentials.
Is there a read-only mode available?
Yes, the server includes a --readOnly flag that can be added to command arguments to ensure safe, read-only access to your data.

Compare mongodb-mcp-server with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.