MCP Server Development
researched 2026-05-25· 7 sources · 10 concepts · skill mcp-servers
MCP uses JSON-RPC 2.0 with a three-layer model: Host (AI application) → Client (stateful session manager) → Server (exposes tools, resources, prompts).
Architecture
- MCP uses JSON-RPC 2.0 with a three-layer model: Host (AI application) → Client (stateful session manager) → Server (exposes tools, resources, prompts). [source]
stdio
Streamable HTTP (introduced March 2026, replaces deprecated SSE)
Security: OAuth 2.1 + PKCE
- Mandatory for public remote MCP servers since November 2025. [source]
- Resource indicators (RFC 8707): bind tokens to one server - blocks cross-server replay [source]
- Refresh rotation: for public clients, rotate refresh tokens on each use [source]
- NEVER forward client tokens to backend services [source]
Best practices checklist
- [ ] Zod/Pydantic input validation - never trust raw LLM arguments [source]
- [ ] Health checks for production deployments [source]
- [ ] OAuth 2.1 + PKCE for any public-facing remote server [source]
- [ ] Streamable HTTP (not deprecated SSE) for all new remote servers [source]
- [ ] Structured logging and telemetry for production observability [source]
Children
- MCP Server Builder Patterns
- JSON-RPC 2.0 Architecture (frontier)
- MCP OAuth 2.1 Security (frontier)
- Sampling and Elicitation (frontier)
- MCP Deployment (frontier)
Frontier under this node: JSON-RPC 2.0 Architecture, MCP Deployment, MCP OAuth 2.1 Security, Sampling and Elicitation