Skip to content

fix: validate and forward SEP-2243 parameter headers - #109

Draft
lucarlig wants to merge 14 commits into
user/luca/add-client-conformancefrom
user/luca/sep2243-rmcp-headers
Draft

fix: validate and forward SEP-2243 parameter headers#109
lucarlig wants to merge 14 commits into
user/luca/add-client-conformancefrom
user/luca/sep2243-rmcp-headers

Conversation

@lucarlig

@lucarlig lucarlig commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • validate modern tools/call Mcp-Param-* headers against request-scoped tool schemas published by the control plane
  • return HTTP 400 / JSON-RPC -32020 for a mismatch or missing published schema
  • forward validated parameter headers unchanged on the outgoing tools/call and protect them from backend header configuration
  • keep plugin handling unchanged: plugins run after validation and do not cause header reconstruction

The dataplane does not call tools/list, reconstruct headers from arguments, or change RMCP. This PR requires IBM/mcp-context-forge#6348 to publish visibility-filtered schemas keyed by original upstream tool name.

The GitHub composed conformance job still pulls the stock control-plane image and therefore fails to deserialize its pre-#6348 payload (missing field tool_schemas). No dataplane fallback is included; the job will pass once #6348 is merged into that image.

Stacked on #107. Related: IBM/mcp-context-forge#6256.

Verification

  • cargo clippy --locked --workspace --all-targets -- -D warnings
  • cargo nextest run --locked --workspace (227 passed, 3 skipped)
  • workspace build, dependency-policy, shear, formatting, generated-schema, and wiki checks
  • conformance adapter, reporter, and baseline unit tests
  • control-plane publisher unit tests (26 passed), Ruff, and Black
  • cross-repo E2E with the official conformance fixture and #6348 publisher: matching plain/Base64 values pass; mismatched, invalid Base64, and missing headers return 400/-32020

The direct fixture E2E is used because the official server scenario currently reaches the separately baselined stateless tools/list session limitation during setup. Client findings remain limited to the existing four shell-adapter generation IDs.

@lucarlig lucarlig changed the title fix: generate SEP-2243 parameter headers fix: require stateless metadata and generate SEP-2243 headers Aug 21, 2026
@lucarlig lucarlig changed the title fix: require stateless metadata and generate SEP-2243 headers fix: validate and generate SEP-2243 headers Aug 21, 2026
@lucarlig lucarlig changed the title fix: validate and generate SEP-2243 headers fix: validate and forward SEP-2243 headers Aug 21, 2026
@lucarlig lucarlig changed the title fix: validate and forward SEP-2243 headers fix: forward SEP-2243 parameter headers Aug 21, 2026
@lucarlig
lucarlig force-pushed the user/luca/sep2243-rmcp-headers branch from 4005c69 to e3abd7e Compare August 21, 2026 16:42
@lucarlig
lucarlig force-pushed the user/luca/sep2243-rmcp-headers branch from 374730d to 7a65618 Compare August 24, 2026 08:53
@lucarlig lucarlig changed the title fix: forward SEP-2243 parameter headers fix: validate and forward SEP-2243 parameter headers Aug 24, 2026
@lucarlig
lucarlig force-pushed the user/luca/sep2243-rmcp-headers branch from 7a65618 to 752a212 Compare August 24, 2026 13:59
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
Signed-off-by: lucarlig <luca.carlig@ibm.com>
@lucarlig
lucarlig force-pushed the user/luca/sep2243-rmcp-headers branch from 752a212 to 0a81ed1 Compare August 24, 2026 14:29
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.

1 participant