Skip to content

fix(server): validate requests served by Router - #1536

Open
DaleSeo wants to merge 1 commit into
mainfrom
fix/router-request-checks-1518
Open

DaleSeo wants to merge 1 commit into
mainfrom
fix/router-request-checks-1518

Conversation

@DaleSeo

@DaleSeo DaleSeo commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Closes #1518

Motivation and Context

Requests that Router handles itself now go through the same request-side checks as requests dispatched to a ServerHandler.

Router handles tools/list, prompts/list, and routed tools/call and prompts/get requests without dispatching them to a ServerHandler. As a result, these requests skipped protocol version and _meta validation. Routed tools could also return a task to a client that hadn’t declared the tasks capability. Both checks now use shared functions, so the two paths stay in sync.

How Has This Been Tested?

  • Automated unit / integration tests
  • Tested manually
  • Tested in a real application

Breaking Changes

None

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Test update (non-breaking change which adds or updates tests)
  • Refactoring (non-breaking change which makes things better)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • CI/build script update (update CI workflow or build scripts)

Checklist

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

Additional context

@github-actions github-actions Bot added T-test Testing related changes T-core Core library changes T-handler Handler implementation changes labels Dec 1, 2026
@github-actions
github-actions Bot requested a review from connor4312 December 1, 2026 16:10
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@connor4312 is on triage rotation this week and is the reviewer for this one.

Labels come from the PR labeler. Please review the change.

Automated triage. Labels are a first pass and the assigned maintainer has the final say.

@DaleSeo
DaleSeo force-pushed the fix/router-request-checks-1518 branch from df2d24d to 7ab080d Compare December 1, 2026 16:23
@DaleSeo DaleSeo self-assigned this Dec 1, 2026
@DaleSeo
DaleSeo force-pushed the fix/router-request-checks-1518 branch from 7ab080d to e024a7d Compare December 1, 2026 19:35
@DaleSeo
DaleSeo marked this pull request as ready for review December 1, 2026 19:37
@DaleSeo
DaleSeo requested a review from a team as a code owner December 1, 2026 19:37
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-01T19:38:41.391402Z e024a7d Draft marked ready
🔒 Security Review ✅ Completed 2026-12-01T19:40:18.041902Z e024a7d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-core Core library changes T-handler Handler implementation changes T-test Testing related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Requests routed by Router skip ServerHandler's request-side checks (_meta validation, task capability guard)

1 participant