csharp-sdk/samples/AspNetCoreSseServer/Program.cs
Stephen Halter 90dfc35fbd
Add AspNetCoreSseServer sample (#81)
* Add AspNetCoreSseMcpTransport sample

* Fix build errors after rebase

* React to McpServerFactory changes

* Make Utf8JsonWriter non thread static

* Fix test errors caused by not rebasing the HttpLister changes on factory overhaul commit
2025-03-18 12:56:44 +02:00

11 lines
236 B
C#

using McpDotNet;
using AspNetCoreSseServer;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddMcpServer().WithTools();
var app = builder.Build();
app.MapGet("/", () => "Hello World!");
app.MapMcpSse();
app.Run();