MongoDB MCP Server

Databasestdiohttp-streamingv1.11.0
Репозиторий

Official MCP server for interacting with MongoDB databases and MongoDB Atlas. Enables AI agents to query collections, run aggregations, manage indexes, inspect schemas, and perform CRUD operations. Also supports Atlas cloud management including cluster provisioning, database user management, performance advisor, and stream processing. Supports read-only mode for safe exploration.

Подключение

Добавьте эту конфигурацию в .claude/mcp.json

Подключение:
{
  "mcpServers": {
    "mongodb": {
      "command": "npx",
      "args": [
        "-y",
        "mongodb-mcp-server",
        "--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>"
      }
    }
  }
}

Инструменты (6)

find

Run a find query against a MongoDB collection with optional filter, projection, sort, and limit.

{
  "type": "object",
  "required": [
    "database",
    "collection"
  ],
  "properties": {
    "sort": {
      "type": "object",
      "description": "Sort specification"
    },
    "limit": {
      "type": "integer",
      "description": "Maximum number of documents to return"
    },
    "filter": {
      "type": "object",
      "description": "MongoDB query filter document"
    },
    "database": {
      "type": "string",
      "description": "Database name"
    },
    "collection": {
      "type": "string",
      "description": "Collection name"
    },
    "projection": {
      "type": "object",
      "description": "Fields to include or exclude"
    }
  }
}

aggregate

Run an aggregation pipeline against a MongoDB collection.

{
  "type": "object",
  "required": [
    "database",
    "collection",
    "pipeline"
  ],
  "properties": {
    "database": {
      "type": "string",
      "description": "Database name"
    },
    "pipeline": {
      "type": "array",
      "description": "Array of aggregation pipeline stages"
    },
    "collection": {
      "type": "string",
      "description": "Collection name"
    }
  }
}

list-databases

List all databases on the connected MongoDB instance.

{
  "type": "object",
  "properties": {}
}

list-collections

List all collections in a given database.

{
  "type": "object",
  "required": [
    "database"
  ],
  "properties": {
    "database": {
      "type": "string",
      "description": "Database name"
    }
  }
}

collection-schema

Infer and describe the schema for a MongoDB collection by sampling documents.

{
  "type": "object",
  "required": [
    "database",
    "collection"
  ],
  "properties": {
    "database": {
      "type": "string",
      "description": "Database name"
    },
    "collection": {
      "type": "string",
      "description": "Collection name"
    }
  }
}

insert-many

Insert an array of documents into a MongoDB collection.

{
  "type": "object",
  "required": [
    "database",
    "collection",
    "documents"
  ],
  "properties": {
    "database": {
      "type": "string",
      "description": "Database name"
    },
    "documents": {
      "type": "array",
      "description": "Array of documents to insert"
    },
    "collection": {
      "type": "string",
      "description": "Collection name"
    }
  }
}

Ресурсы

Этот сервер не предоставляет ресурсы.

Промпты

Этот сервер не предоставляет промпты.

Сведения о сервере

Автор
MongoDB (@mongodb-js)
Репозиторий
https://github.com/mongodb-js/mongodb-mcp-server
Лицензия
Apache-2.0
Версия
1.11.0
Звёзды
1,000
Последнее обновление
22 мая 2026 г.