mongodb-mcp-server
If you are the rightful owner of mongodb-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server that provides Claude with the ability to interact with MongoDB databases.
This MongoDB MCP server implements the Model Context Protocol to create a bridge between Claude and MongoDB databases. It enables Claude to execute MongoDB commands through a standardized interface, making it possible to analyze, manage, and work with your data directly in conversations.
Features
- Comprehensive MongoDB Operations: Query documents (find, findOne), perform aggregations (aggregate), count documents (count), get distinct values (distinct), and sample data (sample).
- Data Manipulation: Insert (insertOne, insertMany), update (updateOne, updateMany), and delete (deleteOne, deleteMany) documents.
- Database Management: List databases (listDatabases), list collections (listCollections), and drop collections (dropCollection).
- Query Analysis: Get execution plans for aggregation pipelines (explain).
- Secure Connection: Connects to MongoDB using environment variables for credentials.
Tools
aggregate
Run a MongoDB aggregation pipeline.
sample
Get random sample documents.
explain
Get the execution plan for an aggregation pipeline.
find
Find documents matching a query.
findOne
Find a single document matching a query.
count
Count documents matching a query.
distinct
Get distinct values for a field.
insertOne
Insert a single document.
insertMany
Insert multiple documents.
updateOne
Update a single document.
updateMany
Update multiple documents.
deleteOne
Delete a single document.
deleteMany
Delete multiple documents.
listCollections
List all collections in a database.
listDatabases
List all databases on the server.
dropCollection
Drop an entire collection.