Skip to main content
Glama
Shyamkadiwar

MongoDB MCP Server

by Shyamkadiwar

MongoDB MCP Server

A Model Context Protocol (MCP) server that provides MongoDB database operations through a standardized interface. This server allows AI assistants and other MCP clients to interact with MongoDB databases using natural language commands.

What is MCP?

The Model Context Protocol (MCP) is a standardized way for AI assistants to interact with external tools and data sources. This MongoDB MCP server acts as a bridge between AI models and MongoDB databases, enabling secure and controlled database operations.

Related MCP server: Mongo-MCP

Features

  • Document Operations: Find, insert, update, and delete documents

  • Aggregation Pipeline: Run complex MongoDB aggregation queries

  • Collection Management: List collections and get collection statistics

  • Document Counting: Count documents with optional filtering

  • Flexible Querying: Support for filters, sorting, and limiting results

Available Tools

1. find_documents

Find documents in a MongoDB collection with optional filtering, sorting, and limiting.

Parameters:

  • collection (required): Collection name

  • filter (optional): MongoDB filter query (default: {})

  • limit (optional): Maximum number of documents to return (default: 10)

  • sort (optional): Sort criteria (default: {})

2. count_documents

Count documents in a collection with optional filtering.

Parameters:

  • collection (required): Collection name

  • filter (optional): MongoDB filter query (default: {})

3. insert_document

Insert a single document into a collection.

Parameters:

  • collection (required): Collection name

  • document (required): Document to insert

4. update_documents

Update multiple documents in a collection.

Parameters:

  • collection (required): Collection name

  • filter (required): MongoDB filter query

  • update (required): Update operations

  • upsert (optional): Create document if not found (default: false)

5. delete_documents

Delete multiple documents from a collection.

Parameters:

  • collection (required): Collection name

  • filter (required): MongoDB filter query

6. aggregate

Run aggregation pipeline on a collection.

Parameters:

  • collection (required): Collection name

  • pipeline (required): Array of aggregation pipeline stages

7. list_collections

List all collections in the database.

Parameters: None

8. get_collection_stats

Get statistics for a specific collection.

Parameters:

  • collection (required): Collection name

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    Enables Claude to interact with MongoDB databases through natural language, supporting queries, aggregations, CRUD operations, and index management with optional Mongoose schema validation.
    7 npm
    3
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables LLMs to interact with MongoDB databases through a complete suite of CRUD operations, administrative tasks, and index management tools. It supports database and collection handling, aggregation pipelines, and comprehensive server monitoring via the Model Context Protocol.
    775 PyPI
    3
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact natively with MongoDB databases, including schema discovery, CRUD operations, aggregation pipelines, and index management via natural language.
    11 npm
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to interact with MongoDB databases and MongoDB Atlas, supporting read-only and write operations, Atlas cluster management, and data exploration.
    100,562 npm
    Apache 2.0