MongoDB
A Model Context Protocol Server for MongoDB
MCP MongoDB Server
A Model Context Protocol server that enables LLMs to interact with MongoDB databases. This server provides capabilities for inspecting collection schemas and executing MongoDB operations through a standardized interface.
Demo
Key Features
- Smart ObjectId Handling - Configurable auto/none/force modes for string-to-ObjectId conversion
- Read-Only Mode - Protection against write operations, uses secondary read preference
- Schema Inference - Automatic collection schema detection from document samples
- Query & Aggregation - Full MongoDB query and aggregation pipeline support with optional explain plans
- Write Operations - Insert, update, and index creation (when not in read-only mode)
- Collection Completions - Auto-complete collection names for LLM integration
Installation
npx -y mcp-mongo-server mongodb://localhost:27017/database
Usage
# Start server with MongoDB URI
npx -y mcp-mongo-server mongodb://muhammed:kilic@localhost:27017/database
# Connect in read-only mode
npx -y mcp-mongo-server mongodb://muhammed:kilic@localhost:27017/database --read-only
Environment Variables
| Variable | Description |
|---|---|
MCP_MONGODB_URI | MongoDB connection URI |
MCP_MONGODB_READONLY | Enable read-only mode ("true") |
Documentation
- Integration Guide - Claude Desktop, Windsurf, Cursor, Docker
- Available Tools - Query, aggregate, update, insert, and more
- Development - Setup, scripts, and debugging
- Contributing
License
MIT - see LICENSE for details.
เซิร์ฟเวอร์ที่เกี่ยวข้อง
Apache Doris
MCP Server For Apache Doris, an MPP-based real-time data warehouse.
MCP Database Server
Provides database access for SQLite, SQL Server, PostgreSQL, and MySQL.
Hologres
Connect to a Hologres instance, get table metadata, query and analyze data.
Wave Financial MCP Server by CData
A read-only MCP server for querying live Wave Financial data, powered by CData.
BigQuery
Inspect database schemas and execute queries on Google BigQuery.
Exact Online MCP Server by CData
A read-only MCP server by CData that enables LLMs to query live data from Exact Online.
VictoriaMetrics
A server for writing and querying time series data using the VictoriaMetrics API.
AWS RDS Management
Manage Amazon RDS and Aurora database clusters, including instances, backups, parameters, costs, and monitoring.
CData Zoho Creator
A read-only MCP server by CData for querying live Zoho Creator data using a JDBC driver.
PostgreSQL
Provides read-only access to PostgreSQL databases, allowing LLMs to inspect schemas and execute queries.
