Your ASP.NET API Already Speaks MCP - It Just Doesn't Know It Yet
TL;DR: dotnet add package Kebechet.Api.ToMcp + 3 lines in Program.cs = your ASP.NET controllers become AI-callable MCP tools. No separate server, no OpenAPI spec, compile-time generated. GitHub rep...

Source: DEV Community
TL;DR: dotnet add package Kebechet.Api.ToMcp + 3 lines in Program.cs = your ASP.NET controllers become AI-callable MCP tools. No separate server, no OpenAPI spec, compile-time generated. GitHub repo Three lines of code. That's what it took to let Claude talk to my ASP.NET API: builder.Services.AddMcpTools(Assembly.GetExecutingAssembly()); app.UseMcpLoopPrevention(); app.MapMcpEndpoint("mcp"); No hand-written tool classes. No separate proxy server. No OpenAPI spec to maintain. The controllers I already had became AI-callable tools automatically. I built Api.ToMcp - a C# source generator that reads your existing controllers at compile time and generates MCP-compatible tool classes. This is the story of how it went from an idea to a published NuGet package in a single day. Why not just use OpenAPI? Before diving in, let's address the elephant in the room. There are already ways to bridge REST APIs to MCP, and most of them work through OpenAPI/Swagger specs. OpenAPI/Swagger JSON approach -