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.
Servidores relacionados
FDIC BankFind MCP Server
Provides structured U.S. banking data from the FDIC BankFind API for AI tools and workflows.
YantrikDB
Cognitive memory for AI agents - persistent semantic memory with knowledge graph and adaptive recall
@exerciseapi/mcp-server
Official MCP server for exerciseapi.dev — search 2,198+ exercises across 12 categories
aml
AML Watcher MCP Server gives AI agents direct, real-time access to AML Watcher's proprietary sanctions, watchlist, and PEP databases. Connect your agentic workflows to 215+ sanctions regimes, 2.6M+ PEP profiles, and coverage across 235+ countries, no complex integrations required.
Politica Electoral
API de datos electorales del mundo democrático: partidos políticos, perfiles ideológicos y programas electorales.
FinDataMCP
Provides financial data. Requires external Python dependencies installed with the uv package manager.
Database Server
A Model Context Protocol (MCP) server that provides multi-database query execution capabilities with support for SQLite, PostgreSQL, and MySQL databases. Includes a built-in Web UI for managing database connections.
DynamoDB Read-Only MCP
A read-only server to query AWS DynamoDB databases using the Model Context Protocol (MCP).
PostgreSQL
Provides read-only access to PostgreSQL databases, allowing LLMs to inspect schemas and execute queries.
Google Directory by CData
A read-only MCP server for querying live Google Directory data using the CData JDBC Driver.
