
Mongodb Mcp Setup
Walks you through setting up the MongoDB MCP server with three authentication paths: connection string for single clusters, Atlas service account credentials for API access and multi-cluster work, or Atlas Local for zero-config Docker testing. The skill detects whether you're running Codex or a shell-based client and adjusts instructions accordingly, since Codex stores credentials in config.toml while others use shell environment variables. It's interactive and stepwise, checking existing config first so it doesn't make you redo work. The guide is careful about never asking you to paste credentials into the chat, instead directing you to add them yourself in Step 5. Worth noting it explicitly warns about IP allowlist requirements for service accounts, which will silently break your API calls if you skip it.
- skills.sh installs
- 4.2K
- GitHub stars
- 197
- last updated
- Aug 21, 2026
Install
$ npx -y skills add mongodb/agent-skills --skill mongodb-mcp-setup --agent claude-codeInstalls into .claude/skills of the current project.
Files
MongoDB MCP Server Setup
This skill guides users through configuring the MongoDB MCP server for use with an agentic client.
Overview
The MongoDB MCP server requires authentication. Users have three options:
-
Connection String (Option A): Direct connection to a specific cluster
- Quick setup for single cluster
- Requires
MDB_MCP_CONNECTION_STRINGenvironment variable
-
Service Account Credentials (Option B): MongoDB Atlas Admin API access
- Recommended for Atlas users - simplifies authentication and data access
- Access to Atlas Admin API and dynamic cluster connection via
atlas-connect-cluster - No manual DB user credential management
- Requires
MDB_MCP_API_CLIENT_IDandMDB_MCP_API_CLIENT_SECRETenvironment variables
-
Atlas Local (Option C): Local development with Docker
- Best for local testing - zero configuration required
- Runs Atlas locally in Docker, requires Docker installed
- No credentials or cloud cluster access
Sponsors
Details
- Repository
- github.com/mongodb/agent-skills
- Categories
- Backend & APIs, Documentation, AI & Agent Building, Databases
- First seen
- Jun 3, 2026