MongoDB

MongoDB

A Model Context Protocol server to connect to MongoDB databases and MongoDB Atlas Clusters.

6.7K

4

20 Tools

Signed
Built by Docker
Requires Secrets
Add to Docker Desktop

Version 4.43 or later needs to be installed to add the server automatically

Tools

NameDescription
aggregateRun an aggregation against a MongoDB collection
collection-indexesDescribe the indexes for a collection
collection-schemaDescribe the schema for a collection
collection-storage-sizeGets the size of the collection
countGets the number of documents in a MongoDB collection using db.collection.count() and query as an optional filter parameter
create-collectionCreates a new collection in a database. If the database doesn't exist, it will be created automatically.
create-indexCreate an index for a collection
db-statsReturns statistics that reflect the use state of a single database
delete-manyRemoves all documents that match the filter from a MongoDB collection
drop-collectionRemoves a collection or view from the database. The method also removes any indexes associated with the dropped collection.
drop-databaseRemoves the specified database, deleting the associated data files
explainReturns statistics describing the execution of the winning plan chosen by the query optimizer for the evaluated method
findRun a find query against a MongoDB collection
insert-manyInsert an array of documents into a MongoDB collection
list-collectionsList all collections for a given database
list-databasesList all databases for a MongoDB connection
mongodb-logsReturns the most recent logged mongod events
rename-collectionRenames a collection in a MongoDB database
switch-connectionSwitch to a different MongoDB connection. If the user has configured a connection string or has previously called the connect tool, a connection is already established and there's no need to call this tool unless the user has explicitly requested to switch to a new instance.
update-manyUpdates all documents that match the specified filter for a collection

Manual installation

You can install the MCP server using:

Installation for

Related servers