Authentication Demo
Demonstrates creating an MCP server that enforces OAuth 2.0 authentication for its tools and resources.
Explore the creation of a secure Model Context Protocol (MCP) server that mandates OAuth 2.0 authentication for accessing its functionalities. This sample illustrates the implementation of JWT bearer token authentication, protected MCP tools (like simple math operations), and seamless integration with ASP.NET Core's authentication and authorization mechanisms, providing crucial OAuth resource metadata for client discovery. It uses .NET Aspire and Keycloak to showcase a robust security model.
主要功能
01OAuth 2.0 protection for MCP servers
02Sample protected math tools (addition and multiplication)
03Configurable JWT bearer token authentication
040 GitHub stars
05Provision of OAuth resource metadata for client discovery
06Integration with ASP.NET Core authentication and authorization
使用案例
01Learning secure MCP server development
02Demonstrating OAuth 2.0 and JWT authentication flows for MCP
03Prototyping MCP servers with robust authorization