Skip to content

Enable Authentication header name configuration#272

Merged
cliffhall merged 12 commits into
modelcontextprotocol:mainfrom
idosal:set-header
Apr 14, 2025
Merged

Enable Authentication header name configuration#272
cliffhall merged 12 commits into
modelcontextprotocol:mainfrom
idosal:set-header

Conversation

@idosal
Copy link
Copy Markdown
Contributor

@idosal idosal commented Apr 5, 2025

This change adds a Header Name field to the sidebar. It overrides the "Authorization" default name.

image

Motivation and Context

Some servers use a custom header name (e.g., Vercel Preview). The current feature doesn't support these servers.

How Has This Been Tested?

I've added unit tests and tested it manually

Breaking Changes

No breaking changes.

Types of changes

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

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Please let me know if it requires any changes, and thanks for the great project!

@pulkitsharma07
Copy link
Copy Markdown
Contributor

Comment thread client/src/App.tsx Outdated
@idosal idosal requested a review from pulkitsharma07 April 11, 2025 21:14
@idosal
Copy link
Copy Markdown
Contributor Author

idosal commented Apr 11, 2025

@pulkitsharma07 fixed comments and added tests :)

@cliffhall
Copy link
Copy Markdown
Member

cliffhall commented Apr 11, 2025

Some servers use a custom header name (e.g., Vercel Preview). The current feature doesn't support these servers.

Hi @idosal

Can you add a video (or loom if it's too long) of using an alternative header and an easy set of steps to reproduce?

@cliffhall cliffhall added enhancement New feature request waiting on submitter Waiting for the submitter to provide more info labels Apr 11, 2025
@idosal
Copy link
Copy Markdown
Contributor Author

idosal commented Apr 11, 2025

Some servers use a custom header name (e.g., Vercel Preview). The current feature doesn't support these servers.

Hi @idosal

Can you add a video (or loom if it's too long) of using an alternative header and an easy set of steps to reproduce?

Hey @cliffhall ,
I'm sorry to say I no longer use Vercel, so I don't have an example handy.

@cliffhall
Copy link
Copy Markdown
Member

Some servers use a custom header name (e.g., Vercel Preview). The current feature doesn't support these servers.

Hi @idosal
Can you add a video (or loom if it's too long) of using an alternative header and an easy set of steps to reproduce?

Hey @cliffhall , I'm sorry to say I no longer use Vercel, so I don't have an example handy.

Seems like a worthwhile change if there are places out there that do this. Maybe you'd like to find a site that uses something other than "Authorization" header? I wouldn't want to merge without testability.

@idosal
Copy link
Copy Markdown
Contributor Author

idosal commented Apr 11, 2025

Some servers use a custom header name (e.g., Vercel Preview). The current feature doesn't support these servers.

Hi @idosal
Can you add a video (or loom if it's too long) of using an alternative header and an easy set of steps to reproduce?

Hey @cliffhall , I'm sorry to say I no longer use Vercel, so I don't have an example handy.

Seems like a worthwhile change if there are places out there that do this. Maybe you'd like to find a site that uses something other than "Authorization" header? I wouldn't want to merge without testability.

That makes complete sense. I'm afraid I couldn't find a good example in the wild. Attaching a screenshot that shows the custom header being added to the request instead of Authorization if that helps:
image

If you feel the feature should wait until there are live examples, that's perfectly understandable.

Comment thread client/src/lib/hooks/useConnection.ts Outdated
Comment thread client/src/App.tsx Outdated
Comment thread client/src/App.tsx
@idosal idosal requested a review from pulkitsharma07 April 11, 2025 21:51
@idosal
Copy link
Copy Markdown
Contributor Author

idosal commented Apr 12, 2025

@pulkitsharma07 @cliffhall I've pushed all requested changes.

Comment thread client/src/lib/hooks/useConnection.ts Outdated
Comment thread README.md Outdated
idosal and others added 2 commits April 12, 2025 22:52
Co-authored-by: Ola Hungerford <olahungerford@gmail.com>
@idosal idosal requested a review from olaservo April 12, 2025 19:55
Copy link
Copy Markdown
Member

@cliffhall cliffhall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we amend the README?

Comment thread README.md Outdated
Copy link
Copy Markdown
Member

@cliffhall cliffhall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird. My review page was out of sync and it looked as if the README wasn't amended. LGTM! 👍

@cliffhall cliffhall merged commit 0b37722 into modelcontextprotocol:main Apr 14, 2025
2 checks passed
IgnacioC44 referenced this pull request in MCPJam/inspector Jun 21, 2025
Enable Authentication header name configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature request waiting on submitter Waiting for the submitter to provide more info

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants