The MongoDB MCP Server is a Model Context Protocol server designed for interacting with MongoDB databases and MongoDB Atlas.
From the registry: MongoDB Model Context Protocol Server
Please install the `mongodb-mcp-server` MCP server into my current AI client (that's you).
Required prerequisites (do these first if not already done):
- **Node.js 20.19+** — Node 20.19+ or 22.12+ (https://nodejs.org/)
- **MongoDB connection or Atlas credentials** — Server won't start without connection config
Canonical MCP server config (stdio transport):
- command: `npx`
- args: ["-y","mongodb-mcp-server","--readOnly"]
- required environment variables:
- `MDB_MCP_CONNECTION_STRING`: MongoDB connection string (example: `mongodb+srv://user:pass@cluster.mongodb.net/`)
Note: Official MongoDB MCP server. Runs in read-only mode by default. Remove --readOnly for write access.
Add this MCP server to my current client's config in the correct format for you. If you need secrets or credentials I haven't provided, ASK me — do not invent values or leave raw placeholders. After adding it, tell me how to verify the server is connected.MDB_MCP_CONNECTION_STRINGrequiredMongoDB connection string required to start the server.MDB_MCP_API_CLIENT_IDrequiredAtlas API Service Account client ID for authentication.MDB_MCP_API_CLIENT_SECRETrequiredAtlas API Service Account client secret for authentication.Minimal, token-efficient Database MCP Server for PostgreSQL, MySQL, SQL Server, SQLite, MariaDB