mongodb avatar

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-code

Installs 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:

  1. Connection String (Option A): Direct connection to a specific cluster

    • Quick setup for single cluster
    • Requires MDB_MCP_CONNECTION_STRING environment variable
  2. 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_ID and MDB_MCP_API_CLIENT_SECRET environment variables
  3. 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

More from mongodb/agent-skills

All 8
1giuseppe-trisciuoglio avatartypescript-security-reviewgiuseppe-trisciuoglio/developer-kitProvides security review capability for TypeScript/Node.js applications, validates code against XSS, injection, CSRF, JWT/OAuth2 flaws, dependency CVEs, and sec4.1Kskills.sh installs
2dotnet avatarnuget-trusted-publishingdotnet/skillsSet up NuGet trusted publishing (OIDC) on a GitHub Actions repo — replaces long-lived API keys with short-lived tokens. USE FOR: trusted publishing, NuGet OIDC,4.1Kskills.sh installs
3softaworks avataropenapi-to-typescriptsoftaworks/agent-toolkitConverts OpenAPI 3.0 JSON/YAML to TypeScript interfaces and type guards. This skill should be used when the user asks to generate types from OpenAPI, convert sc4Kskills.sh installs
4yaklang avatar401-403-bypass-techniquesyaklang/hack-skills401/403 bypass playbook. Use when encountering access-denied responses on admin panels, API endpoints, or restricted paths. Covers path manipulation, HTTP metho4Kskills.sh installs
5tanstack-skills avatartanstack-starttanstack-skills/tanstack-skillsFull-stack React framework powered by TanStack Router with SSR, streaming, server functions, and deployment to any hosting provider.4Kskills.sh installs
6giuseppe-trisciuoglio avatarnestjs-code-reviewgiuseppe-trisciuoglio/developer-kitProvides comprehensive code review capability for NestJS applications, analyzing controllers, services, modules, guards, interceptors, pipes, dependency injecti4Kskills.sh installs