modelcontextprotocol / modelcontextprotocol/csharp-sdk
Support externally sourced JWT in Auth header from MCP client
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 4.5k
- Forks
- 814
- Avg merge
- 9d 19h
- Merged PRs (30d)
- 4
Description
I have been using the MCP OAuth support and even DCR, which is awesome.
But there are other scenarios where we are building in using MCP Servers into some host that doesn't understand this protocol, or that doesn't have an OAuth 2.1 server available, but where we might have obtained a valid access token (Jwt Bearer token) through some other means.
In this case I would like to add this to the MCP client so that it can be passed in the Authorization: Bearer {jwt} header on each call.
Is there a good way to do this - and if not can there be a way that feel intuitive to provide that kid of 'out of band' auth support for the MCP calls?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are mentioned. Start by reviewing the MCP client’s existing OAuth support and how it constructs the Authorization header, then determine where an externally supplied JWT could be provided. Done means the client can send the supplied bearer token on each call without requiring an OAuth 2.1 server.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- authentication
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100