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.
Máy chủ liên quan
Avro MCP Server by CData
A read-only MCP server for Avro data sources, powered by the CData JDBC Driver.
Snowflake MCP Server
A read-only server for interacting with Snowflake databases, allowing SELECT queries and access to schema context.
Cryptocurrency Market Data
Provides real-time and historical cryptocurrency market data from major exchanges using the CCXT library.
Firebolt
Connect your LLM to the Firebolt Data Warehouse for data querying and analysis.
Amazon Neptune
Query Amazon Neptune databases using openCypher, Gremlin, and SPARQL. Supports both Neptune Database and Neptune Analytics.
DynamoDB Read-Only MCP
A read-only server to query AWS DynamoDB databases using the Model Context Protocol (MCP).
Membase MCP
A decentralized memory layer for AI agents providing secure, persistent storage for conversation history and knowledge.
D&D 5E MCP Server
Access Dungeons & Dragons 5th Edition content, including spells, classes, and monsters, via the Open5e API.
MCP Data Visualization Server
Generate interactive data visualizations from natural language queries on a DuckDB database.
CentralMind Gateway
Expose structured databases to AI agents via MCP or OpenAPI 3.1 protocols, with APIs optimized for AI workloads.
