Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Practical OAuth implementation for production

Open
#1,052 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Quiet
Tech stack
csharp

Research direction

Start by reviewing samples/ProtectedMcpServer and tests/ModelContextProtocol.TestOAuthServer, then read issue #648 and the AuthorizationServers metadata usage. Document a practical production authentication path for remote MCP servers, including whether existing providers are supported and where the samples are only educational. Done means the guidance answers the implementation questions without requiring readers to infer protocol details.

Written by the indexing model from the issue text.

Description

area-auth documentation enhancement help wanted P3 ready for work

For building a production-ready remote MCP server with OAuth authentication, what is a practical way to implement the authentication part?

So far all the examples I've checked have comments like "not for production use" and often contain code implementing low-level details of some security protocols. For example, the ProtectedMcpServer sample seem to depend on the TestOAuthServer, which basically implements an OAuth server from scratch, including things like token encryption, encoding etc. This is very useful for educational purposes, but probably not very practical for building a real application.

It's also possible to point the AuthorizationServers metadata to an existing auth provider (Microsoft/Google/etc.), but seems like even that doesn't work well with some providers due to issues like https://github.com/modelcontextprotocol/csharp-sdk/issues/648, and it's not clear whether those issues might actually be by design due to incorrect usage.

So, as of today, how should someone building a real world MCP server go about authentication? Is their best bet to build an OAuth server from scratch just like the samples show? Or is there a better re-usable solution, ideally an existing authentication service that is well supported and works smoothly with MCP scenarios?

Dominant language
C#
Stars
4.5k
Forks
814
Avg merge
9d 19h
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from modelcontextprotocol/csharp-sdk

All issues in modelcontextprotocol/csharp-sdk

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.