Claude & Anthropic Developer Platform Curriculum
30 guidesAgent-executable Anthropic SDK recipes, prompt caching, MCP servers, and tool calling workflows.
About this curriculum
Master the Anthropic Developer Platform across 10 structured engineering modules: Messages API streaming, prompt caching token optimization, extended thinking budgets, structured outputs, sandboxed system tools, Model Context Protocol (MCP) servers and client orchestration, and batch processing governance.
Every guide provides deterministic Python and TypeScript SDK implementations, cURL validation probes, and companion monorepo packages tested against live API endpoints.
Stay Updated
Get weekly AI & infrastructure insights.
1Module 1: Workspace Scaffolding & Anthropic SDK Setup
SDK installation, API key credential isolation, and core models endpoint connectivity validation.
How to Set Up Anthropic Python & TypeScript SDKs
Fix 'ModuleNotFoundError: No module named anthropic' and TypeScript import errors. Step-by-step installation, venv isolation, and SDK verification probes.
How to Manage Anthropic API Keys & Env Variables
Resolve 'AuthenticationError: Error code: 401 invalid x-api-key'. Manage ANTHROPIC_API_KEY across .env files, Docker secrets, and isolated processes.
How to Test Claude API & Models Endpoint
Fix Anthropic APIConnectionError and timeout issues. Probe api.anthropic.com/v1/models using bash cURL, Python, and TypeScript health checks.
2Module 2: Messages API & Structured Conversations
Messages API schema design, role-based prompts, SSE streaming, and stop reason truncation handling.
How to Structure Messages API Requests and Roles
Resolve 'messages: roles must alternate between user and assistant' (HTTP 400). Structure multi-turn roles, system prompts, and message payloads correctly.
How to Implement SSE Streaming with Claude
Fix buffered streams and 'TypeError: Stream object is not async iterable'. Stream Claude token deltas in real-time with Python and TypeScript SSE handlers.
How to Handle Stop Reasons & Token Truncation
Fix Claude responses cut off mid-sentence and JSON truncation. Detect stop_reason: max_tokens and implement automated continuation loops.
3Module 3: Prompt Caching & Latency Optimization
Prompt caching breakpoints, cache hit rate telemetry, and 1-hour ephemeral cache token cost optimization.
How to Configure Prompt Caching Breakpoints
Fix prompt caching not working in Claude. Learn why cache_creation_input_tokens returns 0 and configure ephemeral breakpoints above token minimums.
How to Measure and Debug Cache Hit Rates
Fix 'cache_read_input_tokens always 0'. Debug cache misses, inspect response usage objects, and structure prompts for 90%+ cache hit rates.
How to Optimize Token Costs with Ephemeral Cache
Understand Claude prompt cache TTL and pricing. Calculate 25% write surcharges vs 90% read discounts to optimize repetitive API workloads.
4Module 4: Extended Thinking & Deterministic Reasoning
Thinking budget calibration, reasoning trace extraction, thought signatures, and UI streaming.
Extract Reasoning Traces and Thought Signatures
Fix 'AttributeError: ThinkingBlock has no attribute text'. Extract Claude reasoning traces, inspect thought signatures, and echo thinking blocks safely.
How to Configure Thinking Budget and Effort
Resolve 'thinking.budget_tokens must be >= 1024' and max_tokens conflicts. Calibrate Claude 3.7 Sonnet extended thinking budgets accurately.
How to Stream Thinking Blocks to User Interfaces
Fix 'Unhandled event type thinking_delta'. Stream Claude reasoning traces and final responses cleanly to React and web UIs with SSE handlers.
5Module 5: Structured Outputs & JSON Schema Validation
JSON Schema enforcement, Pydantic and Zod schema validation, and deterministic response repair loops.
Validate Pydantic and Zod Schemas with Claude
Fix 'pydantic.ValidationError: Field required' and Zod schema mismatches. Validate Claude response payloads with type-safe Python and TypeScript models.
How to Enforce JSON Schema Structured Outputs
Stop Claude from adding markdown backticks or conversational text before JSON. Enforce strict JSON Schema compliance for automated pipelines.
How to Handle Schema Mismatches and Repair Loops
Implement multi-turn schema repair loops for Claude responses. Catch Pydantic and Zod validation errors and repair malformed structured JSON outputs.
6Module 6: Deterministic Tool Use & Function Calling
Tool definition registries, parallel tool execution handling, and strict error recovery loops.
How to Handle Parallel Tool Execution and Results
Execute multiple Claude tool_use calls concurrently using asyncio or Promise.all, map responses to tool_use_id, and handle partial failures.
How to Define and Register Tools with Claude
Define JSON schema tools in Claude Messages API requests. Configure tool choice strategies and parse tool use blocks across Python, TypeScript, and cURL.
How to Handle Strict Tool Use and Error Recovery
Implement resilient Claude tool use and error recovery loops with is_error diagnostics, bounded retry budgets, and fail-safe circuit breaker patterns.
7Module 7: Core System Tools (Bash, Text Editor, Computer Use)
Sandboxed Bash execution, deterministic file manipulation with Text Editor, and Computer Use provisioning.
How to Provision and Sandbox Claude Computer Use
Provision isolated virtual desktop sandboxes for Claude Computer Use with Xvfb, fluxbox, base64 visual feedback, and human-in-the-loop security boundaries.
Deterministic File Edits with Text Editor Tool
Execute deterministic file edits with Anthropic text editor tool using view, create, str_replace, and insert operations with strict validation guardrails.
How to Integrate and Sandbox Claude Bash Tool
Integrate Claude bash tools with container sandboxes, timeout management, output capture, and safe execution loops in Python and TypeScript.
8Module 8: Model Context Protocol (MCP) Server Architecture
MCP server implementation across Python and TypeScript SDKs with stdio and SSE transport configurations.
Configure Stdio and SSE Transports in MCP
Configure Stdio and Server-Sent Event transports for Model Context Protocol servers with session lifecycle management and resilient streaming.
How to Build an MCP Server with TypeScript SDK
Build deterministic Model Context Protocol servers in TypeScript using the official MCP SDK, Zod schema validation, tools, and typed resources.
How to Build an MCP Server with Python SDK
Build production-ready Model Context Protocol servers in Python using FastMCP and the official SDK with custom tools, resources, and schemas.
9Module 9: MCP Client Wiring & Multi-Server Orchestration
Connecting Claude Desktop and Cursor, managing remote MCP reverse tunnels, and token budget pruning.
Implement Remote MCP Servers and Secure Tunnels
Implement remote Model Context Protocol servers exposed via HTTPS and SSE tunnels with bearer token authentication and reverse proxies.
Connect Claude Desktop and Cursor to Custom MCP
Connect Claude Desktop and Cursor to custom MCP servers via local stdio configurations, environment injection, and connection diagnostics.
Manage MCP Tool Context and Token Budgets
Manage MCP tool context and token budgets using dynamic schema pruning, tool filtering, and prompt caching to prevent window overflow.
10Module 10: Batch Processing, Guardrails & Production Governance
50% discounted async batch processing, streaming refusal guardrails, and Admin API cost auditing.
Execute Asynchronous Batch Processing with Claude
Execute high-throughput asynchronous batch processing with Anthropic Message Batches API to cut token costs by 50% with custom IDs.
Implement Streaming Refusals and Fallback Loops
Implement streaming refusal guardrails and deterministic fallback loops with stop reason detection, classification, and model routing.
Track Usage Costs and Audit Admin API Events
Track Claude API token usage costs and audit workspace organization events with Anthropic Admin API and automated Prometheus metrics.