MCP MongoDB
Provides tools for interacting with MongoDB databases, including reading collections, executing queries, performing multi-collection aggregation pipelines with $lookup operations, and managing database resources.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP 配置文件
{
"mcpServers": {
"mongodb": {
"command": "node",
"args": [
"E:\\project\\mongodb\\build\\index2.js"
],
"env": {
"MONGO_URI": "mongodb://localhost:27017/"
},
"disabled": false,
"autoApprove": []
},
}
}Related MCP server: MongoDB MCP Server
读取资源请求示例:
<use_mcp_tool> <server_name>mongodb</server_name> <tool_name>read_resource</tool_name>
{ "uri": "mongodb://localhost:27017/common" }
</use_mcp_tool>
CallToolRequestSchema、ReadResourceRequestSchema 的区别
CallToolRequestSchema: 用于执行特定操作 适合执行命令、处理数据等主动操作 示例:获取集合列表、插入数据等
ReadResourceRequestSchema: 用于读取资源内容 适合提供对资源的只读访问 示例:读取集合文档、获取数据库状态等
多表联查示例
<use_mcp_tool> <server_name>mongodb</server_name> <tool_name>multi_collection_query</tool_name>
{ "database": "common", "collection": "players", "pipeline": [ { "$lookup": { "from": "platform", "localField": "platform", "foreignField": "appKey", "as": "platformInfo" } }, { "$unwind": "$platformInfo" }, { "$project": { "_id": 1, "pid": 1, "__v": 1, "bank": 1, "ip": 1, "lobbyUrl": 1, "platform": "$platformInfo", "rtp": 1, "_collection": { "$literal": "players" } } }, { "$limit": 2 } ] }
</use_mcp_tool>
修改托送测试test
pull-request
漫长的过程
跑一下试试
This server cannot be deployed
Maintenance
Related MCP Connectors
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
Query, join, profile, clean and convert CSV/JSON/Parquet with server-side DuckDB over MCP.
Read and write shared BitsWeave context, projects, tasks, and work sessions through MCP.
Access New Relic observability data through MCP - query metrics, logs, traces, entities, and more
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAllows interaction with MongoDB collections and documents through standardized MCP requests, supporting operations like listing collections, reading documents with filtering, and executing structured queries.ISC
- AlicenseNot gradedqualityDmaintenanceEnables interaction with MongoDB databases through MCP protocol. Provides containerized deployment with Docker support for database operations and management.185,562 npmApache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables CRUD operations on MongoDB databases and collections, including listing databases and collections, via MCP tools.33 npmApache 2.0
- AlicenseNot gradedqualityCmaintenanceMCP server for comprehensive MongoDB integration, enabling database operations, document management, schema analysis, and query tools.17 npmMIT