MongoDB MCP Server connects AI agents to MongoDB databases and MongoDB Atlas clusters through the Model Context Protocol. It lets agents interact with self-managed MongoDB deployments locally or use the hosted Atlas MCP server through the official plugins. The catalogue entries provide agent integrations and guidance for using the server.
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-js/mongodb-mcp-server --skill mongodb-mcp-v3-migrationgit clone --depth 1 https://github.com/mongodb-js/mongodb-mcp-serverWrote 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-js/mongodb-mcp-server/mongodb-mcp-v3-migration)<a href="https://agentmods.dev/skills/mongodb-js/mongodb-mcp-server/mongodb-mcp-v3-migration"><img src="https://agentmods.dev/badge/skills/mongodb-js/mongodb-mcp-server/mongodb-mcp-v3-migration/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-js/mongodb-mcp-server/mongodb-mcp-v3-migration"><img src="https://agentmods.dev/badge/skills/mongodb-js/mongodb-mcp-server/mongodb-mcp-v3-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 16 findings, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Privilege Escalation · line 231 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
- high Privilege Escalation · line 232 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
- high Privilege Escalation · line 235 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
- high Privilege Escalation · line 258 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
- high Privilege Escalation · line 294 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
- high Privilege Escalation · line 295 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
- high Privilege Escalation · line 294 Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
- medium MCP Rug Pull · line 30 npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.Fix: Pin the version: npx @scope/[email protected]
- medium Prompt Injection · line 58 Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
- medium Prompt Injection · line 198 Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
- medium Prompt Injection · line 69 Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
- medium Prompt Injection · line 73 Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
- medium Prompt Injection · line 191 Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
- medium Prompt Injection · line 195 Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
- medium Prompt Injection · line 196 Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.Fix: Remove the large whitespace padding (blank-line blocks or long space runs) and review any content hidden below or to the right of it. Keep skill files compact and reviewable so no instructions can be
- medium MCP Rug Pull · line 322 npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.Fix: Pin the version: npx @scope/[email protected]
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.00153 | $0.05999 |
| Opus 5 | $0.00077 | $0.03000 |
| Sonnet 5 | $0.00031 | $0.01200 |
| Haiku 4.5 | $0.00015 | $0.00600 |
Grade A, and why
mongodb-mcp-v3-migration scanned grade A with 0 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 yesterday.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 437 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MongoDB MCP Server v1 → v3 migration
This skill migrates consumer code: projects that embed, customize, or extend
mongodb-mcp-server as a library (custom CLIs, HTTP hosts, custom tools, selective tool
registration, request-scoped configuration). It runs in the consumer's repository, not the
mongodb-mcp-server repo.
MCP_SERVER_LIBRARY.md now documents the v3 API surface (the scoped @mongodb-js/mcp-*
packages, runMcpCli, CliServer, MCPHttpServer.createServerForRequest, ToolBase/
ToolClass, …). Use it as the reference for the migration target; the before/after
sections in this skill and its inventory script map v1/v2 consumer code onto that surface.
v3 is sessionless. The v3 server has no
Session/CliSessionobject and no per-client session state anywhere. Each HTTP request (or stdio connection) gets a fresh request-scopedCliServerbuilt bycreateServerFromConfig; every heavy dependency (connections, exports, API client, telemetry, metrics, keychain) is built once per process insideSharedServerServicesand shared. Tools/resources read services offthis.server(there is nosession), and per-client identity travels on the tool request (ToolExecutionContext.request.clientInfo) rather than on a session object.
The core rule
mongodb-mcp-server is not a library in v3.
- End users:
npx mongodb-mcp-serveror the MCPB binary only. - Do not
npm install mongodb-mcp-serverandimport { … } from "mongodb-mcp-server"in application code. - Do not use the legacy
mongodb-mcp-server/toolsormongodb-mcp-server/webentry points.
Embed via the scoped packages instead: @mongodb-js/mcp-cli (custom CLI), @mongodb-js/mcp-* for everything else.
Step 1 — Inventory consumer code
# repo root of the consumer project; resolves skill-relative scripts against this skill's dir
scripts/inventory-consumer-code.sh .
The script lists every file that imports mongodb-mcp-server, shows the matched import
lines, and classifies each imported symbol to its v3 package. Anything reported as
unrecognized — manual review is a symbol the table doesn't know: look it up in the
v3 migration guide and the package's API report before deciding.
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- yesterday Changed · +23 lines b9c44d1542fc
- 2d ago Changed · +59 lines dddba965046a
- 7d ago Changed · +4 lines e4721f02f600
- 11d ago First seen · 351 lines · 153 tokens per session scan A 34f116d40ad4
mongodb-mcp-v3-migration is a skill published in the GitHub repository mongodb-js/mongodb-mcp-server (1,125 stars, last pushed today), licensed Apache-2.0. It adds 153 tokens to every session and 5,999 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
orchardcore-ai-chat
Skill for configuring AI Chat in Orchard Core using the CrestApps AI Chat module. Covers chat profiles, admin chat UI, frontend chat widgets, provider connections, and the AI Agent module for task automation. Use this skill when requests mention Orchard Core AI Chat, Configure AI Chat, Available AI Completion…
orchardcore-ai-connections
Skill for managing AI provider connections in Orchard Core using CrestApps AI modules. Covers connection creation, editing, deletion, provider configuration, deployment, and recipe-based provisioning for OpenAI, Azure OpenAI, Ollama, and Azure AI Inference. Use this skill when requests mention AI Connection…
orchardcore-custom-indexing-azureai
Skill for creating Orchard Core custom indexing pipelines for arbitrary data using Azure AI Search, based on CrestApps AI Memory and OrchardCore.Indexing patterns. Use this skill when requests mention Orchard Core Custom Indexing for Azure AI Search, Create a custom Azure AI Search index for arbitrary data, When to…
vector-backend-operations
Select and connect the right vector-store backend for the vector-mcp MCP server — chromadb, postgres/pgvector, qdrant, couchbase, or mongodb — and supply the correct dbtype/connection parameters that every collection and search call needs. Use when the agent must decide which engine to target, wire up…
vector-collection-management
Create, populate, list, and delete vector-store collections through the vector-mcp MCP server's vectorcollectionmanagement tool. Use when the agent must stand up a new RAG collection, ingest documents (from a directory, file paths/URLs, or raw text) into an existing collection, enumerate collections, or drop one …
vector-hybrid-search
Retrieve knowledge from a vector-store collection via the vector-mcp MCP server's vectorsearch tool — semantic (ANN) search, lexical BM25 search, or a hybrid of the two fused with Reciprocal Rank Fusion. Use when the agent must answer a question from an indexed corpus, pull top-k relevant chunks for RAG context, or…