Document ClientOAuthOptions.ScopeSelector usage
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- csharp
- Domain
- documentation
Research direction
Start with the existing OAuth guidance and the ClientOAuthOptions.ScopeSelector XML documentation, then identify the best location for a focused conceptual section. Done means documenting filtering, appending client-specific scopes, and returning null or an empty sequence to omit the scope parameter, with a small C# example.
Written by the indexing model from the issue text.
Description
ClientOAuthOptions.ScopeSelector is a public API for customizing the OAuth scopes selected after the server-provided scope information has been resolved. It was added in #1596, but I couldn't find any conceptual documentation showing when or how to use it.
The XML documentation describes the API behavior, but users browsing the SDK documentation may not discover that ScopeSelector can be used to:
- filter scopes advertised by the server;
- append client-specific scopes when needed;
- return
nullor an empty sequence to omit thescopeparameter entirely.
A small conceptual example would make this behavior easier to discover, for example:
var oauthOptions = new ClientOAuthOptions
{
ScopeSelector = scopes =>
scopes?.Where(scope => scope is "mcp:tools" or "mcp:resources")
};
This would be especially useful alongside the existing OAuth guidance, where users may otherwise assume that Scopes is the only way to influence the requested scope set.
I also checked the currently open OAuth documentation work in #1801, which does not appear to cover ScopeSelector.
I'd be happy to submit a focused documentation PR for this and keep the change narrowly scoped to client-side scope selection, placing it wherever best fits the documentation structure.
[!NOTE]
This issue was prepared with AI assistance.
- 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 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 ·
-
Difficulty 5/5 Over a week Newbie friendliness 28/100
modelcontextprotocol/csharp-sdk#1881 ·
All issues in modelcontextprotocol/csharp-sdk
Similar issues
-
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
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·