Github copilot not setting bearer token on acces to tools.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- csharp, github
- Domain
- api, authentication
Research direction
Start with the .mcp.json configuration and reproduce the call from Visual Studio GitHub Copilot chat to the MCP server, comparing it with the working Postman request. Determine whether the missing bearer token is caused by the C# SDK or the Copilot client; done means the tool request includes the authenticated token or the issue is narrowed to the responsible component.
Written by the indexing model from the issue text.
Description
Describe the bug
I have created an MCP server and I am trying to use it in visual studio 2026 with github copilot. I created an .mcp.json for the solution and I managed to authenticate using oauth using the codelens ui for that file. When saving the .mcp.json file Visual Studio supplies the bearer token to the MCP server and it is marked as online.
But when copilot chat tries to access it, the bearer token is not included in the request. But the server still shows connected in the config. I don't know if this is a problem with this library or not. If I execute the tools using the bearer token and postman it all works. But github copilot does not try to supply the token.
Do I need to add anything special in the way of attributes or such to get copilot ai to understand it needs to supply the bearer token when calling tools?
To Reproduce
- Authenticate the mcp server
- Try to use the tool in the chat. No token gets send.
Expected behavior
copilot chat should send the bearer token to the mcp server
Logs
Additional context
- Dominant language
- C#
- Stars
- 4.5k
- Forks
- 814
- Avg merge
- 9d 19h
- Merged PRs (30d)
- 4
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.
More from modelcontextprotocol/csharp-sdk
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
modelcontextprotocol/csharp-sdk#1867 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
modelcontextprotocol/csharp-sdk#1840 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
modelcontextprotocol/csharp-sdk#1836 ·
-
enhancement needs confirmation
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
modelcontextprotocol/csharp-sdk#678 · 1 comment ·
-
enhancement needs confirmation P3 ready for work
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
modelcontextprotocol/csharp-sdk#515 · 6 comments · 3 reactions ·
All issues in modelcontextprotocol/csharp-sdk
Similar issues
-
Documentation
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cake-build/cake#5024 ·
-
Frontend status/draft TechnicalDebt
Difficulty 2/5 1-2 days Newbie friendliness 75/100
Altinn/altinn-auth#4143 ·
-
.NET Flaky Test Testing Tests
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
getsentry/sentry-dotnet#5617 · 1 comment ·
-
:watch: Not Triaged dotnet-fsharp/svc
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Client customer-reported needs-team-attention question Service Attention WebPubSub
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Azure/azure-sdk-for-net#63292 · 3 comments · 1 reaction ·