Skip to content

Commit 044d947

Browse files
authored
Marking SSE transport as deprecated (#775)
Fixes #759
1 parent 9018c39 commit 044d947

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/CommunityToolkit.Aspire.Hosting.McpInspector/McpInspectorResourceBuilderExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ public static IResourceBuilder<McpInspectorResource> AddMcpInspector(this IDistr
5252
transport = s.TransportType switch
5353
{
5454
McpTransportType.StreamableHttp => "streamable-http",
55+
#pragma warning disable CS0618
5556
McpTransportType.Sse => "sse",
57+
#pragma warning restore CS0618
5658
_ => throw new NotSupportedException($"The transport type {s.TransportType} is not supported.")
5759
},
5860
endpoint = s.Endpoint.Url

src/CommunityToolkit.Aspire.Hosting.McpInspector/McpTransportType.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ public enum McpTransportType
1313
/// <summary>
1414
/// The MCP server uses Server Sent Events (SSE) as the transport type.
1515
/// </summary>
16+
[Obsolete("SSE Transport is deprecated in the MCP spec, use StreamableHttp instead. This will be removed in the next release.")]
1617
Sse
1718
}

tests/CommunityToolkit.Aspire.Hosting.McpInspector.Tests/McpInspectorResourceBuilderExtensionsTests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ public void WithMcpServerAddsServerToResource()
6060

6161
[Theory]
6262
[InlineData(McpTransportType.StreamableHttp)]
63+
#pragma warning disable CS0618
6364
[InlineData(McpTransportType.Sse)]
65+
#pragma warning restore CS0618
6466
public void WithMcpServerSpecificTransportTypeAddsServerToResource(McpTransportType transportType)
6567
{
6668
// Arrange

0 commit comments

Comments
 (0)