MCP Discovery
How a host learns what servers offer and builds the one flat tool list a model reads: server/discover and tools/list, who reads each field, many servers and name collisions, ttlMs and list_changed, what annotations mean, and what to do when the menu is too big.
Last updated
After this section you can
- Trace server/discover and tools/list on the wire, and name the reader of each field
- Merge several servers into one list without a name collision
- Set ttlMs, cacheScope and annotations on purpose, and say what each one does not promise
MCP Discovery
How a host learns what each server offers, merges the answers into one menu for the model, and keeps that menu fresh.
A host asks each server what it offers, merges the answers into one flat list, and sends it to the model with every request. The model reads each tool's name, description and input schema. ttlMs and list_changed decide when the host asks again.
Teal: servers. Purple: the host and its cache. Amber: the model. Blue: requests. Green: results. The figure pans sideways on a phone.