Skip to content

fix(mcp): propagate progress token to elicitation requests#6337

Open
SJvaca30 wants to merge 1 commit into
spring-projects:mainfrom
SJvaca30:fix-mcp-elicit-progress-token
Open

fix(mcp): propagate progress token to elicitation requests#6337
SJvaca30 wants to merge 1 commit into
spring-projects:mainfrom
SJvaca30:fix-mcp-elicit-progress-token

Conversation

@SJvaca30

@SJvaca30 SJvaca30 commented Jun 8, 2026

Copy link
Copy Markdown

What changed

Closes #5050.

This propagates the inbound MCP request progressToken into typed elicitation requests created from McpSyncRequestContext and McpAsyncRequestContext.

The implementation builds a fresh request metadata map when a progress token exists, so existing elicitation metadata is preserved without mutating caller-provided maps. Requests without a progress token keep their existing metadata behavior.

Testing

  • CI=true ./mvnw -Dmaven.build.cache.enabled=false -pl mcp/mcp-annotations -Dtest=DefaultMcpSyncRequestContextTests#testElicitationWithProgressToken,DefaultMcpAsyncRequestContextTests#testElicitationWithProgressToken test
  • CI=true ./mvnw -Dmaven.build.cache.enabled=false -pl mcp/mcp-annotations -Dtest=DefaultMcpSyncRequestContextTests,DefaultMcpAsyncRequestContextTests test
  • CI=true ./mvnw -Dmaven.build.cache.enabled=false -pl mcp/mcp-annotations test
  • git diff --check

Signed-off-by: SJLIM <yyvaca30@gmail.com>
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.

McpSyncRequestContext.elicit(...) does not set progressToken

1 participant