mongodb-mcp-v3-migration

mongodb-mcp-v3-migration is a skill for Claude Code, Codex from mongodb-js/mongodb-mcp-server. It costs 153 tokens per session (6,190 once invoked), scanned A, original, Apache-2.0.

A migration guide for projects that embed or customize MongoDB’s MCP server, a tool that lets AI assistants work with MongoDB. It moves code from the old single-package API to the version 3 set of scoped packages.

In plain words
What is it for?
Inventorying old integrations and updating custom command-line programs, web hosts, sessions, configurations, and custom tools to the version 3 API.
Why use it?
It prevents consumer projects from relying on package names and entry points that version 3 no longer provides as a library.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Inventorying old integrations and updating custom command-line programs, web hosts, sessions, configurations, and custom tools to the version 3 API.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mongodb-js/mongodb-mcp-server/mongodb-mcp-v3-migration
About the project

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.

mongodb-js/mongodb-mcp-server · 1,150 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-js/mongodb-mcp-server --skill mongodb-mcp-v3-migration
Clone the repo
git clone --depth 1 https://github.com/mongodb-js/mongodb-mcp-server

Made for: Claude Code, Codex.

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-v3-migration

README.md
[![agentmods](https://agentmods.dev/badge/skills/mongodb-js/mongodb-mcp-server/mongodb-mcp-v3-migration/github.svg)](https://agentmods.dev/skills/mongodb-js/mongodb-mcp-server/mongodb-mcp-v3-migration)
Your own site
<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.

agentmods 80×15 button for mongodb-mcp-v3-migration

Your own site · 80×15
<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>
Per session 153 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,190 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
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]
How audits are shown
Origin original No closer match found 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.00153 $0.06190
Opus 5.5 $0.00061 $0.02476
Sonnet 5.5 $0.00031 $0.01238
Haiku 4.5 $0.00015 $0.00619

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

Security

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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/inventory-consumer-code.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/mongodb-mcp-v3-migration/SKILL.md · 451 lines

How it starts

The opening of the file, as written. The whole thing — 451 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 / CliSession object and no per-client session state anywhere. Each HTTP request (or stdio connection) gets a fresh request-scoped CliServer built by createServerFromConfig; every heavy dependency (connections, exports, API client, telemetry, metrics, keychain) is built once per process inside SharedServerServices and shared. Tools/resources read services off this.server (there is no session), 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-server or the MCPB binary only.
  • Do not npm install mongodb-mcp-server and import { … } from "mongodb-mcp-server" in application code.
  • Do not use the legacy mongodb-mcp-server/tools or mongodb-mcp-server/web entry 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.

Read the full file on GitHub · 451 lines

Files

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.

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. 1mo ago Changed db7815f80b8d
  2. 1mo ago Changed · +14 lines ba68bd9b89b1
  3. 1mo ago Changed · +23 lines b9c44d1542fc
  4. 1mo ago Changed · +59 lines dddba965046a
  5. 1mo ago Changed · +4 lines e4721f02f600
  6. 1mo ago First seen · 351 lines · 153 tokens per session scan A 34f116d40ad4

Subscribe to this mod's changes

mongodb-mcp-v3-migration is a skill published in the GitHub repository mongodb-js/mongodb-mcp-server (1,150 stars, last pushed today), licensed Apache-2.0. It adds 153 tokens to every session and 6,190 once invoked, about $0.0006 per session on Opus 5.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.

Related

Other skills, from other repositories

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…

Knuckles-Team/vector-mcp · 113 tokens

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 …

Knuckles-Team/vector-mcp · 123 tokens

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…

Knuckles-Team/vector-mcp · 113 tokens

vector-mcp-operations

Operate vector-mcp through its governed MCP and Arbora capabilities. Use for collection lifecycle, root-confined document ingestion, semantic or lexical retrieval, hybrid search, backend readiness, troubleshooting, and sanitized verification evidence.

Knuckles-Team/vector-mcp · 48 tokens

td-api-reference

MUST READ before writing TD Python via executepython, setdatcontent, or editdatcontent, and before any heavy build. Parameters, storage, operators, referencing, threading, cook model, heavy-build safety caps.

dylanroscover/Embody · 48 tokens

manage-annotations

MUST READ before creating, modifying, or querying annotations. Contains parameter names, coordinate model, and API quirks.

dylanroscover/Embody · 28 tokens