Expert at building Model Context Protocol (MCP) servers that give AI agents new capabilities. Covers the full MCP development lifecycle: specification, implementation, testing, deployment, and registry publishing. Supports both TypeScript and Python with production-ready patterns.
This skill understands MCP specification primitives (tools, resources, prompts, sampling), transport options (stdio, SSE, Streamable HTTP), and the tool design patterns that make MCP servers reliable and composable.
Identify what capabilities the server should expose:
Choose the transport:
Define input/output schemas before writing implementation:
{
name: "tool_name",
description: "What this tool does (visible to the LLM)",
inputSchema: {
type: "object",
properties: { ... },
required: [ ... ]
}
}
Create the server with proper error handling, validation, and logging. Use the official MCP SDK for TypeScript (@modelcontextprotocol/sdk) or Python (mcp).
Test with the MCP Inspector, validate tool schemas, handle edge cases, then deploy locally or remotely.
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { z } from "zod";
const server = new McpServer({ name: "my-tools", version: "1.0.0" });
server.tool("greet", "Greet someone by name",
{ name: z.string().describe("Person's name") },
async ({ name }) => ({ content: [{ type: "text", text: `Hello, ${name}!` }] })
);
const transport = new StdioServerTransport();
await server.connect(transport);
Wrap an external API as an MCP tool with auth, rate limiting, and error handling:
Problem: LLM calls tools with wrong parameters Solution: Improve tool descriptions and add examples in the description field. The LLM reads descriptions to decide how to call tools.
Problem: Tool times out on large inputs Solution: Add input size validation and pagination. Stream large responses instead of buffering.
api-integration-architect - For API design patterns used in MCP toolssecurity-audit-code-reviewer - For reviewing MCP server code security