Skip to content

fix: accept stringified numeric response IDs#1021

Merged
DaleSeo merged 1 commit into
mainfrom
fix/stringified-response-id
Jul 21, 2026
Merged

fix: accept stringified numeric response IDs#1021
DaleSeo merged 1 commit into
mainfrom
fix/stringified-response-id

Conversation

@DaleSeo

@DaleSeo DaleSeo commented Jul 21, 2026

Copy link
Copy Markdown
Member

Fixes #1017

Motivation and Context

Some JSON-RPC gateways serialize numeric response IDs as strings, causing rmcp clients to reject valid initialization or discovery responses and leave regular requests unresolved. This change accepts a stringified numeric ID only when matching a numeric request ID, while preserving exact matching for genuine string IDs. The same correlation rule now covers startup, pending requests, and streamable HTTP cancellation bookkeeping, with regressions for exact string precedence.

How Has This Been Tested?

Added tests

Breaking Changes

None

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

@github-actions github-actions Bot added T-test Testing related changes T-core Core library changes T-service Service layer changes T-transport Transport layer changes labels Jul 21, 2026
@DaleSeo
DaleSeo force-pushed the fix/stringified-response-id branch from 01cbcb3 to 647624a Compare July 21, 2026 16:45
@DaleSeo
DaleSeo marked this pull request as ready for review July 21, 2026 16:54
@DaleSeo
DaleSeo requested a review from a team as a code owner July 21, 2026 16:54
@DaleSeo
DaleSeo merged commit 8803d39 into main Jul 21, 2026
21 checks passed
@DaleSeo
DaleSeo deleted the fix/stringified-response-id branch July 21, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2026-07-28 T-core Core library changes T-service Service layer changes T-test Testing related changes T-transport Transport layer changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

conflict initialized response id when gateway echoes numeric JSON-RPC id as string

2 participants