Support filtering tools depends on request data (http-headers, etc)
Opened this issue · 2 comments
Please do a quick search on GitHub issues first, the feature you are about to request might have already been requested.
Expected Behavior
There is no way to filter available tools in toolsListRequestHandler() and toolsCallRequestHandler()
I would like to filter tools to specific clients depending on some data in http-headers.
Current Behavior
There is no way to filter tools dynamically. The only way to do it - inherit McpAsyncServer, and use same package io.modelcontextprotocol.server - because McpServerFeatures.Async used in constructor is package-private. So maybe also make McpServerFeatures.Async public?
Context
I would like to implement authorization to be able to restrict tool calls to specific clients.
Did you have any progress on implementing this yourself? I'm also striving for the same aim.
I think this is a relatively important feature, but currently the SDK does not support it.