modelcontextprotocol / modelcontextprotocol/csharp-sdk

[Documentation request] Authentication architecture suggestions

Open
#1,494 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation enhancement P3 ready for work
Dominant language
C#
Stars
4.5k
Forks
814
Avg merge
9d 19h
Merged PRs (30d)
4

Description

It would be great if the documentation website had a few pointers on authentication architecture choices.

Imagine you have an existing ASP.NET Core API project which already has its own AzureAD authentication + JWT Bearer authentication for development (with dotnet user-jwts). I think this is a common scenario for people wanting to add MCP functionality to their existing solution.

It would be great to read something about setting that up, and about the choices that can be made there:

  • one project vs multiple projects:
    • putting both the MCP and normal API endpoints in the same project. This adds some complexity regarding coexistence of authentication schemes. I see for MCP a different scheme is needed.
    • factoring out the business logic into a common project that is referenced by a REST API project and a MCP server project
  • one app registration vs multiple app registrations in Entra ID?

Searched:

Contributor guide

Open the contributing guide

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.

Research direction

Start with the documentation website and the two linked ASP.NET Core authentication pages, then compare the existing API-plus-MCP scenarios described in the issue with the mcp-gateway example. Done means adding guidance that explains project and Entra ID app-registration choices, including how coexisting authentication schemes can be approached.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
authentication, backend-api-design, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.