A Model Context Protocol (MCP) server that lets AI assistants work with your MongoDB databases. It exposes your collections, infers their schemas, and runs queries, aggregations, and writes through a standard interface — so tools like Claude Desktop and Cursor can read and reason about your data.
- Talk to your database in plain language — the assistant discovers your collections and their shape automatically.
- Safe by default — turn on read-only mode to let an assistant explore without any risk of changing data.
- Works everywhere — connects to standalone, replica set, sharded, and Atlas deployments, over plain or TLS connections.
- Read-Only Mode — blocks every write path (insert, update, index creation, and aggregation stages like
$out/$mergethat could modify data). - Smart ObjectId Handling — configurable
auto/none/forceconversion of 24-character hex strings to ObjectIds. - Schema Inference — automatic collection schema detection from document samples.
- Query & Aggregation — full query and aggregation pipeline support, with optional
explainplans. - Write Operations — insert, update, and index creation (when read-only mode is off).
- Time Conversion — a
convertTimehelper turns Unix timestamps and date strings into UTC/GMT/ISO, so date queries stay unambiguous across timezones. - Progress & Cancellation — long operations report progress and can be cancelled mid-flight.
- Two Transports — run locally over stdio, or expose an HTTP endpoint for remote access.
