Skip to content

Fix: use RequestContext in client-communication server example#190

Merged
chr-hertel merged 1 commit into
modelcontextprotocol:mainfrom
CodeWithKyrian:fix/client-communication-example-request-context
Dec 20, 2025
Merged

Fix: use RequestContext in client-communication server example#190
chr-hertel merged 1 commit into
modelcontextprotocol:mainfrom
CodeWithKyrian:fix/client-communication-example-request-context

Conversation

@CodeWithKyrian

Copy link
Copy Markdown
Contributor

This PR updates the client-communication example to use RequestContext instead of the deprecated ClientGateway type hint.

Motivation and Context

PR #176 introduced RequestContext as the sole injectable context object for tool handlers, replacing direct injection of ClientGateway and Session. While ClientAwareService was updated, the inline callback tool registered in server.php was missed.

@chr-hertel chr-hertel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @CodeWithKyrian!

@chr-hertel chr-hertel merged commit 2c96922 into modelcontextprotocol:main Dec 20, 2025
12 checks passed
@Nyholm

Nyholm commented Dec 20, 2025

Copy link
Copy Markdown
Contributor

Thank you. I must have missed that.

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.

3 participants