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.
相關伺服器
Gralio SaaS Database
Access a comprehensive database of over 30,000 SaaS products, including reviews, pricing, alternatives, and growth metrics.
Simple PostgreSQL MCP Server
An MCP server for executing SQL queries on PostgreSQL databases with configurable permissions.
GovPing
Free regulatory intelligence. Search 27,000+ government changes in ORCA format. No API key.
CoinCap
A MCP server that provides real-time cryptocurrency market data through CoinCap's public API without requiring authentication
MCP Database Server
Provides database access for SQLite, SQL Server, PostgreSQL, and MySQL.
MCP Neo4j Server
Integrate the Neo4j graph database with clients through natural language interactions.
SAP Fieldglass MCP Server by CData
A read-only MCP server for querying live SAP Fieldglass data, powered by the CData JDBC Driver.
LoL Data MCP Server
Provides real-time, structured access to League of Legends game data, including champions, items, abilities, game mechanics, and patch information.
ogham-mcp
Persistent shared memory for AI agents. Hybrid search (pgvector + tsvector), knowledge graph, cognitive scoring - 97.2% Recall@10 on LongMemEval
Kusto MCP Server
An MCP server for Azure Data Explorer (Kusto) that enables AI assistants to interact with Kusto databases.
