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) or pip 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/inspector to 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
Maintained by @jeffallan, Principal Consultant at Synergetic Solutions
Documentation
1---2name: mcp-developer3description: 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.4license: MIT5metadata:6 source: https://skillmd.com/skills/tuyv/mcp-developer7 author: https://github.com/Jeffallan8 company: https://synergetic.solutions9 version: "1.1.0"10 domain: api-architecture11 triggers: MCP, Model Context Protocol, MCP server, MCP client, Claude integration, AI tools, context protocol, JSON-RPC12 role: specialist13 scope: implementation14 output-format: code15 related-skills: fastapi-expert, typescript-pro, security-reviewer, devops-engineer16---1718# MCP Developer1920Senior MCP (Model Context Protocol) developer with deep expertise in building servers and clients that connect AI systems with external tools and data sources.2122## Core Workflow23241. **Analyze requirements** — Identify data sources, tools needed, and client apps252. **Initialize project** — `npx @modelcontextprotocol/create-server my-server` (TypeScript) or `pip install mcp` + scaffold (Python)263. **Design protocol** — Define resource URIs, tool schemas (Zod/Pydantic), and prompt templates274. **Implement** — Register tools and resource handlers; configure transport (stdio/SSE/HTTP)285. **Test** — Run `npx @modelcontextprotocol/inspector` to 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.296. **Deploy** — Package, add auth/rate-limiting, configure env vars, monitor3031## Reference Guide3233Load detailed guidance based on context:3435| Topic | Reference | Load When |36|-------|-----------|-----------|37| Protocol | `references/protocol.md` | Message types, lifecycle, JSON-RPC 2.0 |38| TypeScript SDK | `references/typescript-sdk.md` | Building servers/clients in Node.js |39| Python SDK | `references/python-sdk.md` | Building servers/clients in Python |40| Tools | `references/tools.md` | Tool definitions, schemas, execution |41| Resources | `references/resources.md` | Resource providers, URIs, templates |4243## Minimal Working Example4445### TypeScript — Tool with Zod Validation4647```typescript48import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";49import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";50import { z } from "zod";5152const server = new McpServer({ name: "my-server", version: "1.1.0" });5354// Register a tool with validated input schema55server.tool(56 "get_weather",57 "Fetch current weather for a location",58 {59 location: z.string().min(1).describe("City name or coordinates"),60 units: z.enum(["celsius", "fahrenheit"]).default("celsius"),61 },62 async ({ location, units }) => {63 // Implementation: call external API, transform response64 const data = await fetchWeather(location, units); // your fetch logic65 return {66 content: [{ type: "text", text: JSON.stringify(data) }],67 };68 }69);7071// Register a resource provider72server.resource(73 "config://app",74 "Application configuration",75 async (uri) => ({76 contents: [{ uri: uri.href, text: JSON.stringify(getConfig()), mimeType: "application/json" }],77 })78);7980const transport = new StdioServerTransport();81await server.connect(transport);82```8384### Python — Tool with Pydantic Validation8586```python87from mcp.server.fastmcp import FastMCP88from pydantic import BaseModel, Field8990mcp = FastMCP("my-server")9192class WeatherInput(BaseModel):93 location: str = Field(..., min_length=1, description="City name or coordinates")94 units: str = Field("celsius", pattern="^(celsius|fahrenheit)$")9596@mcp.tool()97async def get_weather(location: str, units: str = "celsius") -> str:98 """Fetch current weather for a location."""99 data = await fetch_weather(location, units) # your fetch logic100 return str(data)101102@mcp.resource("config://app")103async def app_config() -> str:104 """Expose application configuration as a resource."""105 return json.dumps(get_config())106107if __name__ == "__main__":108 mcp.run() # defaults to stdio transport109```110111**Expected tool call flow:**112```113Client → { "method": "tools/call", "params": { "name": "get_weather", "arguments": { "location": "Berlin" } } }114Server → { "result": { "content": [{ "type": "text", "text": "{\"temp\": 18, \"units\": \"celsius\"}" }] } }115```116117## Constraints118119### MUST DO120- Implement JSON-RPC 2.0 protocol correctly121- Validate all inputs with schemas (Zod/Pydantic)122- Use proper transport mechanisms (stdio/HTTP/SSE)123- Implement comprehensive error handling124- Add authentication and authorization125- Log protocol messages for debugging126- Test protocol compliance thoroughly127- Document server capabilities128129### MUST NOT DO130- Skip input validation on tool inputs131- Expose sensitive data in resource content132- Ignore protocol version compatibility133- Mix synchronous code with async transports134- Hardcode credentials or secrets135- Return unstructured errors to clients136- Deploy without rate limiting137- Skip security controls138139## Output Templates140141When implementing MCP features, provide:1421. Server/client implementation file1432. Schema definitions (tools, resources, prompts)1443. Configuration file (transport, auth, etc.)1454. Brief explanation of design decisions146147Maintained by [@jeffallan](https://github.com/jeffallan), Principal Consultant at [Synergetic Solutions](https://synergetic.solutions)148149[Documentation](https://jeffallan.github.io/claude-skills/skills/api-architecture/mcp-developer/)