mongodb-mcp-server

mongodb-mcp-server

3.2

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

  1. aggregate

    Run a MongoDB aggregation pipeline.

  2. sample

    Get random sample documents.

  3. explain

    Get the execution plan for an aggregation pipeline.

  4. find

    Find documents matching a query.

  5. findOne

    Find a single document matching a query.

  6. count

    Count documents matching a query.

  7. distinct

    Get distinct values for a field.

  8. insertOne

    Insert a single document.

  9. insertMany

    Insert multiple documents.

  10. updateOne

    Update a single document.

  11. updateMany

    Update multiple documents.

  12. deleteOne

    Delete a single document.

  13. deleteMany

    Delete multiple documents.

  14. listCollections

    List all collections in a database.

  15. listDatabases

    List all databases on the server.

  16. dropCollection

    Drop an entire collection.