MongoDB Model Context Protocol server
Top 67.9% on sourcepulse
This project provides a Model Context Protocol (MCP) server for interacting with MongoDB databases and MongoDB Atlas. It enables various AI tools and applications to query and manage MongoDB data and infrastructure, offering a unified interface for data access and administrative tasks.
How It Works
The server acts as a bridge, translating MCP requests into MongoDB commands or Atlas API calls. It supports direct connections via connection strings or authentication through Atlas API credentials obtained from service accounts. This dual approach allows flexibility in how users connect and manage their MongoDB resources, whether for data retrieval or infrastructure management.
Quick Start & Requirements
npx -y mongodb-mcp-server
or via Docker: docker run --rm -i mongodb/mongodb-mcp-server:latest
MDB_MCP_CONNECTION_STRING
, MDB_MCP_API_CLIENT_ID
, MDB_MCP_API_CLIENT_SECRET
), or an MCP configuration file.Highlighted Details
find
, aggregate
, insert-one
, collection-schema
).readOnly
mode to restrict operations to read and metadata actions.indexCheck
mode to enforce query index usage for performance.Maintenance & Community
CONTRIBUTING.md
file.Licensing & Compatibility
Limitations & Caveats
The project requires Node.js v20.10.0 or later. Atlas API tools necessitate the creation and secure management of MongoDB Atlas service accounts and their credentials. The license is not specified, which may impact commercial adoption.
2 days ago
Inactive