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. - Smart ObjectId Handling - Configurable auto/none/force modes for string-to-ObjectId conversion - Read-Only Mode - Protection against write operations, uses secondary read prefer
Add this skill
npx mdskills install kiliczsh/mcp-mongo-serverWell-documented MongoDB MCP server with comprehensive features and clear setup instructions
1# MCP MongoDB Server2---34567[](https://smithery.ai/server/mcp-mongo-server)8[](https://mseep.ai/app/e274a3dd-7fe6-4440-8c43-043bae668251)910A 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.1112## Demo1314[](https://www.youtube.com/watch?v=FI-oE_voCpA)1516## Key Features1718- **Smart ObjectId Handling** - Configurable auto/none/force modes for string-to-ObjectId conversion19- **Read-Only Mode** - Protection against write operations, uses secondary read preference20- **Schema Inference** - Automatic collection schema detection from document samples21- **Query & Aggregation** - Full MongoDB query and aggregation pipeline support with optional explain plans22- **Write Operations** - Insert, update, and index creation (when not in read-only mode)23- **Collection Completions** - Auto-complete collection names for LLM integration2425## Installation2627```bash28npx -y mcp-mongo-server mongodb://localhost:27017/database29```3031## Usage3233```bash34# Start server with MongoDB URI35npx -y mcp-mongo-server mongodb://muhammed:kilic@localhost:27017/database3637# Connect in read-only mode38npx -y mcp-mongo-server mongodb://muhammed:kilic@localhost:27017/database --read-only39```4041### Environment Variables4243| Variable | Description |44|----------|-------------|45| `MCP_MONGODB_URI` | MongoDB connection URI |46| `MCP_MONGODB_READONLY` | Enable read-only mode (`"true"`) |4748## Documentation4950- [Integration Guide](docs/integration.md) - Claude Desktop, Windsurf, Cursor, Docker51- [Available Tools](docs/tools.md) - Query, aggregate, update, insert, and more52- [Development](docs/development.md) - Setup, scripts, and debugging53- [Contributing](CONTRIBUTING.md)5455## License5657MIT - see [LICENSE](LICENSE) for details.58
Full transparency — inspect the skill content before installing.