Skip to content

[Bug Fix] make server/discover support caching#2855

Merged
dsp-ant merged 7 commits into
modelcontextprotocol:mainfrom
CaitieM20:serverDiscover-cacheable
Jun 4, 2026
Merged

[Bug Fix] make server/discover support caching#2855
dsp-ant merged 7 commits into
modelcontextprotocol:mainfrom
CaitieM20:serverDiscover-cacheable

Conversation

@CaitieM20

Copy link
Copy Markdown
Contributor

This PR fixes an issue identified during Core-Maintainer RC Specification review on 6/3/26

Motivation and Context

Due to timing around SEPs landing we missed adding server/discover as a cacheable result. This change updates the schema & specification docs to support this.

Also added language to each cacheable result doc to declare support and link back to caching.mdx.

How Has This Been Tested?

conformance tests for this feature already exist.

Breaking Changes

no

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@CaitieM20
CaitieM20 requested a review from a team as a code owner June 3, 2026 20:13
@CaitieM20 CaitieM20 added bug Something isn't working documentation Improvements or additions to documentation transport Related to MCP transports rc-high-priority Related to an upcoming specification release and needs to be addressed with a high priority. labels Jun 3, 2026
@CaitieM20
CaitieM20 requested review from Copilot, kurtisvg and pja-ant June 3, 2026 20:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the draft MCP schema and specification to treat server/discover as a cacheable operation, aligning it with the existing caching model used for list and resource-read results.

Changes:

  • Make DiscoverResult cacheable by requiring ttlMs and cacheScope in the TypeScript schema and JSON Schema.
  • Update discovery examples to include caching hints.
  • Update specification docs to explicitly declare caching support for relevant operations and link to the caching utility doc.
Show a summary per file
File Description
schema/draft/schema.ts Updates DiscoverResult to extend CacheableResult so caching hints are required.
schema/draft/schema.json Adds ttlMs/cacheScope (required) to the DiscoverResult JSON Schema.
schema/draft/examples/DiscoverResultResponse/discover-result-response.json Updates the discover response example to include caching fields.
schema/draft/examples/DiscoverResult/server-capabilities-discovery.json Updates the discover result example to include caching fields.
docs/specification/draft/server/utilities/caching.mdx Adds server/discover to the list of cacheable operations.
docs/specification/draft/server/tools.mdx Notes that tools/list supports caching and links to caching docs.
docs/specification/draft/server/resources.mdx Notes caching support for list/read/templates operations and links to caching docs.
docs/specification/draft/server/prompts.mdx Notes that prompts/list supports caching and links to caching docs.
docs/specification/draft/server/discover.mdx Notes caching support for server/discover and documents the caching fields.
docs/specification/draft/schema.mdx Regenerates schema documentation to include the new cacheable fields on DiscoverResult.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 10/10 changed files
  • Comments generated: 2

Comment thread docs/specification/draft/server/utilities/caching.mdx
Comment thread docs/specification/draft/server/discover.mdx Outdated
kurtisvg
kurtisvg previously approved these changes Jun 3, 2026
dsp-ant
dsp-ant previously approved these changes Jun 4, 2026
Comment thread docs/specification/draft/server/utilities/caching.mdx Outdated
@dsp-ant
dsp-ant dismissed stale reviews from kurtisvg and themself via ab9e564 June 4, 2026 14:48
@dsp-ant
dsp-ant merged commit 241568e into modelcontextprotocol:main Jun 4, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation rc-high-priority Related to an upcoming specification release and needs to be addressed with a high priority. transport Related to MCP transports

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants