mcp-auth-servers

MCP.Pizza Chef: Azure-Samples

mcp-auth-servers are reference MCP servers that demonstrate how authentication works within the Model Context Protocol specification. These servers provide example implementations for various runtime scenarios, including remote, local, and dual-purpose setups. They serve as a practical guide for developers to understand and implement secure authentication and authorization mechanisms in MCP environments, emphasizing the importance of security audits and threat modeling for production use.

Use This MCP server To

Demonstrate authentication flows in MCP server implementations Test and prototype secure MCP server authentication Provide reference code for MCP authorization mechanisms Serve as examples for local and remote MCP server setups Help developers audit and improve MCP security practices Enable learning of MCP authentication best practices Support dual-purpose MCP server deployment scenarios

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

Provider Scenario Server Type Implementation State
Entra ID API Management gating MCP server. Remote MCP Server remote-mcp-apim-functions-python State: Prototype
Entra ID Confidential client, mapped to session token. Dual-purpose MCP Server entra-id-cca-session State: Prototype
Entra ID Public client, using WAM. Local MCP Server entra-id-local-wam State: Prototype
GitHub GitHub application w/OAuth, mapped to session token. Dual-purpose MCP Server github-app-session State: Prototype
Entra ID API Management gating an Azure Functions MCP server. Remote MCP Server remote-auth-mcp-apim-py State: Prototype

mcp-auth-servers FAQ

Are these mcp-auth-servers production-ready?
No, they are demo servers meant for reference and learning; always conduct security audits for production.
What types of authentication scenarios do these servers cover?
They cover remote, local, and dual-purpose MCP server authentication scenarios.
Can I use these servers as-is in my enterprise environment?
You should adapt and audit them to fit your specific enterprise security requirements.
Do these servers support multiple MCP runtime environments?
Yes, they demonstrate authentication for various runtime scenarios including local and remote.
Is threat modeling included in these reference implementations?
The code encourages threat modeling but does not include specific threat models.
How do these servers relate to the MCP specification?
They implement authentication according to the current MCP spec for authorization.
Are there any security warnings associated with these servers?
Yes, the code is for demo purposes only and not secure for production without review.
Can these servers be used to learn about MCP authorization?
Yes, they provide practical examples of authorization mechanisms in MCP.