inspector
inspector copied to clipboard
Support adding arbitrary headers
Why not replace the authorization field with headers? This makes the test more flexible.
Can you explain our use case ?
@pulkitsharma07 I agree with @yuedong111 . Instead of a Bearer Token field, a user should be allowed more flexibility in which headers gets included in the http request.
For example, what if the MCP server is not using a Bearer Token for authentication but is rather using an API Key which requires the Ocp-Apim-Subscription-Key header?
A generic text field (or something similar to Postman) would allow for this flexibility. This design would still allow for Bearer tokens by specifying Authorization: Bearer <token>
Here is where the Bearer Header is currently being set. We should make this generic so the user can set any arbitrary header.
+1 on this. It could just be an optional section for additional HTTP headers. The existing bearer token input is easier to use and I think it would be nice if it stayed.
+1 on this. I need to pass three custom headers, that are vital for my application working
what about this? we're converting a lot of restful api to mcp servers via an mcp-gateway service. it'll be helpful if inspector could support custom headers instead of forcing jwt auth. if this sounds broadly useful, i'm happy to submit a pr.
@iFurySt Yes. This sounds great!😊
@iFurySt looking forward to your PR 😄
@iFurySt looking forward to this addition, any update on this? 😁
@iFurySt +1 on this. I will be helpful to have this feature
+1, I need to send more headers in addition to auth like x-tenant-name etc
+1
+++++1 this would be MORE flexible for developers who wanna suport customized headers to connect to mcp servers; looking forward to your updates!!!
Need for a custom header to pass some user information when initialize the connection.
@iFurySt love your screenshot! Cannot wait to see your PR!
I use "Authorization: Token xyz .." It's default in Django REST
+1
need this as well
I use "Authorization: Token xyz .." It's default in Django REST
+1
I think if this is a JWT, it should be:
Authorization: Bearer [JWT]
Using @popomore fork at the moment (associated with PR #549) and it works fine. Please merge this, since the fork is behind by a hundredish commits.
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
Note: While the PR is pending https://github.com/modelcontextprotocol/inspector/pull/549, you can test the changes by running:
npx github:popomore/inspector
⚠️ This runs code from an unmerged PR. Please review the changes before running to ensure they're safe.
@Gabswim I believe these headers are only sent during the connection request. There are MCPs which expects MCP during the tool call as well. Is there a possibility of sending these headers along with each tool call as well?