Mongo-MCP

Mongo-MCP is an MCP server that provides Large Language Models with tools to interact directly with MongoDB databases over standard input/output. Designed for developers and data engineers using MCP-compatible AI assistants, it enables automated database administration, document CRUD operations, index management, and data aggregation. The server exposes dedicated tools for creating, listing, and dropping collections and databases, as well as fetching database statistics. It handles document-level tasks including single and batch insertions, queries with sorting and projection, updates, replacements, and deletions. For query optimization and schema performance, Mongo-MCP supports managing standard, compound, and text indexes. It also executes aggregation pipelines and retrieves distinct field values. Built on Python with FastMCP and PyMongo, Mongo-MCP supports configurable connection pooling, timeout settings, read preferences, and feature flags that restrict dangerous or administrative operations when connecting LLMs to production or local instances.

Category: Databases & Data Stores

Tags: database, mongodb, nosql, query

Visit Mongo-MCP

How to install and configure Mongo-MCP

  1. Ensure Python 3.10 or higher and MongoDB are installed and running. 2. In your MCP client configuration file (such as .cursor/mcp.json), add mongo-mcp under mcpServers using uvx. 3. Configure the command arguments and environment variables: json { "mcpServers": { "mongo-mcp": { "command": "uvx", "args": ["mongo-mcp"], "env": { "MONGODB_URI": "mongodb://localhost:27017", "MONGODB_DEFAULT_DB": "your_database_name", "LOG_LEVEL": "INFO" } } } } 4. Restart the client to initialize the server connection over stdio.

What you can do with Mongo-MCP

  • Running aggregation pipelines and calculating summary statistics across MongoDB collections using natural language prompts. - Querying, filtering, and projecting specific document fields during debugging without manually writing Mongo shell scripts. - Performing bulk inserts, replacements, updates, and document deletions directly through an AI coding assistant. - Inspecting server status, database sizing, replica set health, and connection metrics for operational troubleshooting. - Creating and rebuilding single, compound, or text search indexes to optimize collection query performance.

Key facts

  • https://github.com/441126098/mongo-mcp
  • Databases & Data Stores
  • database, mongodb, nosql, query

Part of MCP Servers

Related MCP servers

  • MCP Memory Keeper — MCP Memory Keeper is an MCP server that provides persistent context management and memory storage for Claude AI coding assistants.…
  • MCP Notes — MCP Notes is an MCP server that provides note-taking and note-management capabilities to AI models using Amazon Web Services DynamoDB…
  • MCP Neo4j Server — MCP Neo4j Server is an MCP server that provides an integration between the Neo4j graph database and Model Context Protocol…
  • MCP Memory Toolkit — MCP Memory Toolkit is an MCP server that provides persistent memory capabilities for Claude and other compatible assistants using ChromaDB.…
  • MCP Memory Server — MCP Memory Server is an MCP server that integrates Claude Desktop with Azure Cosmos DB and OpenAI embeddings to provide…
  • MCP MS SQL Server — MCP MS SQL Server is an MCP server that provides a standardized Model Context Protocol interface for AI models to…

What can Mongo-MCP do?

Mongo-MCP allows AI models to manage MongoDB instances. It provides tools for executing CRUD operations, running aggregation pipelines, listing and dropping collections or databases, managing indexes, and retrieving server health metrics.

Which MCP clients work with Mongo-MCP?

Mongo-MCP communicates via standard input/output (stdio), making it compatible with any MCP client that supports stdio transport, such as Cursor and Claude Desktop.

How do I install Mongo-MCP?

You can run Mongo-MCP directly using uvx by invoking uvx run mongo-mcp, or configure your client config file with the uvx command and your target MONGODB_URI environment variable.

Is Mongo-MCP open source?

Yes, Mongo-MCP is open source software distributed under the MIT license on GitHub.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories