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.
Verwandte Server
Snowflake MCP Server by CData
A read-only MCP server for querying live Snowflake data, powered by CData.
SupaMCP Server
A runtime-configurable MCP server that turns a Supabase project into an AI-compatible tool interface.
Data Exploration
MCP server for autonomous data exploration on .csv-based datasets, providing intelligent insights with minimal effort.
MCP SQLite Server
A Node.js MCP server for interacting with local SQLite databases, runnable via npx.
MCP for Neo4j
Connects to Neo4j graph databases with ability to use GDS functions ( when available), a read only mode , and set the sample size for schema detection
RentCast
Access property data, valuations, and market statistics using the RentCast API.
DB Query
Query and export data from various databases including ElasticSearch, MySQL, PostgreSQL, Oracle, and SQLite.
Azure Data Explorer
An MCP server for integrating with Azure Data Explorer, allowing for data querying and management.
MCP ArcKnowledge
Manage and query custom knowledge bases using webhook endpoints.
Supabase Coolify MCP Server
Comprehensive MCP server for managing self-hosted Supabase on Coolify with full deployment, migrations, edge functions, and rollback support.
