mongodb-mcp-server MCP server
A Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.
What mongodb-mcp-server does
Summarised from the project README; check the repository for the latest details.
Tools exposed (20+)
aggregate– Run an aggregation against a MongoDB collectionaggregate-db– Run an aggregation against a MongoDB databasecollection-indexes– Describe the indexes for a collectioncollection-schema– Describe the schema for a collectioncollection-storage-size– Gets the size of the collectionconnect– Connect to a MongoDB instancecount– Gets the number of documents in a MongoDB collection using db.collection.count() and query as an optional filter parametercreate-collection– Creates a new collection in a database. If the database doesn't exist, it will be created automatically.create-index– Create an index for a collectiondb-stats– Returns statistics that reflect the use state of a single databasedelete-many– Removes all documents that match the filter from a MongoDB collectiondisconnect– Close a MongoDB connection and revoke its connectionId.drop-collection– Removes a collection or view from the database. The method also removes any indexes associated with the dropped collection.drop-database– Removes the specified database, deleting the associated data filesdrop-index– Drop an index for the provided database and collection.explain– Returns statistics describing the execution of the winning plan chosen by the query optimizer for the evaluated methodexport– Export a query or aggregation results in the specified EJSON format.find– Run a find query against a MongoDB collectioninsert-many– Insert an array of documents into a MongoDB collection. If the list of documents is above com.mongodb/maxRequestPayloadBytes, consider inserlist-collections– List all collections for a given database
Requirements
- Node.js
- At least v22.13.0. Check with `node -v`.
- A MongoDB connection string or Atlas API credentials.
- Service Accounts Atlas API credentials are required to use the Atlas tools. You can create a service account in MongoDB Atlas and use its credentials for authentication. See Atlas API Access for more details.
- If you have a MongoDB connection string, you can use it directly to connect to your MongoDB instance.
Repository: mongodb-js/mongodb-mcp-server
Stars: ★1142
Language: TypeScript
Last updated: 2026-10-14
mcpmcp-servermongodbmongodb-atlasmongodb-database
Stars: ★1142
Language: TypeScript
Last updated: 2026-10-14
mcpmcp-servermongodbmongodb-atlasmongodb-database
How to install mongodb-mcp-server
No install config was found in this README. See the repository for setup steps, then follow our guides for Claude Desktop, Cursor or VS Code.
Featured in: Best MCP servers for MongoDB
Maintain this project? Get it featured for free during launch →
Compare with codebase-memory-mcp →
Related Databases MCP servers
codebase-memory-mcp by DeusData · ★46608
High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 langu
Databases
High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 langu
Databases
nightingale by ccfos · ★13352
Open-source, self-hosted alerting for metrics, logs, and databases. Includes a built-in AI agent and MCP server.
Databases
Open-source, self-hosted alerting for metrics, logs, and databases. Includes a built-in AI agent and MCP server.
Databases
code-graph-rag by vitali87 · ★5258
The ultimate RAG for your monorepo. Query, understand, and edit multi-language codebases with the power of AI and knowledge graphs
Databases
The ultimate RAG for your monorepo. Query, understand, and edit multi-language codebases with the power of AI and knowledge graphs
Databases
Weekly MCP digest – new and trending MCP servers in your inbox.