A Model Context Protocol server for interacting with MongoDB Databases
MongoDB MCP Server
A Model Context Protocol server for interacting with MongoDB Databases and MongoDB Atlas.
📚 Table of Contents
Prerequisites
- Node.js
- At least 20.19.0
- When using v22 then at least v22.12.0
- Otherwise any version 23+
`
Tools (2)
mongodb_queryExecute queries against a MongoDB databasemongodb_atlas_list_clustersList MongoDB Atlas clustersEnvironment Variables
MDB_MCP_CONNECTION_STRINGrequiredThe MongoDB connection string for database accessMDB_MCP_ATLAS_API_KEYAPI key for MongoDB Atlas managementConfiguration
{"mcpServers": {"mongodb": {"command": "npx", "args": ["-y", "mongodb-mcp-server"], "env": {"MDB_MCP_CONNECTION_STRING": "mongodb+srv://user:password@cluster.mongodb.net/"}}}}