Mongo MCP Server

MCP service for MongoDB operations

Local serverstdioPython

What is the Mongo MCP Server?

MCP service for MongoDB operations

What you get

A Machine Chat Protocol (MCP) service for MongoDB operations. This service provides a comprehensive set of tools that allow Large Language Models (LLMs) to interact with MongoDB databases through complete CRUD operations, administrative tasks, and advanced features.

Configuration and credentials

  • Python 3.10 or above - A running MongoDB database service - It is recommended to use uv to run the program

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
list_databasesList all databases
create_databaseCreate new database
drop_databaseDelete database
get_database_statsGet database statistics
list_collectionsList all collections in a database
create_collectionCreate new collection (with optional settings)
drop_collectionDelete collection
rename_collectionRename collection
get_collection_statsGet collection statistics
list_indexesList all indexes for a collection
create_indexCreate regular index
create_text_indexCreate text search index
create_compound_indexCreate compound index
drop_indexDelete index

How to install the Mongo MCP Server

{
  "mcpServers": {
    "mongo-mcp-441126098": {
      "command": "uvx",
      "args": ["run"],
      "env": {
        "MONGODB_URI": "your-value",
        "MONGODB_DEFAULT_DB": "your-value",
        "LOG_LEVEL": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Python 3.10 or above - A running MongoDB database service - It is recommended to use uv to run the program
VariableDescriptionRequired
MONGODB_URIConfiguration value read at startup.Optional
MONGODB_DEFAULT_DBConfiguration value read at startup.Optional
LOG_LEVELConfiguration value read at startup.Optional

Example prompts to try

  • “Use Mongo to list databases.”
  • “Use Mongo to create database.”
  • “Use Mongo to drop database.”

Frequently asked questions

MCP service for MongoDB operations Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.