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 (5,999 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,125 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 5,999 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.05999
Opus 5 $0.00077 $0.03000
Sonnet 5 $0.00031 $0.01200
Haiku 4.5 $0.00015 $0.00600

Measured yesterday against content hash b9c44d1542fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 yesterday.

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 · 437 lines

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 / 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 · 437 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. yesterday Changed · +23 lines b9c44d1542fc
  2. 2d ago Changed · +59 lines dddba965046a
  3. 7d ago Changed · +4 lines e4721f02f600
  4. 11d 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,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.

Related

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…

CrestApps/CrestApps.AgentSkills · 208 tokens

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…

CrestApps/CrestApps.AgentSkills · 201 tokens

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…

CrestApps/CrestApps.AgentSkills · 200 tokens

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