Skip to content

Conversation

@rhishirajnema
Copy link

Motivation and Context

Change is required to fetch Spring authentication object in ToolContext of tool method (annotated with @tool spring annotation).
Each application has it's own authentication mechanism which can be achieved using Spring Security. Both /sse and /mcp/message endpoint can be authenticated this way but the problem is Authentication object is not available when calling Tool method so that it can be used for authorization.

How Has This Been Tested?

Yes, the change is tested in our application to work with our internal Auth mechanism.

Breaking Changes

The change is backward compatible

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • [ x] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • [ x] I have read the MCP Documentation
  • [x ] My code follows the repository's style guidelines
  • [ x] New and existing tests pass locally
  • [x ] I have added appropriate error handling
  • [ x] 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.

1 participant