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.
相关服务器
Elasticsearch
Connects agents to Elasticsearch data, enabling natural language interaction with indices.
Chess.com
Access player data, game records, and public information from Chess.com's Published Data API.
KOSPI/KOSDAQ Stock Server
Provides KOSPI/KOSDAQ stock data, including ticker lookup, OHLCV, market capitalization, and fundamental data.
MariaDB
An MCP server for retrieving data from a MariaDB database.
CoreMCP
Connect Legacy Databases to AI Agents via Model Context Protocol. Open-source bridge for LLM data analysis.
Theta Health MCP Server
Connect your health data to AI assistants like Cursor, Claude, and Windsurf.
SG Data MCP
Real-time Singapore government data and ACRA company intelligence for AI agents. 13 tools: weather, air quality, dengue clusters, transport, and company verification.
AWS PostgreSQL MCP Server
A read-only MCP server for querying AWS PostgreSQL databases.
RewindDB
Interface with the Rewind.ai SQLite database to access audio transcripts and screen OCR data.
Vestige MCP
Provides comprehensive DeFi analytics and data for the Algorand ecosystem through the Vestige API.
