MCP.so
Sign In

MongoDB MCP Server

@jonfreeland

About MongoDB MCP Server

MongoDB MCP Server

Basic information

Category

Databases

License

MIT

Runtime

node

Transports

stdio

Publisher

jonfreeland

Config

No standard config provided

This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.

Repository

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is MongoDB MCP Server?

A Model Context Protocol server that provides read-only access to MongoDB databases through standardized MCP tools and resources, enabling AI assistants to directly query and analyze MongoDB data without write access.

How to use MongoDB MCP Server?

Build from source with npm install and npm run build, then configure the server in Claude Desktop, Claude Web (via MCP Chrome extension), or Claude Code by specifying the built index.js path and the required MONGODB_URI environment variable. Optionally set MONGODB_DEFAULT_DATABASE for a default database.

Key features of MongoDB MCP Server

  • List databases and collections
  • Infer collection schemas from sample documents
  • Execute MongoDB queries with filtering, projection, sorting, and limiting
  • Run read-only aggregation pipelines with safety validation
  • Perform full-text search and geospatial queries
  • Export query results as JSON or CSV formats

Use cases of MongoDB MCP Server

  • Let an AI assistant explore and query a production MongoDB database safely.
  • Analyze collection statistics and index usage to optimize performance.
  • Retrieve sample documents or distinct values for data profiling.
  • Run read-only aggregation pipelines for reporting without write risk.

FAQ from MongoDB MCP Server

What data does MongoDB MCP Server access?

It connects to any MongoDB instance specified by the MONGODB_URI environment variable and provides read-only access to databases and collections.

How is write protection enforced?

The server is designed as read-only by design, and includes safety validation that prevents write operations in aggregation pipelines.

What are the runtime requirements?

Node.js for building and running, network access to the MongoDB server, and appropriate read permissions on target databases.

How do I debug the server?

Use the MCP Inspector by running npm run inspector, which provides a URL for debugging tools.

Is authentication supported?

Yes, authentication credentials can be included in the MONGODB_URI connection string. It is recommended to use a MongoDB user with read-only permissions.

Comments

More Databases MCP servers