You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I set up my HTTP server to put the Authorization header into the request Context.
I noticed my tool functions receive the Context from the initialize method, not the Context from the tools/call method.
Is that behavior incorrect or is it the behavior what is expected by the MCP spec?
I realize that authorization checking is a separate concern from the tool implementation. I did not see a way to add interceptors to specific tools in modelcontextprotocol/go-sdk .
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
Discussion Topic
I would like some of my tools built using https://github.com/modelcontextprotocol/go-sdk to require an API key, but others would need no security.
I set up my HTTP server to put the Authorization header into the request Context.
I noticed my tool functions receive the Context from the
initialize
method, not the Context from thetools/call
method.Is that behavior incorrect or is it the behavior what is expected by the MCP spec?
I realize that authorization checking is a separate concern from the tool implementation. I did not see a way to add interceptors to specific tools in modelcontextprotocol/go-sdk .
Beta Was this translation helpful? Give feedback.
All reactions