mongodb-mcp-server

22

The MongoDB MCP Server is a community-maintained server offering read-only access to MongoDB databases. It enables large language models to inspect schemas and perform aggregation while ensuring safe and limited operations.

MongoDB MCP Server

A Model Context Protocol server providing read-only access to MongoDB databases, allowing LLMs to inspect collection schemas and execute aggregation pipelines.

Components

  • aggregate: Execute aggregation pipelines with features like document limit and execution time constraints.
  • explain: Retrieve execution plans for pipelines with varying verbosity.
  • Resources: Provides schema information inferred from collection sampling.

Usage

This server can be used with the Claude Desktop app by configuring claude_desktop_config.json to connect to a MongoDB database.

Safety Features

  • Automatic document limit and operation timeout.
  • Ensures read-only operations.
  • Safe schema inference.