05. Resources in MCP

Chapter 5 of 22 · 20 min

Local verification checkpoint

Run the smallest example from this chapter in a local workspace and record the package version, runtime, data path, and observed output. If the result depends on model size, vector count, CPU/GPU backend, or available memory, note that constraint beside the exercise so the lesson remains reproducible.

EXERCISE

Build a resource server that exposes two resources: a static "about" document and a dynamic resource showing the server's current memory usage. Implement subscriptions for the memory resource.