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.
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.
npx skills add mongodb/agent-skills --skill mongodb-mcp-setupgit clone --depth 1 https://github.com/mongodb/agent-skillsWrote 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.
[](https://agentmods.dev/skills/mongodb/agent-skills/mongodb-mcp-setup)<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.
<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>- Socket pass
- Snyk pass
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.
| Model | Per session | Once 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 |
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 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.
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:
-
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
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.
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.
- 14d ago Changed b3bd9b245a9d
- 16d ago Changed · +18 lines · +8 tokens per session 95984d79092d
- 17d ago Changed · +1 lines 45ca117a6769
- 3mo ago First seen · 325 lines · 57 tokens per session scan C a2916a602732
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.
mongodb-mcp-setup compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mongodb-mcp-setupmongodb/agent-skills | Skill | 211 | today | Apache-2.0 | C | 65 | Claude Code |
| azure-documentdbMicrosoftDocs/Agent-Skills | Skill | 827 | 25d ago | CC-BY-4.0 | A | 122 | Claude Code |
| mongodbG1Joshi/Agent-Skills | Skill | 16 | 2mo ago | MIT | A | 39 | Claude Code, Codex |
| database-schema-designPixel-Process-UG/superkit-agents | Skill | 4 | 8mo ago | MIT | A | 32 | Claude Code, Codex |
| deprecation-and-migrationaddyosmani/agent-skills | Skill | 122k | today | MIT | A | 69 | Claude Code |
| nosqliPurpleAILAB/Decepticon | Skill | 6.9k | 14d ago | Apache-2.0 | A | 38 | Claude Code, Codex |
| mongodb-natural-language-queryingfcakyon/claude-codex-settings | Skill | 1.2k | yesterday | Apache-2.0 | A | 162 | Claude Code |