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.
İlgili Sunucular
SchemaCrawler
Connect to any relational database, and be able to get valid SQL, and ask questions like what does a certain column prefix mean.
CongressMCP
Access comprehensive U.S. Congressional data, including bills, votes, and member information, via the Congress.gov API.
PostgreSQL
Provides read-only access to PostgreSQL databases, enabling schema inspection and query execution.
OracleDB MCP Server
An MCP server for interacting with Oracle Database, enabling SQL generation and data retrieval via LLM prompts.
Microsoft Access Database
Allows AI to interact with Microsoft Access databases, supporting data import and export via CSV files.
MySQL MCP Server
Enables secure interaction with MySQL databases, allowing AI assistants to list tables, read data, and execute SQL queries through a controlled interface.
Quickbase MCP Server
An MCP server for Quickbase, enabling seamless integration with AI assistants like Claude Desktop.
Exasol MCP
Exasol MCP server. Provides knowledge about the Exasol database to an LLM through the Model Context Protocol.
SQL-Transpiler MCP Tool
Transpile SQL queries between different dialects using the sqlglot library.
Hebbian Mind Enterprise
MCP memory server with Hebbian learning — concept connections strengthen through co-activation and weaken through disuse.
