Skip to content
MCP server

mongo-mcp

MCP server letting AI clients query, inspect and edit MongoDB collections

mongo-mcp is an open-source MCP server for databases. It is available on CLI and Self-hosted.

Pricing
Open source
Platforms
CLI, Self-hosted
What it can do
Can delete data (2 tools)
GitHub stars
175
Last commit
Language
TypeScript

Similar MCP servers

About mongo-mcp

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.

Tools this server provides (8)

Taken from the project documentation; the running server may differ.

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.

findName suggests: reads
Query documents with filtering and projection
listCollectionsName suggests: reads
List available collections
insertOneName suggests: changes
Insert a single document
updateOneName suggests: changes
Update a single document
deleteOneName suggests: deletes
Delete a single document
createIndexName suggests: changes
Create a new index
dropIndexName suggests: deletes
Remove an index
indexes
List indexes for a collection

What it does

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

Pricing

Open source

Free and open source under the MIT License.

mongo-mcp 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.

How AIPoweredBot checks servers