mongodb-mcp-setup

Guides configuration of MongoDB MCP server authentication and environment variables.

4|Updated Mar 28, 2026
One-click install
npx skills add https://github.com/minexo79/coser-card-maker --skill mongodb-mcp-setup-minexo79
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mongodb-mcp-setup
Source: https://github.com/minexo79/coser-card-maker/tree/main/.kilo/skills/mongodb-mcp-setup
Command: npx skills add https://github.com/minexo79/coser-card-maker --skill mongodb-mcp-setup-minexo79

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up the MongoDB MCP server requires choosing between connection string, Atlas service account, or local Docker authentication, then correctly exporting environment variables into a shell profile. This Skill walks users through that entire configuration process step by step, detecting existing setup and avoiding common pitfalls like missing API Access List entries. ## Core Features & Use Cases - Environment Detection: Checks for existing MDB_MCP_* variables with masked output so credentials are never exposed, and handles partial or conflicting configurations. - Three Auth Paths: Guides setup via connection string, Atlas service account (with API Access List configuration), or Atlas Local with Docker for zero-credential local testing. - Secure Credential Handling: Instructs users to store secrets in a chmod 600 ~/.mcp-env file sourced from their shell profile, with read-only mode support via MDB_MCP_READ_ONLY. - Use Case: A developer installs the MongoDB MCP server but Atlas Admin API calls keep failing. The Skill detects only a connection string is set, explains service account credentials are required, and walks through creating them and adding the IP to the API Access List. ## Quick Start Ask the assistant to help you configure the MongoDB MCP server environment variables for your Atlas cluster.

Frequently Asked Questions about mongodb-mcp-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure the MongoDB MCP server environment variables?

Set MDB_MCP_CONNECTION_STRING for direct cluster access, or MDB_MCP_API_CLIENT_ID and MDB_MCP_API_CLIENT_SECRET for Atlas service account auth. Store them in a ~/.mcp-env file with chmod 600 permissions and source it from your shell profile, then restart your client.

MongoDB MCP connection string vs service account, which should I use?

Use a connection string for single-cluster access with existing database credentials. Use a service account if you need Atlas Admin API operations like cluster management, user creation, or performance advisor across multiple clusters.

Can I use MongoDB MCP server locally without Atlas credentials?

Yes, Atlas Local runs MongoDB in Docker with zero configuration and no credentials required. Verify Docker is installed with docker info, then use atlas-local-create-deployment to spin up local deployments.

Why do MongoDB Atlas Admin API calls fail with the MCP server?

Atlas Admin API calls fail when your IP address is missing from the service account's API Access List. Add your current IP or CIDR range on the service account details page, and avoid 0.0.0.0/0 except for temporary testing.

How do I enable read-only mode for the MongoDB MCP server?

Set export MDB_MCP_READ_ONLY="true" in your ~/.mcp-env file alongside your authentication variables. Omitting this variable defaults to read-write access, and you can verify it with env | grep ^MDB_MCP_READ_ONLY.