MongoDB MCP Server

Databasestdiohttp-streamingv1.11.0
Repository

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.

Bağlan

Bu yapılandırmayı şuraya ekleyin: .claude/mcp.json

Taşıma:
{
  "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>"
      }
    }
  }
}

Araçlar (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"
    }
  }
}

Kaynaklar

Bu sunucu herhangi bir kaynak sunmuyor.

Prompt'lar

Bu sunucu herhangi bir prompt sunmuyor.

Sunucu bilgileri

Yazar
MongoDB (@mongodb-js)
Repository
https://github.com/mongodb-js/mongodb-mcp-server
Lisans
Apache-2.0
Sürüm
1.11.0
Yıldızlar
1,000
Son güncelleme
22 Mayıs 2026