modelcontextprotocol / modelcontextprotocol/csharp-sdk
Add Granular Authorization Support to SSE ServerTools
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 4.5k
- Forks
- 814
- Avg merge
- 9d 19h
- Merged PRs (30d)
- 4
Description
Currently it appears we can only add auth at the MapMcp level, which is good for securing the toolset, but is missing the granular control we enjoy in other web-based services.
Describe the solution you'd like
Something like .WithTools().RequireAuthorization(policy-name);
I appreciate the protocol itself may not currently have this specced out, but with the SSE aspect in the AspNetCore package maybe it's possible?
Given the potential for creating agents, it'd be a shame if limited security hindered adoption.
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
Start by reviewing authorization at the MapMcp level and the SSE ServerTools entry points in the AspNetCore package. Determine whether per-tool RequireAuthorization(policy-name) can be supported by the protocol and server architecture. Done means a decided API design, enforced policy behavior for individual tools, and coverage for authorized and unauthorized requests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api, authorization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100