Skip to lesson

AnthropicClaude Certified Architect – Foundations2026-102.4 Integrate MCP servers into Claude Code and agent workflows

Defining resources

Completed by opening the official lab

Why it matters

Section 2.4 separates what a server lets Claude do from what it lets a client read. This lesson builds the read side: data that the application fetches by URI, without a tool call.

What to practise

Build the two resources behind an @document mention feature with @mcp.resource: a direct resource at docs://documents that lists document ids as application/json, and a templated resource at docs://documents/{doc_id} that returns one document as text/plain. Watch how the SDK turns the URI parameter into a function argument and serialises the return value for you. Then run the server with uv run mcp dev and use the MCP Inspector’s Resources and Resource Templates sections to see the URI, MIME type and payload a client gets back.

How it fits

The catalog-then-detail pair is the pattern of 2.4.5: the list resource is the catalog, the templated resource is the evidence. Compare it with the tools of 2.4.4, which Claude chooses to call, whereas here your application decides which resource enters the prompt.