Cache MCP Tool Lists

Fetching a remote tool catalog on every agent run adds avoidable latency. Current MCP runtimes expose caching options, and the 2026 protocol adds cache hints to list results.

When caching is safe

Cache aggressively when the server's tool definitions are stable and identical for the relevant authorization context.

When caching is risky

If tools change by tenant, user, role, feature flag, or temporary permission, the cache key must include that context or stay private and short-lived.

OpenAI Agents SDK example

Its MCP server classes expose cache_tools_list=True and an explicit cache invalidation method. This can remove one network round trip from every run when the tool catalog is stable.

Protocol cache hints

MCP 2026-07-28 introduces ttlMs and cacheScope for cacheable lists and reads. Prefer server-provided freshness guidance when your client stack supports it.