Skip to content
Kitbay
MCP server

MCP MongoDB Server

Local or remoteMITUpdated on Jul 29, 2026284GitHub starsCan change dataNeeds an API key

A community MCP server, published on npm as mcp-mongo-server, that gives an AI client access to a MongoDB database from a connection string.

What it does

A community MCP server, published on npm as mcp-mongo-server, that gives an AI client access to a MongoDB database from a connection string. It lists collections, samples documents to infer their schemas, runs queries and aggregation pipelines with optional explain plans, counts documents, and can insert and update documents and create indexes. A read-only flag blocks every write path, including $out and $merge stages, and named connections can each carry their own database list and read-only setting. It runs over stdio by default or as an HTTP endpoint with an optional bearer token. Node.js 20 or newer is needed.

Capabilities

  • Infer collection schemas from sample documents
  • Run queries and aggregation pipelines with explain plans
  • Insert and update documents and create indexes
  • Restrict all writes with a read-only mode
  • Serve several named MongoDB connections