mongodb-mcp-setup

mongodb-mcp-setup is a skill for Claude Code from mongodb/agent-skills. It costs 65 tokens per session (3,930 once invoked), scanned C, a copy of mongodb-mcp-setup, Apache-2.0.

A setup guide for connecting the MongoDB MCP server to a database. It explains connection strings, MongoDB Atlas service-account access, and Atlas Local, which runs MongoDB locally in Docker.

In plain words
What is it for?
Use it when MongoDB connection settings are missing, when configuring Atlas access, or when setting up a local Docker-based development database.
Why use it?
It helps identify the right connection method and required settings without asking the agent to handle secret credentials. The guide adapts its instructions to the user's environment.

Skill for Claude Code ✓ vendor

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Claude Code; reads ~/.codex paths; mentions Codex.

Part of the mongodb plugin — 1 skill shipped together

Good fit Use it when MongoDB connection settings are missing, when configuring Atlas access, or when setting up a local Docker-based development database.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mongodb/agent-skills/mongodb-mcp-setup
About the project

MongoDB Agent Skills is an official collection of skills and plugins that help AI coding agents work with MongoDB databases, including Atlas and self-managed deployments. Developers use it for query writing, schema design, query optimization, Atlas Search, and vector search. The catalogue entries are MongoDB’s own agent skills, plugins, and setup instructions.

mongodb/agent-skills · 211 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mongodb/agent-skills --skill mongodb-mcp-setup
Clone the repo
git clone --depth 1 https://github.com/mongodb/agent-skills

Made for: Claude Code.

Or install mongodb, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mongodb-mcp-setup

README.md
[![agentmods](https://agentmods.dev/badge/skills/mongodb/agent-skills/mongodb-mcp-setup/github.svg)](https://agentmods.dev/skills/mongodb/agent-skills/mongodb-mcp-setup)
Your own site
<a href="https://agentmods.dev/skills/mongodb/agent-skills/mongodb-mcp-setup"><img src="https://agentmods.dev/badge/skills/mongodb/agent-skills/mongodb-mcp-setup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mongodb-mcp-setup

Your own site · 80×15
<a href="https://agentmods.dev/skills/mongodb/agent-skills/mongodb-mcp-setup"><img src="https://agentmods.dev/badge/skills/mongodb/agent-skills/mongodb-mcp-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,930 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Nov 2026
  • Snyk pass 19 Nov 2026
How audits are shown
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00065 $0.03930
Opus 5.5 $0.00026 $0.01572
Sonnet 5.5 $0.00013 $0.00786
Haiku 4.5 $0.00006 $0.00393

Measured 14d ago against content hash b3bd9b245a9d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

mongodb-mcp-setup scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 14d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

chmod 600 ~/.mcp-env

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- **If any `CODEX_*` variables are present** → the user is running **Codex**. Credentials are stored in `~/.codex/config.toml` (macOS/Linux) or `%USERPROFILE%\.codex\config.toml` (Windows), not in shell environment varia
Origin

This is a copy

100% identical to mongodb-mcp-setup — 27 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

plugins/mongodb/skills/mongodb-mcp-setup/SKILL.md · 344 lines

How it starts

The opening of the file, as written. The whole thing — 344 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

This is an interactive step-by-step guide. The agent detects the user's environment and provides tailored instructions, but never asks for or handles credentials — users add those directly to their shell profile or agentic client config in Step 5. Make this clear to the user whenever credentials come up in Steps 3a and 3b.

Step 0: Detect Client

Before anything else, determine which agentic client the user is running. This controls how credentials are configured in Step 1 and Step 5.

Run:

env | grep "^CODEX_"
  • If no CODEX_* variables are present → the user is running a shell-based client (Claude, Cursor, Gemini CLI, Copilot CLI, etc.). Credentials are configured via shell profile environment variables.
  • If any CODEX_* variables are present → the user is running Codex. Credentials are stored in ~/.codex/config.toml (macOS/Linux) or %USERPROFILE%\.codex\config.toml (Windows), not in shell environment variables. The desktop app does not inherit shell env vars when launched from Finder, Launchpad, or the Windows Start menu.

Read the full file on GitHub · 344 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 14d ago Changed b3bd9b245a9d
  2. 16d ago Changed · +18 lines · +8 tokens per session 95984d79092d
  3. 17d ago Changed · +1 lines 45ca117a6769
  4. 3mo ago First seen · 325 lines · 57 tokens per session scan C a2916a602732

Subscribe to this mod's changes

mongodb-mcp-setup is a skill published in the GitHub repository mongodb/agent-skills (211 stars, last pushed today), licensed Apache-2.0. It adds 65 tokens to every session and 3,930 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it C with 2 findings (asks for root, reads agent configuration directories). It is 100% identical to mongodb-mcp-setup, differing in 27 lines, and is treated as a copy.

Related

mongodb-mcp-setup compared with skills from other repositories

mongodb-mcp-setup next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mongodb-mcp-setupmongodb/agent-skillsSkill211todayApache-2.0C65Claude Code
azure-documentdbMicrosoftDocs/Agent-SkillsSkill82725d agoCC-BY-4.0A122Claude Code
mongodbG1Joshi/Agent-SkillsSkill162mo agoMITA39Claude Code, Codex
database-schema-designPixel-Process-UG/superkit-agentsSkill48mo agoMITA32Claude Code, Codex
deprecation-and-migrationaddyosmani/agent-skillsSkill122ktodayMITA69Claude Code
nosqliPurpleAILAB/DecepticonSkill6.9k14d agoApache-2.0A38Claude Code, Codex
mongodb-natural-language-queryingfcakyon/claude-codex-settingsSkill1.2kyesterdayApache-2.0A162Claude Code