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.
関連サーバー
Support Local Businesses
Local business directory API — 6.4M+ US businesses, 14,326 zip codes. Search, filter, enrich via MCP tools. x402 micropayents on Base L2.
MCP Simple PubMed
Access PubMed articles through the Entrez API.
bricks and context
Production-grade MCP server for Databricks: SQL Warehouses, Jobs API, multi-workspace support.
MCP Memory Dashboard
A desktop application for managing and interacting with the MCP Memory Service, a semantic memory system built on the Model Context Protocol.
Powerdrill
An MCP server that provides tools to interact with Powerdrill datasets, enabling smart AI data analysis and insights.
SQL Server MCP
A read-only Model Context Protocol (MCP) server for Microsoft SQL Server, enabling safe metadata discovery and parameterized SELECT queries.
MCP Database Server
Connects to and interacts with various database systems like SQLite, PostgreSQL, SQL Server, and MongoDB.
MySQL Server
A server for performing MySQL database operations.
pharma-signal
Drug safety intelligence API with 19 MCP tools. Covers 358 drugs across 1M+ FDA adverse event reports with real-time risk scoring, pharmacovigilance signal detection (PRR/ROR), company portfolio analysis by ticker, and AI-powered analyst briefs. Free tier: 100 calls/day.
MCP Memory Server - Python Implementation
A Python implementation of the MCP memory server for knowledge graph storage and retrieval, using JSONL files for persistence.
