MongoDB MCP Server
@mongodb-developer
关于 MongoDB MCP Server
暂无概览
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"@pash1986/mcp-server-mongodb"
],
"env": {
"MONGODB_URI": ""
}
}
}
}工具
2Execute MongoDB aggregation pipelines against the connected database
Get execution plans for aggregation pipelines
概览
What is MongoDB MCP Server?
A community-maintained Model Context Protocol (MCP) server that provides read-only access to MongoDB databases. It enables LLMs to inspect collection schemas and execute aggregation pipelines safely.
How to use MongoDB MCP Server?
Install via npm and configure the server in your claude_desktop_config.json using the npx command. Set the MONGODB_URI environment variable to your MongoDB connection string, then invoke the aggregate or explain tools as needed.
Key features of MongoDB MCP Server
- Execute aggregation pipelines with configurable options.
- Retrieve execution plans using different verbosity levels.
- Automatic limit of 1000 documents if no limit is specified.
- Default 30-second timeout on all operations.
- Read-only access – no write operations are permitted.
- Schema inference from sampled collection documents.
Use cases of MongoDB MCP Server
- Query and summarize large collections with aggregation pipelines.
- Inspect database schemas to understand field types and structures.
- Analyze query performance by viewing execution plans.
- Ask natural-language questions about MongoDB data through an LLM.
- Explore database contents without risking accidental modifications.
FAQ from MongoDB MCP Server
Is this server read-only?
Yes. All operations are strictly read-only. No write or delete actions are allowed.
What safety limits are in place?
A default limit of 1000 documents is applied to any aggregation pipeline that does not include its own limit stage, and all operations time out after 30 seconds.
How do I connect to my MongoDB instance?
Set the MONGODB_URI environment variable to your connection string (e.g., mongodb://localhost:27017 or mongodb+srv://<cluster>) before starting the server.
What tools does it provide?
Two tools: aggregate (run aggregation pipelines) and explain (get execution plans with optional verbosity levels).
Is this an official MongoDB MCP Server?
No. This is a community-maintained server. The official server is maintained by MongoDB at mongodb-js/mongodb-mcp-server.
数据库 分类下的更多 MCP 服务器
Database Gateway
centralmindUniversal MCP-Server for your Databases optimized for LLMs and AI-Agents.
MotherDuck's DuckDB MCP Server
motherduckdbLocal MCP server for DuckDB and MotherDuck
MongoDB MCP Server
mongodb-jsA Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.
Sail MCP Server for Spark SQL
lakehqDrop-in Apache Spark replacement written in Rust, unifying batch processing, stream processing, and compute-intensive AI workloads.
Neon MCP Server
neondatabaseMCP server for interacting with Neon Management API and databases
评论