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
This commit is contained in:
parent
b5a26e4c33
commit
90dfc35fbd
1 changed files with 635 additions and 332 deletions
11
samples/AspNetCoreSseServer/Program.cs
Normal file
11
samples/AspNetCoreSseServer/Program.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
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();
|
||||
Loading…
Reference in a new issue