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.
Server Terkait
DART MCP Server
Access corporate disclosure information, financial data, and reports from the Korean electronic disclosure system (DART) API.
MCP-PostgreSQL-Ops
MCP-PostgreSQL-Ops is a professional MCP server for PostgreSQL database operations, monitoring, and management. Supports PostgreSQL 12-17 with comprehensive database analysis, performance monitoring, and intelligent maintenance recommendations through natural language queries.
CData Square Server
A read-only MCP server for querying live data from Square using the CData JDBC Driver.
MySQL
Access MySQL databases to inspect schemas and execute SQL queries via a NodeJS-based server.
Gel
Provides tools and resources for coding agents to interact with the Gel database, including automatic project configuration for query builders and ORMs.
SAS XPT MCP Server by CData
A Model Context Protocol (MCP) server for SAS XPT files, powered by the CData JDBC Driver.
Amazon Neptune
Query Amazon Neptune databases using openCypher, Gremlin, and SPARQL. Supports both Neptune Database and Neptune Analytics.
FHIR MCP Server by CData
A read-only MCP server for FHIR, enabling LLMs to query live FHIR data. Requires the CData JDBC Driver for FHIR.
MySQL MCP Server
A read-only MySQL database server for LLMs to inspect schemas and execute queries.
USDA Nutrition MCP Server
Access nutrition information for over 600,000 foods from the USDA FoodData Central database.
