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.
相關伺服器
Supermarket Database
A dockerized PostgreSQL database project for a supermarket data schema, with MCP integration for Claude Desktop.
NFTGo MCP
Access the NFTGo Developer API for comprehensive NFT data and analytics. Requires an NFTGo API key.
MCP OpenDART
Access financial data from Korea's OpenDART (Data Analysis, Retrieval and Transfer System) for AI language models.
CData Raiser's Edge NXT
A read-only MCP server by CData that enables LLMs to query live data from Raiser's Edge NXT.
Superset MCP Server
Manage Apache Superset datasets, metrics, and SQL queries.
Veri5ight
An MCP server that enables chat-based interaction with Ethereum nodes.
Seoul Public Data
Provides public data for Seoul, South Korea, including subway ridership and cultural event information, via the Seoul Public Data API.
CData Sage 300
A read-only MCP server by CData that enables LLMs to query live data from Sage 300.
SCB MCP
Connect LLMs or AI-chatbots to let them query and interact with official data and statistics from SCB (Sweden Statistics)
Chroma
Embeddings, vector search, document storage, and full-text search with the open-source AI application database
