# MongoDB MCP Server

Connect agents to MongoDB databases and Atlas clusters.

The MongoDB MCP Server lets agents query collections and manage MongoDB Atlas clusters.

- Canonical URL: https://meetnewai.com/mcp/mongodb-mcp
- Official URL: https://www.mongodb.com/
- Pricing: Open source
- Verified: Checked Oct 18, 2026
- Repository: https://github.com/mongodb-js/mongodb-mcp-server
- License: Apache-2.0

## MCP Install Config

```json
{
  "name": "mongodb",
  "remote": false,
  "launch": "npx -y mongodb-mcp-server@latest --readOnly",
  "source": "https://github.com/mongodb-js/mongodb-mcp-server",
  "checked": "2026-10-18",
  "snippets": [
    {
      "id": "json",
      "code": "{\n  \"mcpServers\": {\n    \"mongodb\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"mongodb-mcp-server@latest\",\n        \"--readOnly\"\n      ],\n      \"env\": {\n        \"MDB_MCP_CONNECTION_STRING\": \"<CONNECTION_STRING>\"\n      }\n    }\n  }\n}"
    },
    {
      "id": "vscode",
      "code": "{\n  \"servers\": {\n    \"mongodb\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\n        \"-y\",\n        \"mongodb-mcp-server@latest\",\n        \"--readOnly\"\n      ],\n      \"env\": {\n        \"MDB_MCP_CONNECTION_STRING\": \"<CONNECTION_STRING>\"\n      }\n    }\n  }\n}"
    },
    {
      "id": "claude",
      "code": "claude mcp add mongodb -e MDB_MCP_CONNECTION_STRING='<CONNECTION_STRING>' -- npx -y mongodb-mcp-server@latest --readOnly"
    }
  ]
}
```
