🔒 MCP Server Authentication Reference Collection
LocalAbout 🔒 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
- 01Remote, local and dual-purpose server examples
- 02Entra ID and GitHub identity provider examples
- 03Azure API Management gating examples
- 04Protected Resource Metadata (PRM) example
Use cases
- 01Referencing OAuth authentication in MCP servers
- 02Comparing Entra ID public and confidential client setups
- 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.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
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:
- Local MCP servers:
- Dual-purpose MCP servers (can run locally or remotely):
Supported identity providers
| Provider | Scenario | Server Type | Implementation | State |
|---|---|---|---|---|
| Entra ID | API Management gating MCP server. | remote-mcp-apim-functions-python | ||
| Entra ID | Confidential client, mapped to session token. | entra-id-cca-session | ||
| Entra ID | Public client, using WAM. | entra-id-local-wam | ||
| GitHub | GitHub application w/OAuth, mapped to session token. | github-app-session | ||
| Entra ID | API Management gating an Azure Functions MCP server. | remote-auth-mcp-apim-py | ||
| Entra ID | API Management gating an App Service MCP server with Protected Resource Metadata (PRM) | remote-mcp-apim-oauth-prm |
Comments
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.