MongoDB
Official
🗄️ Data & Files
Query and manage MongoDB databases. Run queries, inspect collections, create indexes, and manipulate documents with the official MongoDB MCP server.
Tools (42)
Client configuration
Cursor (.cursor/mcp.json)
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"mongodb-mcp-server@2.1.1"
],
"env": {
"MONGODB_URI": "your-mongodb-uri-here"
}
}
}
}VS Code (.vscode/mcp.json)
{
"servers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"mongodb-mcp-server@2.1.1"
],
"env": {
"MONGODB_URI": "your-mongodb-uri-here"
},
"type": "stdio"
}
}
}Replace the placeholders before connecting. Authorize in your client when prompted.
The Cursor JSON also works in Claude Desktop's local MCP configuration. Install the required runtime and local software first.