That is the detail most bridges miss: $out and $merge can modify data from inside a pipeline, and $function, $where and $accumulator run JavaScript on the server. All of them are rejected by default, along with cross-database $lookup, and each has its own opt-in flag. The project still tells you the strongest guarantee is a MongoDB user scoped to one database — which is the right advice.
A MongoDB server for MCP clients: it exposes your collections, infers their schemas from document samples, and runs queries, aggregations and writes.
- query — a filter, projection and limit, with an optional explain plan
- aggregate — full pipelines, also with an optional explain
- count — matching documents for a filter
- update, insert and createIndex — available when read-only mode is off
- serverInfo — MongoDB server details
- convertTime — turns a Unix timestamp or date string into UTC ISO 8601, GMT and Unix seconds and milliseconds, and reports the server's own time and timezone
- Schema inference from document samples, so the assistant discovers collection shape by itself
- Configurable ObjectId handling — auto, none or force — for 24-character hex strings
- Progress reporting and cancellation on long operations
- Stdio for local clients, or an HTTP endpoint at /mcp for remote access
Node.js 20 or newer, and a connection URI — npx -y mcp-mongo-server with the URI, no install step. Add --read-only to block every write path. In HTTP mode, only requests without a browser Origin and requests from localhost are accepted by default, everything else gets a 403; use --allowed-origins to permit specific browser origins and --auth-token to require a bearer token.
One command plus a key — npx -y mcp-mongo-server mongodb://localhost:27017/mydatabase, then supply credentials
