ProtectedMcpServer sample doesn't work with VSCode auth flow
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- csharp, vscode
- Domain
- authentication, backend
Research direction
Start by running tests/ModelContextProtocol.TestOAuthServer with net9.0, then run samples/ProtectedMcpServer and reproduce the VSCode MCP authentication flow. Compare its behavior with samples/ProtectedMcpClient, which works correctly, and trace the client registration and authorization requests. Done means VSCode can complete authentication against the protected sample server.
Written by the indexing model from the issue text.
Description
Steps to reproduce the behavior:
- cd .\tests\ModelContextProtocol.TestOAuthServer\
- dotnet run --framework net9.0
- cd samples\ProtectedMcpServer\
- dotnet run
- Add MCP Server http://localhost:7071/ on VsCode
- Click proceed on DCR not supported:
- When prompted for Client registration details (Client Id) enter "demo-client"
- VsCode tries to authenticate
but when doing so fails with
Expected behavior
Auth flow should work from VsCode MCP client.
Additional context
Testing the same MCP server from samples\ProtectedMcpClient works correctly.
- 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
-
priority-0
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
StackExchange/StackExchange.Redis#3249 ·
-
[Feat] 조합 영역 구분선 개선 Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100