Overview
MCP MongoDB Server is a Model Context Protocol server designed to facilitate access to MongoDB databases, allowing large language models (LLMs) to inspect collection schemas and execute read-only queries.
To use MCP MongoDB Server, install the necessary dependencies and configure it according to your environment. Add the server configuration to your Claude Desktop setup, specify your MongoDB URI, and execute queries as required.
- Access collection schemas via
mongodb://URIs with name, description, and schema information. - Execute read-only queries and aggregations against the connected database. - Prompt-based insights into collection structure, data types, and basic statistics.
- Analyzing data structures in a MongoDB database.
- Executing read-only queries to gather insights without modifying data.
- Integrating with LLM applications for data extraction and analysis.
Add to your AI client
Use these steps to connect MCP MongoDB Server 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": {
"mcp-mongo-server-kiliczsh": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-mongo-server-kiliczsh"
]
}
}
}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": {
"mcp-mongo-server-kiliczsh": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-mongo-server-kiliczsh"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mcp-mongo-server-kiliczsh": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-mongo-server-kiliczsh"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mcp-mongo-server-kiliczsh": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-mongo-server-kiliczsh"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-mongo-server-kiliczsh": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-mongo-server-kiliczsh"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mcp-mongo-server-kiliczsh": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-mongo-server-kiliczsh"
]
}
}
}FAQ
What is the primary function of MCP MongoDB Server?
It provides read-only access to MongoDB through specialized queries, allowing integration with LLMs.
How do I install MCP MongoDB Server?
You can install it using npm by running `npm install mcp-mongo-server`.
Is it safe to use with live databases?
Yes, all queries are executed with read-only permissions, ensuring data integrity.