# MCP tools/list Caching and TTL in Practice

> Test MCP tools/list caching under the July 2026 revision. Check TTL expiry, catalogue changes and the list each role sees before reusing cached results.

URL: https://www.matthewswong.com/en/blog/mcp-cacheable-tool-discovery-ttl/

- Author: Matthews Wong (https://www.matthewswong.com/en/about/)
- Published: 2026-12-03
- Updated: 2026-12-03
- Category: AI

> **Key takeaway:** Cacheable MCP discovery lets a client reuse list results for the duration provided by the server under the July 2026 specification. The main design choice is which catalogue may be reused for which connection or identity. Test expiration and authorisation together when a tool list varies by role.

What makes a good cache fixture?

Create a catalogue with a read-only product lookup and a second tool visible to a different test role. Set a small ttlMs and inspect cacheScope in the fixture so the suite can advance a fake clock without sleeping. Use a fake clock where the cache implementation allows it.

Which dimensions matter to a cache key?

Include the server identity and every relevant input that changes the returned catalogue, such as the effective account or toolset. If a list depends on permissions, a cache shared between identities can advertise the wrong tools. Inspect effective scope instead of relying on a display name.

How do we check expiry?

Fetch the list, change the test catalogue and fetch again while the cached entry is fresh. Advance the clock beyond the allowed age and repeat. Assert both the returned tool names and the number of observed discovery requests.

What if a user loses access?

Test a tool call after access has been withdrawn even if its name still appears in the cached client list. The application must authorise the action when it executes. Give users a clear error and a way to refresh the displayed catalogue.

Where can cache metrics mislead?

A better hit rate can hide an outdated schema if the catalogue rarely refreshes in your test environment. Track hit rate alongside list errors and tool calls rejected for an unknown operation or mismatched input. See whether those signals change following a catalogue release.

How should catalogue changes ship?

Exercise a backwards-compatible addition and a removal separately. Record when the new list becomes visible and how a stale call fails. Publish the catalogue change only when the observed behaviour matches the compatibility promise.

## Sources and further reading

- MCP specification 2026-07-28
- MCP July release notes
- MCP tool contracts
- MCP lifecycle and discovery

## Source links

- https://modelcontextprotocol.io/specification/2026-07-28
- https://blog.modelcontextprotocol.io/posts/2026-07-28/
- https://modelcontextprotocol.io/specification/2026-07-28/server/tools
- https://modelcontextprotocol.io/specification/2026-07-28/basic/versioning

## FAQ

### What makes a good cache fixture?

Create a catalogue with a read-only product lookup and a second tool visible to a different test role. Set a small ttlMs and inspect cacheScope in the fixture so the suite can advance a fake clock without sleeping. Use a fake clock where the cache implementation allows it.

### Which dimensions matter to a cache key?

Include the server identity and every relevant input that changes the returned catalogue, such as the effective account or toolset. If a list depends on permissions, a cache shared between identities can advertise the wrong tools. Inspect effective scope instead of relying on a display name.

### How do we check expiry?

Fetch the list, change the test catalogue and fetch again while the cached entry is fresh. Advance the clock beyond the allowed age and repeat. Assert both the returned tool names and the number of observed discovery requests.

### What if a user loses access?

Test a tool call after access has been withdrawn even if its name still appears in the cached client list. The application must authorise the action when it executes. Give users a clear error and a way to refresh the displayed catalogue.

### Where can cache metrics mislead?

A better hit rate can hide an outdated schema if the catalogue rarely refreshes in your test environment. Track hit rate alongside list errors and tool calls rejected for an unknown operation or mismatched input. See whether those signals change following a catalogue release.

---

- HTML version: https://www.matthewswong.com/en/blog/mcp-cacheable-tool-discovery-ttl/
- Bahasa Indonesia: https://www.matthewswong.com/id/blog/mcp-cacheable-tool-discovery-ttl/
- Site index for agents: https://www.matthewswong.com/llms.txt
- Sitemap: https://www.matthewswong.com/sitemap.xml
- API description (OpenAPI): https://www.matthewswong.com/openapi.json
