Official · by mongodb-js
MongoDB MCP server
The MongoDB MCP server lets an AI assistant run queries, aggregations, and document counts against MongoDB collections.
- Runs locally
- Apache-2.0 licence
- ★ 1,144 on GitHub
- Verified against its source 19 Oct 2026
What the MongoDB MCP server does
The server connects MongoDB to agentic AI tools and assistants, letting them run aggregations and find queries on a collection, count documents in a collection, and list the databases for a connection. It also includes a tool to list MongoDB Atlas clusters and a tool to search the MongoDB Assistant knowledge base. It can be run locally by launching the mongodb-mcp-server package with npx, and a separate hosted Atlas-Managed MCP server is offered as an authenticated deployment.
Tools it gives your assistant
aggregateRuns an aggregation against a collectionfindRuns a find query against a collectioncountCounts documents in a collection, with optional filterlist-databasesLists databases for a connectionatlas-list-clustersLists MongoDB Atlas clusterssearch-knowledgeSearches the MongoDB Assistant knowledge base
How to install it
Run it locally
npx -y mongodb-mcp-serverWhat you need
- “At least v22.13.0. Check with node -v”
- “NOTE: atlas tools are only available when you set credentials on configuration (#configuration) section”