// ~/Library/Application Support/Claude/claude_desktop_config.json (MacOS)
// %APPDATA%/Claude/claude_desktop_config.json (Windows)
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": ["-y", "mcp-mongo-server"],
"env": {
"MCP_MONGODB_URI": "mongodb://username:password@localhost:27017/database"
}
},
"mongodb-readonly": {
"command": "npx",
"args": ["-y", "mcp-mongo-server"],
"env": {
"MCP_MONGODB_URI": "mongodb://username:password@localhost:27017/database",
"MCP_MONGODB_READONLY": "true"
}
}
}
}