🗄️ MongoDB MCP Server for LLMS
A mongo db server for the model context protocol (MCP)
Overview
MongoDB MCP is a server that allows LLMs (Large Language Models) to interact directly with MongoDB databases using the Model Context Protocol (MCP). It simplifies querying, inspecting schemas, and managing database operations through natural language.
To use MongoDB MCP, first configure the MongoDB connection URL within the Claude Desktop config file. Users can then utilize natural language prompts to manage data and query collections.
- 🔍 Collection schema inspection - 📊 Document querying and filtering - 📈 Index management - 📝 Document operations (insert, update, delete)
- Inspecting the schema of collections within a database.
- Performing complex queries on documents without needing to write specific MongoDB queries.
- Managing indexes and document operations using natural language commands.
Add to your AI client
Use these steps to connect 🗄️ MongoDB MCP Server for LLMS in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mongo-mcp-quantgeekdev": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mongo-mcp-quantgeekdev"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mongo-mcp-quantgeekdev": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mongo-mcp-quantgeekdev"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mongo-mcp-quantgeekdev": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mongo-mcp-quantgeekdev"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mongo-mcp-quantgeekdev": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mongo-mcp-quantgeekdev"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mongo-mcp-quantgeekdev": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mongo-mcp-quantgeekdev"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mongo-mcp-quantgeekdev": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mongo-mcp-quantgeekdev"
]
}
}
}FAQ
**Can I use MongoDB MCP without Node.js?**
No, Node.js 18+ is a prerequisite for running MongoDB MCP.
**Is MongoDB MCP free to use?**
Yes, MongoDB MCP is open source and available for free under the MIT License.
**What LLMs can interact with MongoDB MCP?**
The server is designed to work with any LLM that supports the Model Context Protocol, like Claude.7:["$","