/mcp-builder-v2:mcp-builder-v2from MCP Builder v2
MCP server work on SDK v2 and spec 2026-07-28, in TypeScript or Python: building a new server, migrating one off SDK v1 (@modelcontextprotocol/sdk, FastMCP), checking a server for v1 drift, or writing its evaluations. Use instead of mcp-builder.
Ships in MCP Builder v2. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Most MCP code ever published is SDK v1, so code written from memory drifts to v1. In TypeScript, drifted code usually still compiles against the v2 packages, passes the default Inspector, and passes a default-client test. Then it fails every client that speaks the modern era (2026-07-28). Three habits prevent that:
templates/ or a reference/ file. Recall is for your service's domain logic, not for SDK wiring.scripts/; all versions live in pins.json.<skill> below means this skill's directory.
| Question | Answer |
|---|---|
| Language | TypeScript, unless the user's project or request is Python |
| TS packages | @modelcontextprotocol/server (+ /node, /express for HTTP); zod ≥ 4.2, imported as import * as z from 'zod/v4'. Exact ranges: pins.json |
| Python package | mcp[cli]>=2.3,<3; from mcp.server import MCPServer |
| Local transport | stdio. TS: serveStdio(() => createServer(deps)). Py: mcp.run() |
| Remote transport | Streamable HTTP at /mcp. TS: createMcpHandler(() => createServer(deps)) on createMcpExpressApp(). Py: mcp.run(transport="streamable-http", stateless_http=True) |
| Legacy (2025) clients | served, through the SDK defaults; leave the legacy option unset |
| State across calls | explicit handles returned by tools; never sessions |
| Input from the user mid-call | returned input_required. TS: inputRequired(...), asked only while inputResponse(...) is missing. Py: Resolve + Elicit, parameter typed ElicitationResult[...]. A decline or cancel ends the call with a normal "did not" reply |
| Logging | stderr (console.error / logging); never stdout, never protocol logging |
| Tool output | outputSchema + structuredContent + the same JSON as one text block |
| Recoverable tool failure | TS: isError: true result. Py: raise ToolError(...). The message says what failed and what to try next. |
| Resource/prompt failure | TS: ProtocolError / ResourceNotFoundError. Py: MCPError / ResourceNotFoundError |
| Server-to-client sampling, roots, HTTP+SSE, tasks | out of scope: deprecated or extension-only (reference/protocol.md) |
| Layer | TypeScript | Python | Rule |
|---|---|---|---|
| Functional core | src/domain.ts | <pkg>/domain.py | types, pure helpers, and the interface of the data source; no I/O, no MCP imports |
| Declaration | src/server.ts | <pkg>/server.py | createServer(deps) / create_server(api) registers tools; no transport, no env, no ports |
| Imperative shell: deps | src/deps.ts (loadDeps) | <pkg>/__main__.py (load_api) | builds the real adapter (HTTP client, DB, file read) that implements the interface; the only env reads |
| Imperative shell: serving | src/stdio.ts, src/http.ts | <pkg>/__main__.py (main) | SDK serving lines, fixed: never edit them. Configure with HOST/PORT/ALLOWED_HOSTS |
| Contract | test/server.test.ts | tests/test_server.py | the real server, a fake data source defined in the test, both eras |
Ambiguity gets pushed to the edges: the core cannot fail on protocol details, the serving lines are copied and never edited, and the only shell code you write is dependency construction.
<skill>/templates/typescript/ or <skill>/templates/python/ to the project directory.catalog_* tools; step 3 replaces them.
name in package.json, and the server name string in src/server.ts, src/stdio.ts and src/http.ts.name and packages in pyproject.toml, the package directory, the server name string in server.py, and the two test imports.npm installpython -m venv .venv && .venv/bin/pip install -e ".[dev]"<skill>/reference/typescript.md or <skill>/reference/python.md once, now.Done when: the template's tests pass, 8/8 (4 tests × 2 eras), and node <skill>/scripts/check_v2.mjs . is GREEN.
{service}_{verb}_{noun}), one-line purpose, inputs with bounds, output fields, the four annotations, and the upstream (endpoint, query or collection).<skill>/reference/design.md.Done when: every requested (or common read) operation has a row, every unbounded list has limit/offset (or a cursor), and every row has all four annotations decided.
loadDeps or load_api.catalog_get_product (single item) or catalog_search_products (list). The shape: input schema with described and bounded fields, output schema, the four annotations from your table, structured result, and a recoverable error that names the next step.catalog_* tools, their tests and the template's sample data.Resources and prompts follow the matching reference section. A tool that needs user confirmation, or state across rounds, follows "Asking the user mid-call" there, plus <skill>/reference/protocol.md.
Done when: every table row is registered and tested, no catalog example remains, and the test suite is GREEN in both eras.
Run gates 1–3 from <skill>/reference/verify.md, in order. Every RED line names its cause; for check_v2 findings, the rule id is explained in <skill>/reference/drift.md.
node <skill>/scripts/check_v2.mjs .npm run typecheck && npm test, or .venv/bin/pytest -q (npm test runs through tsx, which does not type-check)verify_server against the real stdio command:
node <skill>/scripts/verify_server.mjs --cwd . -- <stdio command>node <skill>/scripts/verify_server.mjs --url http://127.0.0.1:<port>/mcp --cwd . --start -- <http command>Done when: gates 1–3 print GREEN and their output is pasted into your summary.
This is gate 4.
<skill>/reference/evaluation.md).<skill>/scripts/evaluation.py against the server.Done when: the report exists, and every tool problem it raises is either fixed or written down as known with a reason.
function createServer() { …; return server; }) that the existing entry file hands to serveStdio / createMcpHandler. The template layout is for new servers, or for a restructure the user asked for.
check_v2 (it catches what the codemod leaves).check_v2 finding by finding.<skill>/reference/drift.md, "Migrating existing v1 code".<skill>/reference/protocol.md.https://ts.sdk.modelcontextprotocol.io/v2/llms.txt, https://py.sdk.modelcontextprotocol.io/v2/). A page showing @modelcontextprotocol/sdk imports or FastMCP is v1 documentation; switch to the v2 page. Run check_v2 on whatever you write from it.<skill>/reference/maintenance.md, with node <skill>/scripts/check_pins.mjs --online.LICENSE.txt (opens in a new tab)pins.json (opens in a new tab)reference/design.md (opens in a new tab)reference/drift.md (opens in a new tab)reference/evaluation.md (opens in a new tab)reference/maintenance.md (opens in a new tab)reference/protocol.md (opens in a new tab)reference/python.md (opens in a new tab)reference/typescript.md (opens in a new tab)reference/verify.md (opens in a new tab)scripts/check_pins.mjs (opens in a new tab)scripts/check_v2.mjs (opens in a new tab)scripts/conformance_scope.json (opens in a new tab)scripts/drift_rules.json (opens in a new tab)scripts/evaluation.py (opens in a new tab)scripts/example_evaluation.xml (opens in a new tab)scripts/requirements.txt (opens in a new tab)scripts/test_evaluation.py (opens in a new tab)scripts/verify_server.mjs (opens in a new tab)templates/python/README.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub ancplua/mcp-builder-v2 --plugin mcp-builder-v2