# MCP Server v2 Production Pack

> Eight agent skills and two scripts that make your AI agent write MCP servers for SDK v2 and spec 2026-07-28: hints, OAuth, security, tests, registry.

MCP Server v2 Production Pack is a paid AI agent skill on Agensi by Abdalkader Alhamoud, in APIs & Backend. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $24 (one-time purchase)
- Creator: [Abdalkader Alhamoud](https://www.agensi.io/creators/abdalkaderdev)
- Category: [APIs & Backend](https://www.agensi.io/skills/apis-backend)
- Version: 1.1
- Last updated: 2026-10-13
- Security: scan passed (2026-10-13); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/mcp-server-v2-production-pack
- Tags: ai-agents, api, mcp-protocol, typescript, python, api-development, mcp, model-context-protocol

## About this skill

Ask an agent for an MCP server today and you get last year's code: `@modelcontextprotocol/sdk` imports and `server.tool(...)` (removed in SDK v2), the deprecated SSE transport, a shared bearer token passed off as auth, zod 3 that compiles and then breaks the first `tools/list`, and tools with one annotation hint or none. That last one now blocks OpenAI plugin submission, which requires explicit `readOnlyHint`, `destructiveHint` and `openWorldHint` on every tool, and gets servers flagged by trust indexes.

This pack gives the agent current rules, checked against the 2026-07-28 specification, the TypeScript SDK 2.3 source and docs, and the Python and Go SDKs.

### What's inside

- **mcp-server-production**: version table, routing, pre-flight checklist, the boundaries that change behaviour.
- **mcp-v2-server**: factory pattern, `registerTool`/resources/prompts with zod 4, `serveStdio` and `createMcpHandler` serving both protocol eras, elicitation, Python `MCPServer` and Go equivalents.
- **mcp-tool-design**: names, descriptions, schemas, structured output, all four hints with a decision table, `isError` vs protocol errors, OpenAI review rules, trust-index flags.
- **mcp-v1-to-v2-migration**: the official codemod, then the silent breaks it cannot see (raw `-32001` checks, falsy `structuredContent`, legacy OAuth errors that turn 401s into 500s).
- **mcp-remote-auth**: Streamable HTTP on Node, Express, Hono and Workers; Host/Origin checks; an OAuth resource server with protected resource metadata and audience validation, tested end to end.
- **mcp-security**: path traversal, command injection, SSRF, secrets, error leakage, tool poisoning, token passthrough, with tested guard code.
- **mcp-testing**: Inspector CLI, in-process tests, stdio, pytest and Go recipes, CI.
- **mcp-distribution**: npm, Docker, `.mcpb` bundles, official registry `server.json`, configs for Claude Code, Codex, Cursor and Gemini CLI.

### Scripts included

`lint-mcp-server.mjs` connects to any MCP server over stdio or HTTP and flags missing hints, weak or injected descriptions and risky parameters. `migrate-imports.mjs` rewrites v1 imports and lists every leftover v1 idiom with file and line. Both are zero-dependency Node.

### Versions

MCP spec 2026-07-28, TypeScript SDK 2.3, Python mcp 2.3, Go go-sdk 1.8, Inspector 2.10, registry schema 2025-12-11.

## Requires

- @modelcontextprotocol/inspector
- Node.js
- @modelcontextprotocol/codemod
- Lint MCP
- Python
- V2 Server MCP
- Tool Design MCP
- pkg
- MCP-Protocol-Version
- Mcp-Method
- Mcp-Name
- Mcp-Param
- installs
- Publisher MCP
- when preparing an MCP
- uv (Python tool runner)
- @acme/notes-mcp
- tsc

## Known limitations

Requires Node 20+ and Zod 4.2.0+. No support for deprecated SSE transport in v2. Python requires mcp 2.x (FastMCP is renamed). Stdio transport forbids stdout logging.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the MCP Server v2 Production Pack skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill differ from just prompting an AI for MCP server code?

This skill is specifically tuned for the 2026-07-28 protocol and v2 SDKs, preventing the common issue where generic LLMs generate outdated v1 code that causes breaking changes in modern environments.

### Which programming languages and SDK versions are supported?

It supports TypeScript (Node 20+), Python (MCPServer), and Go (v1.8+), and provides migration paths from the deprecated monolithic SDK to the new modular v2 packages.

### Can I use this to upgrade my existing MCP servers or only for new builds?

Both. The migration skill runs the official codemod, then finds the v1 leftovers it misses (raw -32001 checks, falsy structuredContent checks, legacy OAuth errors) with file and line, and the linter checks every tool for the explicit hints OpenAI's plugin review requires.

### Does the skill assist with security hardening and registry approval?

It provides production-grade security patterns, including path traversal protection and RFC 9728 OAuth metadata, to ensure your server is safe for remote deployment and registry submission.

### Are the servers created with this skill compatible with Claude Code and Cursor?

Servers built with this skill are fully compatible with any host using the latest protocol revision, including Claude Code, Cursor, and other modern LLM environments.

### What exactly is included in the purchase?

Eight skills (server setup, tool design, v1 to v2 migration, remote auth, security, testing, distribution and an entry checklist) and two zero-dependency Node scripts: an MCP server linter that connects over stdio or HTTP, and a v1 import migrator.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
