3.0.0
Major release: migrates to the MCP SDK v2 with dual-era protocol support, adds security hardening, and introduces new capabilities.
Highlights
Protocol / SDK
- Migrated to MCP SDK v2 (
@modelcontextprotocol/server,/node,/express). - Dual-era protocol support — negotiates
2026-07-28while still serving legacy2025-11-25clients. - Error semantics aligned with the newer spec: validation/lookup misses return
InvalidParams(-32602).
Security hardening (opt-in, safe by default)
- Cross-database scoping — aggregations pinned to the connected database; cross-db
$lookup/$out/$mergerejected unless--allow-cross-db. - Server-side JavaScript blocked by default (
$where,$function,$accumulator,mapReduce) unless--allow-server-js. - Hardened system-collection guard (case-insensitive).
- Configurable HTTP body limit (
--json-limit); oversized/malformed bodies return proper JSON-RPC errors. - Nesting-depth guard on the aggregation operator scan.
- Optional bearer-token auth for the HTTP transport (
--auth-token), constant-time comparison.
Features & fixes
- New
convertTimetool (Unix/date → UTC ISO 8601 / GMT / Unix + server timezone); date filters honor timezone offsets. - Fixed
sorton thequerytool (was silently stripped from the input schema). - Fixed
createIndexreturning an empty{}— now returns{ acknowledged, createdIndexes, indexCount }.
Breaking changes
- Runs on the MCP SDK v2 line and negotiates the
2026-07-28protocol (legacy2025-11-25still supported). - Stricter defaults: cross-database targets and server-side JavaScript are rejected unless explicitly enabled.
- Minimum MongoDB server version is 4.2+ (modern driver requirement); older servers can no longer be connected.
Full changelog: #44