mcp-developer
jeffallan/claude-skills
Build and debug MCP servers/clients connecting AI systems to tools and data sources.
What is mcp-developer?
Expert guidance for implementing Model Context Protocol servers and clients in TypeScript or Python. Use this when building tool handlers, resource providers, transport layers, and validating schemas with Zod or Pydantic to connect AI systems with external integrations.
- Scaffold MCP server/client projects using TypeScript SDK or Python FastMCP
- Implement tool handlers with Zod/Pydantic schema validation
- Configure resource providers with URI-based access patterns
- Set up stdio, HTTP, and SSE transport layers
- Debug protocol compliance using the MCP inspector
- Validate JSON-RPC 2.0 message format and error responses
How to install mcp-developer
npx skills add https://github.com/jeffallan/claude-skills --skill mcp-developer- Node.js 18+ (for TypeScript) or Python 3.10+ (for Python)
- Familiarity with async/await patterns
- Understanding of JSON-RPC 2.0 protocol basics
- npm or pip package manager
How to use mcp-developer
- 1.Run `npx @modelcontextprotocol/create-server my-server` (TypeScript) or `pip install mcp` (Python) to scaffold a project
- 2.Define tool schemas using Zod (TypeScript) or Pydantic (Python) with input validation rules
- 3.Implement tool handlers that call external APIs or services and return structured responses
- 4.Register resource providers with URI patterns and content handlers
- 5.Configure the transport layer (stdio for local, HTTP/SSE for remote)
- 6.Run `npx @modelcontextprotocol/inspector` to test protocol compliance interactively
- 7.Deploy with authentication, rate-limiting, and environment variable configuration
Use cases
- Building a weather tool server that Claude can call to fetch real-time data
- Creating a resource provider that exposes application configuration to AI clients
- Implementing a custom MCP client that connects Claude to internal APIs
- Debugging schema validation failures in tool definitions
- Setting up authentication and rate-limiting for production MCP deployments
- Backend engineers building AI integrations
- API architects designing context protocol implementations
- Full-stack developers extending Claude with custom tools
- DevOps engineers deploying MCP servers in production
- AI system integrators connecting multiple data sources
mcp-developer FAQ
Tools are callable functions that perform actions (like fetching weather), while resources are read-only data providers exposed via URIs (like configuration files). Tools use JSON-RPC method calls; resources are accessed by URI.
Use Zod schemas in TypeScript or Pydantic models in Python. Define field types, constraints (min_length, pattern, enum), and descriptions. The MCP SDK automatically validates inputs before calling your handler.
Use stdio for local/embedded deployments, HTTP for REST-style access with auth, or SSE for server-sent events. Each has different latency, security, and scalability characteristics.
Use `npx @modelcontextprotocol/inspector` to interactively test tool calls and resource access. It shows request/response payloads and validates JSON-RPC 2.0 format. Check logs for serialization errors.
Yes. Implement auth in the transport layer (HTTP headers, API keys) or as middleware before tool execution. Never hardcode credentials; use environment variables or secure vaults.
Full instructions (SKILL.md)
Source of truth, from jeffallan/claude-skills.
name: mcp-developer description: Use when building, debugging, or extending MCP servers or clients that connect AI systems with external tools and data sources. Invoke to implement tool handlers, configure resource providers, set up stdio/HTTP/SSE transport layers, validate schemas with Zod or Pydantic, debug protocol compliance issues, or scaffold complete MCP server/client projects using TypeScript or Python SDKs. license: MIT metadata: author: https://github.com/Jeffallan version: "1.1.0" domain: api-architecture triggers: MCP, Model Context Protocol, MCP server, MCP client, Claude integration, AI tools, context protocol, JSON-RPC role: specialist scope: implementation output-format: code related-skills: fastapi-expert, typescript-pro, security-reviewer, devops-engineer
MCP Developer
Senior MCP (Model Context Protocol) developer with deep expertise in building servers and clients that connect AI systems with external tools and data sources.
Core Workflow
- Analyze requirements — Identify data sources, tools needed, and client apps
- Initialize project —
npx @modelcontextprotocol/create-server my-server(TypeScript) orpip install mcp+ scaffold (Python) - Design protocol — Define resource URIs, tool schemas (Zod/Pydantic), and prompt templates
- Implement — Register tools and resource handlers; configure transport (stdio/SSE/HTTP)
- Test — Run
npx @modelcontextprotocol/inspectorto verify protocol compliance interactively; confirm tools appear, schemas accept valid inputs, and error responses are well-formed JSON-RPC 2.0. Feedback loop: if schema validation fails → inspect Zod/Pydantic error output → fix schema definition → re-run inspector. If a tool call returns a malformed response → check transport serialisation → fix handler → re-test. - Deploy — Package, add auth/rate-limiting, configure env vars, monitor
Reference Guide
Load detailed guidance based on context:
| Topic | Reference | Load When |
|---|---|---|
| Protocol | references/protocol.md | Message types, lifecycle, JSON-RPC 2.0 |
| TypeScript SDK | references/typescript-sdk.md | Building servers/clients in Node.js |
| Python SDK | references/python-sdk.md | Building servers/clients in Python |
| Tools | references/tools.md | Tool definitions, schemas, execution |
| Resources | references/resources.md | Resource providers, URIs, templates |
Minimal Working Example
TypeScript — Tool with Zod Validation
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-server", version: "1.1.0" });
// Register a tool with validated input schema
server.tool(
"get_weather",
"Fetch current weather for a location",
{
location: z.string().min(1).describe("City name or coordinates"),
units: z.enum(["celsius", "fahrenheit"]).default("celsius"),
},
async ({ location, units }) => {
// Implementation: call external API, transform response
const data = await fetchWeather(location, units); // your fetch logic
return {
content: [{ type: "text", text: JSON.stringify(data) }],
};
}
);
// Register a resource provider
server.resource(
"config://app",
"Application configuration",
async (uri) => ({
contents: [{ uri: uri.href, text: JSON.stringify(getConfig()), mimeType: "application/json" }],
})
);
const transport = new StdioServerTransport();
await server.connect(transport);
Python — Tool with Pydantic Validation
from mcp.server.fastmcp import FastMCP
from pydantic import BaseModel, Field
mcp = FastMCP("my-server")
class WeatherInput(BaseModel):
location: str = Field(..., min_length=1, description="City name or coordinates")
units: str = Field("celsius", pattern="^(celsius|fahrenheit)$")
@mcp.tool()
async def get_weather(location: str, units: str = "celsius") -> str:
"""Fetch current weather for a location."""
data = await fetch_weather(location, units) # your fetch logic
return str(data)
@mcp.resource("config://app")
async def app_config() -> str:
"""Expose application configuration as a resource."""
return json.dumps(get_config())
if __name__ == "__main__":
mcp.run() # defaults to stdio transport
Expected tool call flow:
Client → { "method": "tools/call", "params": { "name": "get_weather", "arguments": { "location": "Berlin" } } }
Server → { "result": { "content": [{ "type": "text", "text": "{\"temp\": 18, \"units\": \"celsius\"}" }] } }
Constraints
MUST DO
- Implement JSON-RPC 2.0 protocol correctly
- Validate all inputs with schemas (Zod/Pydantic)
- Use proper transport mechanisms (stdio/HTTP/SSE)
- Implement comprehensive error handling
- Add authentication and authorization
- Log protocol messages for debugging
- Test protocol compliance thoroughly
- Document server capabilities
MUST NOT DO
- Skip input validation on tool inputs
- Expose sensitive data in resource content
- Ignore protocol version compatibility
- Mix synchronous code with async transports
- Hardcode credentials or secrets
- Return unstructured errors to clients
- Deploy without rate limiting
- Skip security controls
Output Templates
When implementing MCP features, provide:
- Server/client implementation file
- Schema definitions (tools, resources, prompts)
- Configuration file (transport, auth, etc.)
- Brief explanation of design decisions
Related skills
More from jeffallan/claude-skills and the wider catalog.

microservices-architect
Design distributed system architectures, decompose monoliths, and implement resilience patterns for cloud-native microservices.

ml-pipeline
Design and deploy production ML pipelines with experiment tracking, orchestration, and automated model lifecycle management.

monitoring-expert
Set up comprehensive monitoring, logging, metrics, dashboards, alerts, and performance testing for production systems.

nestjs-expert
Enterprise NestJS specialist for REST APIs, GraphQL services, and scalable TypeScript backends with DI, authentication, and testing.

nextjs-developer
Senior Next.js 14+ developer for App Router, Server Components, and full-stack deployment with performance focus.

pandas-pro
Expert pandas DataFrame operations for efficient data manipulation, cleaning, and analysis.