+ The Model Context Protocol (MCP) lets AI tools like GitHub Copilot and Claude access + Essential C# book content directly. Generate a personal access token below and add it to your MCP client configuration. +
+ + @if (!Model.McpEnabled) + { +Expires: @Model.TokenExpiresAt?.ToString("MMMM d, yyyy")
+ +Add the following to your MCP client (e.g. .vscode/mcp.json or claude_desktop_config.json):
{
+ "essentialcsharp": {
+ "url": "@(HttpContext.Request.Scheme)://@(HttpContext.Request.Host)/mcp",
+ "headers": {
+ "Authorization": "Bearer @Model.GeneratedToken"
+ }
+ }
+}
+
+ To test locally, run npx @@modelcontextprotocol/inspector, set the URL to @(HttpContext.Request.Scheme)://@(HttpContext.Request.Host)/mcp, and add an Authorization header with value Bearer <token>.