SEP-2564: Server-Side Filtering for List Methods#2564
Open
anagh96 wants to merge 1 commit intomodelcontextprotocol:mainfrom
Open
SEP-2564: Server-Side Filtering for List Methods#2564anagh96 wants to merge 1 commit intomodelcontextprotocol:mainfrom
anagh96 wants to merge 1 commit intomodelcontextprotocol:mainfrom
Conversation
Introduce optional server-side filtering for MCP */list methods. Clients may include a filter object in tools/list, resources/list, prompts/list, and resources/templates/list requests to receive only capabilities matching specified criteria.
25d4705 to
6839104
Compare
State Transition: proposal → draftThis SEP has been transitioned from proposal to draft. @LucaButBoring has been assigned as the sponsor for this SEP. This is an automated message from the SEP lifecycle bot. |
State Transition: proposal → draftThis SEP has been transitioned from proposal to draft. @LucaButBoring has been assigned as the sponsor for this SEP. This is an automated message from the SEP lifecycle bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This SEP introduces optional server-side filtering for MCP
*/listmethods (tools/list,resources/list,prompts/list,resources/templates/list). Clients may include afilterobject to receive only capabilities matching specified criteria.Motivation and Context
As MCP server ecosystems grow, tool catalog sizes become a concrete scaling problem. Enterprise deployments use MCP gateways that aggregate capabilities from multiple upstream servers, and a single
tools/listcall can return hundreds of tools. Every response serializes full tool definitions (name, description, inputSchema, outputSchema, annotations) into the client's context window.Without server-side filtering, servers serialize their full capability catalog on every
*/listcall regardless of what the client needs, gateways must fan out to every upstream server, and each implementation independently reinvents tool catalog management. Client-side filtering cannot address these server-side costs.This SEP proposes a minimal, backward-compatible extension: an optional
filterparameter on*/listrequests with glob-based pattern matching (namePatternsfor all methods,uriPatternsfor resources). Servers advertise supported filter fields via capability negotiation duringinitialize. Clients that omit the filter receive the full unfiltered list, preserving backward compatibility.How Has This Been Tested?
A reference implementation is TBD in both the TypeScript and Python MCP SDKs.
Breaking Changes
None. Fully backward compatible.
Sponsor
@LucaButBoring
AI Disclosure
The design, technical specification, and rationale were authored by me based on real-world experience building MCP gateway services. AI assistance was used to help structure the document to the SEP template format and refine wording for clarity. The sponsor reviewed and provided feedback on the full proposal.