Skip to content

SEP-2624: Interceptors for the Model Context Protocol#2624

Open
Degiorgio wants to merge 2 commits into
modelcontextprotocol:mainfrom
Degiorgio:SEP-1763
Open

SEP-2624: Interceptors for the Model Context Protocol#2624
Degiorgio wants to merge 2 commits into
modelcontextprotocol:mainfrom
Degiorgio:SEP-1763

Conversation

@Degiorgio

@Degiorgio Degiorgio commented Apr 22, 2026

Copy link
Copy Markdown

Summary

This PR introduces a SEP for an interceptor framework for the Model Context Protocol, defining a new MCP primitive that allows context operations to be intercepted, validated, and transformed at key points in the agentic lifecycle.

Motivation

The MCP ecosystem is rapidly developing a sprawling landscape of sidecars, proxies, client-wrappers and gateways to address cross-cutting context governance concerns (like PII Checking/reduction, Toxicity filtering, etc) . However, these implementations are largely:

  • Non-reusable: Each solution is tightly coupled to specific deployment patterns or languages
  • Non-interoperable: Different approaches don't work together, creating vendor lock-in
  • Duplicative: Similar functionality is reimplemented across different tools and servers
  • Fragmented: No common interface or discovery mechanism exists

Overall this is leading to an M × N problem: Each of M clients must integrate with each of N middleware solutions, resulting in M × N integration points and configurations.

What This SEP Proposes

This SEP proposes an Interceptor framework that effectively elevates middleware to an MCP primitive in-order to provide control over context at key points in the agentic lifecycle.

Towards this end, the SEP:

  • Introduces a New MCP Primitive: The Interceptor, which comes in two distinct types; Validators (Dedicated to making pass/fail decisions), Mutators (Focused on payload transformations).
  • Defines a Trust-Boundary-Aware Execution Model: Unlike MCP Tools, whose execution is generally non-deterministic, the Interceptor execution model is deterministic. They are invoked at specific points in the agentic lifecycle (such as tools/call) to ensure governance over context is reliably applied before it crosses trust boundaries for both the server and the client.
  • Adds protocol-level methods (interceptors/list and interceptor/invoke) that allow clients and servers to dynamically discover and trigger these primitives.

Important: The SEP is fully backward compatible, interceptors are an optional server capability, no existing protocol methods are modified, and clients that do not support interceptors continue to work unchanged.

Other Relevant material

Relevant MCP Dev Summit (2016) Talks:

Reference Implementations (WIP):

@Degiorgio Degiorgio force-pushed the SEP-1763 branch 2 times, most recently from 7da4402 to 0fca7d1 Compare April 22, 2026 10:21
@sambhav sambhav self-assigned this Apr 22, 2026
@Degiorgio Degiorgio marked this pull request as ready for review April 22, 2026 11:23
@Degiorgio Degiorgio force-pushed the SEP-1763 branch 4 times, most recently from adaefca to 52679f2 Compare April 22, 2026 11:45
@Degiorgio Degiorgio requested review from a team as code owners April 22, 2026 11:45
Signed-off-by: Kurt Degiorgio <kdegiorgio@bloomberg.net>
@localden localden changed the title SEP-1763: Interceptors for the Model Context Protocol SEP-2624: Interceptors for the Model Context Protocol Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants