MongoDB MCP Server
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.
Conectar
Añade esta configuración a .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>"
}
}
}
}Herramientas (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"
}
}
}Recursos
Este servidor no expone ningún recurso.
Prompts
Este servidor no expone ningún prompt.
Información del servidor
- Licencia
- Apache-2.0
- Versión
- 1.11.0
- Estrellas
- 1,000
- Última actualización
- 22 de mayo de 2026