Skip to content

Conversation

@Nyholm
Copy link
Contributor

@Nyholm Nyholm commented Dec 1, 2025

This pull request continues the work in #104 and solves the problem in #161. Ping @Adebayo120 and @AgentSlim

We introduce a RequestContext

Motivation and Context

We want to have request specific services that only live in the context of a RequestHandlerInterface. Ie services that has access to the Session. These cannot live inside the PSR-11 Container.

PR #104 added a ClientLogger which would live next to our existing ClientGateway. To avoid adding more and more features in ReferenceHandler, I created a RequestContext which gives you access to session and request data (like metadata). The RequestContext will also build you a ClientGateway.

How Has This Been Tested?

Tested with unit test and Inspector

Breaking Changes

Yes. I have just deprecated ClientAwareInterface. I would like to remove it. Should I do it in this PR?

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

Additional context

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.

2 participants