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.
server/discover is the only method a modern server MUST implement beyond those of the capabilities it declares. It returns in a single response what InitializeResult used to provide: versions, capabilities, identity and instructions.
No parameters of its own; only the standard _meta.
{ "jsonrpc": "2.0", "id": "discover-1", "method": "server/discover",
"params": { "_meta": { "io.modelcontextprotocol/protocolVersion": "2026-07-28",
"io.modelcontextprotocol/clientInfo": { "name": "ExampleClient", "version": "1.0.0" },
"io.modelcontextprotocol/clientCapabilities": {} } } }
DiscoverResult{ "jsonrpc": "2.0", "id": "discover-1", "result": {
"resultType": "complete",
"supportedVersions": ["2026-07-28"],
"capabilities": { "tools": {}, "resources": {}, "extensions": { "io.modelcontextprotocol/tasks": {} } },
"_meta": { "io.modelcontextprotocol/serverInfo": { "name": "ExampleServer", "version": "1.0.0" } },
"instructions": "This server provides weather and resource utilities.",
"ttlMs": 3600000, "cacheScope": "public" } }
| Field | Meaning |
|---|---|
supportedVersions |
Versions the server supports; the client should pick one for subsequent requests. |
capabilities |
Server capabilities, including extensions. |
_meta.serverInfo |
Self-declared identity (SHOULD be included). Unverified; not to be used for security. |
instructions |
Natural-language text for the LLM on how to use the server. It is untrusted content. |
ttlMs, cacheScope |
It is a CacheableResult: the client may cache it. |
tools/list, prompts/list and resources/list to see what is there.server/discover first and decide the era according to the response.server/discover.server.json: installation metadata; it does not replace discover.initialize fulfilled this role and additionally established the session.server/discover is the foundation of the capability inventory. Cache it respecting ttlMs and re-probe when receiving unexpected errors (-32601, -32022).instructions as text that will reach the host's model: apply the same anti-injection filter as to tool descriptions, and decide by policy whether you forward it, trim it or replace it.DiscoverResult towards hosts: supportedVersions you actually translate, filtered capabilities, the gateway's serverInfo and instructions composed by policy.1. Is it mandatory for a modern server to implement server/discover?
Servers MUST implement it; for the client, calling it is optional.
2. How should a host treat the instructions field?
It is server text that ends up in the model's context: an injection surface.
3. If a Server Card and server/discover disagree, what should the client prefer?
SEP-2127: live values prevail over static metadata.