MongoDB read-only via npx
Compatible stdio MCP client
{
"mcpServers": {
"MongoDB": {
"command": "npx",
"args": [
"-y",
"mongodb-mcp-server@latest",
"--readOnly"
],
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/myDatabase"
}
}
}
}Requires Node.js 22.13+ and a reachable MongoDB instance. Read-only mode enabled.