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.
Verwandte Server
ローカルNeo4jコンテナ
Manages personal knowledge using a local Neo4j container, with data imported from JSON files.
Doris-MCP-Lite
A lightweight MCP server for connecting to Apache Doris and other MySQL-compatible databases, providing tools and prompts for LLM applications.
Neuroplastic Memory
Biologically-inspired memory for Claude. Hebbian plasticity, dream cycles, and temporal decay for persistent knowledge synthesis.
Redash
Execute queries and retrieve results using the Redash API.
Database MCP
A single-binary MCP server for MySQL, MariaDB, PostgreSQL, and SQLite
@exerciseapi/mcp-server
Official MCP server for exerciseapi.dev — search 2,198+ exercises across 12 categories
OSV Database
An MCP server for querying the OSV (Open Source Vulnerability) database API.
Kollect MCP Server (Standalone)
An MCP server for querying data from the Kollect tool's API endpoints, such as /api/data, /api/snapshots, and /api/costs.
Poland Parliament
MCP server providing access to official records of activities of the Polish Parliament, including information on members, voting records, committees, and proceedings.
Schema Search
In-memory natural language schema search over database schemas
