mcpField
🔒
🔒 MCP Server Authentication Reference Collection

🔒 MCP Server Authentication Reference Collection

Local
github.com/Azure-SamplesDeveloper Tools50Updated 66w ago

About 🔒 MCP Server Authentication Reference Collection

MCP Server Authentication Reference Collection provides reference servers that demonstrate authentication under the current Model Context Protocol specification. It is aimed at developers who want to see how remote and local MCP servers handle auth. The code is for demonstration only and requires a security audit before production use.

Key features

  1. 01Remote, local and dual-purpose server examples
  2. 02Entra ID and GitHub identity provider examples
  3. 03Azure API Management gating examples
  4. 04Protected Resource Metadata (PRM) example

Use cases

  1. 01Referencing OAuth authentication in MCP servers
  2. 02Comparing Entra ID public and confidential client setups
  3. 03Designing API gateway authentication for remote MCP servers on Azure

MCP support

The examples are MCP servers that demonstrate how to add authentication to remote or local MCP servers.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

🔒 MCP Server Authentication Reference Collection

Reference servers that demo how authentication works with the current Model Context Protocol spec.

Warning

Code presented here is for demo purposes only. Your specific scenarios (including rules inside your enterprise, specific security controls, or other protection mechanisms) may differ from the ones that are outlined in this repository. Always conduct a security audit and threat modeling for any production and customer-facing assets that require authentication and authorization.

Scenarios

Servers above are designed for various runtime scenarios. They are tagged as follows:

  • Remote MCP servers: Remote MCP Server
  • Local MCP servers: Local MCP Server
  • Dual-purpose MCP servers (can run locally or remotely): Dual-purpose MCP Server

Supported identity providers

ProviderScenarioServer TypeImplementationState
Entra IDAPI Management gating MCP server.Remote MCP Serverremote-mcp-apim-functions-pythonState: Prototype
Entra IDConfidential client, mapped to session token.Dual-purpose MCP Serverentra-id-cca-sessionState: Prototype
Entra IDPublic client, using WAM.Local MCP Serverentra-id-local-wamState: Prototype
GitHubGitHub application w/OAuth, mapped to session token.Dual-purpose MCP Servergithub-app-sessionState: Prototype
Entra IDAPI Management gating an Azure Functions MCP server.Remote MCP Serverremote-auth-mcp-apim-pyState: Prototype
Entra IDAPI Management gating an App Service MCP server with Protected Resource Metadata (PRM)Remote MCP Serverremote-mcp-apim-oauth-prmState: Prototype

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.