- Home
- Skills
- APIs & Backend
- MCP Server v2 Production Pack
Works with the AI Agents you already use
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.
$24
MCP Server v2 Production Pack
Example session with this skill installed
OpenAI's plugin form rejected our MCP server and a trust index flagged it. Our server has one tool called run that takes a free-form command string and passes it straight to git through a shell, with only readOnlyHint: true set. Fix it.
- Read your context and instructions
- Compiled the mcp server v2
Summary
The linter found 3 errors and 5 warnings: two missing hints OpenAI requires, a shell-injection parameter, a generic executor and a read-only hint on a tool that can run git push. The agent replaced it with one tool per operation and the rerun is clean.
Linter, before
$ node lint-mcp-server.mjs -- node dist/server.js
server: repo-tools 1.0.0 protocol: 2025-11-25 (legacy) tools: 1
ERROR run risky-shell-param Parameter "command" looks like free-form shell or code input.
ERROR run hint-missing destructiveHint is not set; OpenAI plugin review requires an explicit boolean.
ERROR run hint-missing openWorldHint is not set; OpenAI plugin review requires an explicit boolean.
WARN run generic-executor Generic executor name. Expose each operation as its own tool.
WARN run description-weak Description is 2 word(s).
WARN run param-undocumented Parameters without a description: command.
WARN run hint-missing idempotentHint is not set.
WARN run hint-mismatch Name starts with a write verb but readOnlyHint=true.
3 error(s), 5 warning(s), 2 note(s)
Fixed tool
const run = promisify(execFile);
server.registerTool(
'git_log',
{
title: 'Git log',
description: 'List the latest commits on one branch of the configured repository. Returns up to 20 one-line entries. Read-only.',
inputSchema: z.object({
branch: z.string().regex(/^[A-Za-z0-9._\/-]{1,100}$/).describe('Branch name, for example main'),
limit: z.number().int().min(1).max(20).default(10).describe('Number of commits to return')
}),
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
},
async ({ branch, limit }) => {
if (branch.startsWith('-')) return { content: [{ type: 'text', text: 'Branch names cannot start with "-".' }], isError: true };
try {
const { stdout } = await run('git', ['log', '--oneline', '-n', String(limit), branch, '--'], { timeout: 10_000, maxBuffer: 1_000_000 });
return { content: [{ type: 'text', text: stdout || 'No commits.' }] };
} catch {
return { content: [{ type: 'text', text: `Unknown branch "${branch}". Call git_branches to list branches.` }], isError: true };
}
}
);
Linter, after
server: repo-tools 1.1.0 protocol: 2025-11-25 (legacy) tools: 1
INFO git_log output-schema-missing No outputSchema. Add one and return structuredContent when callers need typed results.
0 error(s), 0 warning(s), 1 note(s)
Both servers were built against @modelcontextprotocol/server 2.3.1 and this is the linter's real output.
Next steps
- Add
git_branchesthe same way and serverinstructions. - Add the contract test from
mcp-testingso CI fails if any tool loses a hint.
Connects securely to your tools. The creator never sees your data.
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,serveStdioandcreateMcpHandlerserving both protocol eras, elicitation, PythonMCPServerand Go equivalents. - mcp-tool-design: names, descriptions, schemas, structured output, all four hints with a decision table,
isErrorvs protocol errors, OpenAI review rules, trust-index flags. - mcp-v1-to-v2-migration: the official codemod, then the silent breaks it cannot see (raw
-32001checks, falsystructuredContent, 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,
.mcpbbundles, official registryserver.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.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scanned
Verified clean 6 days ago
- Passed all security checks, Safe to install
Requires