part…
Building governance for MCP?
The gateway applies what the guide teaches: policies on discovery, invocation and authorisation.
The gateway applies what the guide teaches: policies on discovery, invocation and authorisation.
Lesson 4.2 introduced the method; here it is studied as a server feature, with its implications for caching, security and inventory.
Request: _meta only. Result DiscoverResult:
| Field | Required | Notes |
|---|---|---|
resultType |
yes | "complete". |
supportedVersions |
yes | List of versions; the client picks one. |
capabilities |
yes | ServerCapabilities, with extensions. |
instructions |
no | Natural-language guidance for the LLM. |
_meta.io.modelcontextprotocol/serverInfo |
SHOULD | Implementation. |
ttlMs, cacheScope |
yes (CacheableResult) | Freshness hint and scope. |
The server MUST implement it in every modern version it supports. It is a CacheableResult: in the official example, ttlMs: 3600000 and cacheScope: "public".
cacheScope: "private".serverInfo is self-declared: it is of no use for security or for unique identification.instructionsIntended to be injected into the host's system prompt ("how to use this server"). It is server text that reaches the model: a recognised prompt injection vector. Hosts usually display it or allow it to be disabled.
In stdio, server/discover with the preferred modern version is the recommended probe: DiscoverResult → modern; -32022 → modern with another version; anything else or a timeout → legacy (lesson 4.4).
DiscoverResult into the master record of each server: versions, capabilities, extensions, declared identity, instructions, TTL. Re-probe when ttlMs expires, on reconnect, and on unexpected -32601/-32021 errors.instructions: (a) forward it in full, (b) forward it with a prefix marking it as untrusted, (c) replace it with curated text, (d) remove it. Record the hash to detect changes.DiscoverResult: the intersection of the versions you translate, the filtered union of capabilities, your governed extensions.1. Is server/discover a CacheableResult?
It is on the list of operations that MUST include cache hints.
2. Can the DiscoverResult vary by authorisation?
Credentials are per-request input; what it cannot do is vary by connection.