You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ASP.NET Core integration supports SSE transport alongside Streamable HTTP. The same `MapMcp()` endpoint handles both protocols — clients connecting with SSE are automatically served using the legacy SSE mechanism:
161
161
162
-
```csharp
163
-
varbuilder=WebApplication.CreateBuilder(args);
164
-
165
-
builder.Services.AddMcpServer()
166
-
.WithHttpTransport()
167
-
.WithTools<MyTools>();
168
-
169
-
varapp=builder.Build();
170
-
app.MapMcp(); // Handles both Streamable HTTP and SSE clients
171
-
app.Run();
172
-
```
173
-
174
162
No additional configuration is needed. When a client connects using the SSE protocol, the server responds with an SSE stream for server-to-client messages and accepts client-to-server messages via a separate POST endpoint.
0 commit comments