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.
관련 서버
MCP Trino Server
Integrates with Trino and Iceberg for advanced data exploration, querying, and table maintenance.
SurveyMonkey by CData
A read-only MCP server for querying live SurveyMonkey data, powered by CData.
Chroma
A vector database server powered by Chroma, enabling semantic document search, metadata filtering, and document management.
Superset MCP Server
Manage Apache Superset datasets, metrics, and SQL queries.
OpenTK
Provides access to Dutch parliamentary documents, debates, and member information from the Tweede Kamer via the OpenTK project.
MCP Firebird
An MCP server for Firebird SQL databases, enabling LLMs to securely access, analyze, and manipulate database content.
Kusto MCP Server
An MCP server for Azure Data Explorer (Kusto) that enables AI assistants to interact with Kusto databases.
SurrealDB MCP Server
A standardized interface for AI assistants to interact with a SurrealDB database.
AlibabaCloud DMS MCP Server
An AI-powered gateway for managing over 40 data sources like Alibaba Cloud and mainstream databases, featuring NL2SQL, code generation, and data migration.
CData Zoho Creator
A read-only MCP server by CData for querying live Zoho Creator data using a JDBC driver.
