|
Hy! I am using the latest version of fastmcp to create a server with The issue is that i need to handle few custom headers coming from the client for authorization (api keys) which are required by all tools & prompts I followed this example in the middleware docs https://gofastmcp.com/servers/middleware#custom-middleware-example After adding my custom header validation in this class, The client is unable to access the tools on my server. As my tools are not async, I tried again by converting this class to sync, Despite that attempt, it didn't help. Am i missing something here? you help is greatly appreciated |
Replies: 1 comment 1 reply
|
Hi @kskarthik , I hope this helps you. Then in the console ... I can see my header "x-test". |
Yes, they are shown but these headers need to be consumed by tools & prompts. I fixed that by exposing those variables in global scope. Maybe there could be a better way. But it works out for now :)