# mongo-mcp

> mongo-mcp is an open-source MCP server for databases. MCP server letting AI clients query, inspect and edit MongoDB collections. It is available on CLI and Self-hosted.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/quantgeekdev/mongo-mcp
- **GitHub stars:** 175
- **License:** MIT
- **Categories:** [databases](https://ai-powered.com/categories/databases)
- **Listing updated:** 2026-12-01

## About

Connects an AI assistant to a MongoDB database through the Model Context Protocol, so questions about collections, documents and indexes can be asked in plain language. The server runs locally via npx and is configured with a standard MongoDB connection string inside an MCP client's config file.

Once connected, the assistant can list collections, inspect document structure, run filtered and projected queries, and create, drop or review indexes. Insert, update and delete operations on single documents are also exposed, so the same interface can change data as well as read it.

The project suits developers and data teams who want to explore a MongoDB database conversationally, and it ships with a Docker-based sample database with seeded users, products and orders for trying it out first.

## Features

- **Collection schema inspection:** Lets the assistant look at how collections are structured before querying them.
- **Filtered document queries:** Runs find requests with filtering and field projection based on natural language prompts.
- **Index management:** Lists, creates and drops indexes on collections.
- **Single-document writes:** Supports inserting, updating and deleting individual documents.
- **Local sample sandbox:** Includes a Docker Compose setup and seed script with sample users, products and orders.

## Good for

- Exploring an unfamiliar MongoDB database by asking questions about its collections
- Checking which indexes exist and adding one for a frequently queried field
- Looking up orders or users by attribute without writing query syntax
- Making quick corrections to a single document, such as updating an order status

## Tools

From the tool list in its README, going by the names, 2 of 8 tools delete data and 3 change data; 1 name doesn't say. From the server's own tool labels and tool names; not verified by us.

- `find` (name suggests: reads): Query documents with filtering and projection
- `listCollections` (name suggests: reads): List available collections
- `insertOne` (name suggests: changes): Insert a single document
- `updateOne` (name suggests: changes): Update a single document
- `deleteOne` (name suggests: deletes): Delete a single document
- `createIndex` (name suggests: changes): Create a new index
- `dropIndex` (name suggests: deletes): Remove an index
- `indexes`: List indexes for a collection

## FAQ

### Which database does mongo-mcp connect to?

It connects to MongoDB using a standard connection URL passed as an argument in the MCP client configuration.

### What tools does the server expose?

It provides find, listCollections, insertOne, updateOne and deleteOne for data, plus createIndex, dropIndex and indexes for index management.

### Do I need a MongoDB server to try mongo-mcp?

No. The project includes a Docker Compose file and a seed script that create a sample database with users, products and orders.

### Is mongo-mcp free?

Yes. mongo-mcp is open source, so you can use and self-host it for free.

### What are the best alternatives to mongo-mcp?

The closest alternatives to mongo-mcp are mcp-mongo-server, Mongodb MCP Server, mongodb-lens, Mongo Scout MCP and mongodb-atlas-mcp-server.

## Where this comes from

- Description: written from the project's README.

## Alternatives

- [mcp-mongo-server](https://ai-powered.com/mcp/mcp-mongo-server): mcp-mongo-server is an open-source MCP server for databases.
- [Mongodb MCP Server](https://ai-powered.com/mcp/mongodb-mcp-server): Mongodb MCP Server is an open-source MCP server for databases.
- [mongodb-lens](https://ai-powered.com/mcp/mongodb-lens): mongodb-lens is an open-source MCP server for databases.
- [Mongo Scout MCP](https://ai-powered.com/mcp/mongo-scout-mcp): Mongo Scout MCP is an open-source MCP server for databases.
- [mongodb-atlas-mcp-server](https://ai-powered.com/mcp/mongodb-atlas-mcp-server): mongodb-atlas-mcp-server is an open-source MCP server for databases.
- [MongoDB Read-Only MCP](https://ai-powered.com/mcp/mongodb-read-only-mcp): MongoDB Read-Only MCP is an open-source MCP server for databases.
- [postgres_mcp](https://ai-powered.com/mcp/postgres-mcp-5): postgres_mcp is an open-source MCP server for databases.
- [florentine-ai](https://ai-powered.com/mcp/florentine-ai): florentine-ai is a freemium MCP server for databases.

---
Source: https://ai-powered.com/mcp/mongo-mcp
