MongoDB MCP Server
@MCP-Mirror
About MongoDB MCP Server
Mirror of
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"@pash1986/mcp-server-mongodb"
],
"env": {
"MONGODB_URI": ""
}
}
}
}Tools
2Execute MongoDB aggregation pipelines against the connected database
Get execution plans for aggregation pipelines
Overview
What is MongoDB MCP Server?
A Model Context Protocol server that provides read-only access to MongoDB databases. It enables LLMs to inspect collection schemas and execute aggregation pipelines.
How to use MongoDB MCP Server?
Add the server configuration to the mcpServers section of your claude_desktop_config.json, using npx -y @pash1986/mcp-server-mongodb and setting the MONGODB_URI environment variable to your connection string.
Key features of MongoDB MCP Server
- Execute MongoDB aggregation pipelines against connected databases
- Get execution plans for aggregation pipelines
- Automatic limit of 1000 documents if no limit stage is specified
- Default timeout of 30 seconds for all operations
- Provides inferred JSON schema information for each collection
- Read‑only operations only for safety
Use cases of MongoDB MCP Server
- LLMs querying MongoDB collections using aggregation pipelines
- Inspecting collection schemas to understand database structure
- Analyzing query performance with execution plan explanations
FAQ from MongoDB MCP Server
What tools does the server provide?
The server provides two tools: aggregate (execute aggregation pipelines) and explain (get execution plans).
What is the default document limit?
A limit of 1000 documents is applied automatically if no limit stage is specified in the pipeline.
What are the runtime requirements?
The server requires Node.js and is run via npx. It connects to any MongoDB instance via a connection string.
How is schema information obtained?
Schemas are derived by sampling collection documents and inferring field names and data types.
Is the connection read‑only?
Yes, all operations are read‑only. No write or update operations are supported.
More Databases MCP servers
mcp-server-qdrant: A Qdrant MCP server
qdrantAn official Qdrant Model Context Protocol (MCP) server implementation
mcp_mysql_server
wenb1n-devModel Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
MCP MongoDB Server
kiliczshA Model Context Protocol Server for MongoDB
ClickHouse MCP Server
ClickHouseConnect ClickHouse to your AI assistants.
Dbhub
bytebaseZero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, SQLite.
Comments