MongoDB (npx) MCP Server
CommunityContributed by MongoDB
Connect to MongoDB databases and Atlas clusters. Query collections, inspect schemas, manage indexes, and run aggregation pipelines through the official MongoDB MCP server.
About the MongoDB (npx) MCP Server
The MongoDB (npx) MCP server is a local (stdio) Model Context Protocol server available in the McpMux registry. Connect to MongoDB databases and Atlas clusters. Query collections, inspect schemas, manage indexes, and run aggregation pipelines through the official MongoDB MCP server. This is a community-contributed MCP server by MongoDB.
Install the MongoDB (npx) MCP server with one click using McpMux. It works with Cursor, Claude Desktop, Claude Code, VS Code, ChatGPT, Windsurf, JetBrains, and any MCP-compatible AI client. This server requires authentication — McpMux securely stores your credentials with AES-256-GCM encryption.
Transport Configuration
{
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mongodb-mcp-server@latest"
],
"env": {
"MDB_MCP_CONNECTION_STRING": "${input:MDB_MCP_CONNECTION_STRING}",
"MDB_MCP_API_CLIENT_ID": "${input:MDB_MCP_API_CLIENT_ID}",
"MDB_MCP_API_CLIENT_SECRET": "${input:MDB_MCP_API_CLIENT_SECRET}"
},
"metadata": {
"inputs": [
{
"id": "MDB_MCP_CONNECTION_STRING",
"label": "MongoDB Connection String",
"description": "MongoDB connection URI for your database. Supports local instances, Atlas clusters, and replica sets. Leave empty to use the runtime connect tool.",
"type": "text",
"required": false,
"secret": true,
"placeholder": "mongodb+srv://username:[email protected]/mydb",
"obtain": {
"url": "https://www.mongodb.com/docs/manual/reference/connection-string/",
"instructions": "1. For MongoDB Atlas: Go to your cluster > Connect > Drivers\n2. Copy the connection string\n3. Replace <password> with your database password\n4. For local MongoDB: use mongodb://localhost:27017/mydb",
"button_label": "Learn More"
}
},
{
"id": "MDB_MCP_API_CLIENT_ID",
"label": "Atlas API Client ID",
"description": "MongoDB Atlas Service Account client ID for Atlas management operations (create clusters, manage users, IP access lists). Optional — only needed for Atlas administration.",
"type": "text",
"required": false,
"secret": true,
"placeholder": "mdb_sa_id_...",
"obtain": {
"url": "https://www.mongodb.com/docs/atlas/configure-api-access/",
"instructions": "1. Go to MongoDB Atlas > Organization Settings > Service Accounts\n2. Create a new Service Account with required roles\n3. Copy the Client ID",
"button_label": "Configure API Access"
}
},
{
"id": "MDB_MCP_API_CLIENT_SECRET",
"label": "Atlas API Client Secret",
"description": "MongoDB Atlas Service Account client secret. Required when Atlas API Client ID is provided.",
"type": "text",
"required": false,
"secret": true,
"placeholder": "mdb_sa_sk_...",
"obtain": {
"url": "https://www.mongodb.com/docs/atlas/configure-api-access/",
"instructions": "1. Go to MongoDB Atlas > Organization Settings > Service Accounts\n2. Create or select a Service Account\n3. Copy the Client Secret (shown only once at creation)",
"button_label": "Configure API Access"
}
}
]
}
}Categories
Tags
Supported AI Clients
The MongoDB (npx) MCP server works with all MCP-compatible AI clients through McpMux:
Related MCP Servers
MongoDB (Docker)
Connect to MongoDB databases and Atlas clusters via Docker. Query collections, inspect schemas, manage indexes, and run aggregation pipelines in an isolated container.

PostgreSQL (Docker)
Query PostgreSQL databases, analyze performance, and optimize indexes via Docker. Execute SQL, inspect schemas, get EXPLAIN plans, identify slow queries, and run health checks.

PostgreSQL (uvx)
Query PostgreSQL databases, analyze performance, and optimize indexes. Execute SQL, inspect schemas, get EXPLAIN plans, identify slow queries, and run health checks via Postgres MCP Pro.
Redis (Docker)
Interact with Redis databases via Docker. Execute commands, manage keys, and work with data structures across standalone, cluster, and Sentinel modes.
Redis (uvx)
Interact with Redis databases. Execute commands, manage keys, and work with data structures across standalone, cluster, and Sentinel modes.
Supabase (Remote)
Manage Supabase projects, databases, edge functions, storage, and authentication through Supabase's hosted remote MCP server. Authenticates via OAuth, no local setup required.
Install MongoDB (npx) with McpMux
One-click install from the McpMux desktop app. Auto-configures for Cursor, Claude, VS Code, ChatGPT, Windsurf, JetBrains, and any MCP-compatible client.