mcp-mongo-server
A Model Context Protocol server that allows large language models to interact with MongoDB databases.
This MCP MongoDB Server provides a standardized interface for LLMs to perform various operations on MongoDB databases. It enables users to inspect collection schemas, execute queries, and perform write operations when not in read-only mode. The server also features smart handling of ObjectId conversions and supports full MongoDB query and aggregation pipelines, making it versatile for different use cases. Additionally, the server offers automatic schema inference from document samples, ensuring that users can easily understand the structure of their collections. With capabilities like auto-completing collection names for LLM integration and a read-only mode for enhanced security, this server is designed to facilitate seamless interactions between LLMs and MongoDB.
Compatible with
Install
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"mcp-mongo-server": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-mongo-server"
]
}
}
}Config File Location
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
Some servers require additional setup - check the GitHub README for specific instructions.
Permissions