McpNet.Transport.Http
1.0.6
dotnet add package McpNet.Transport.Http --version 1.0.6
NuGet\Install-Package McpNet.Transport.Http -Version 1.0.6
<PackageReference Include="McpNet.Transport.Http" Version="1.0.6" />
<PackageVersion Include="McpNet.Transport.Http" Version="1.0.6" />
<PackageReference Include="McpNet.Transport.Http" />
paket add McpNet.Transport.Http --version 1.0.6
#r "nuget: McpNet.Transport.Http, 1.0.6"
#:package McpNet.Transport.Http@1.0.6
#addin nuget:?package=McpNet.Transport.Http&version=1.0.6
#tool nuget:?package=McpNet.Transport.Http&version=1.0.6
McpNet.Transport.Http
MCP protocol handler built on System.Net.HttpListener. Accepts inbound MCP connections over Streamable HTTP and SSE without any ASP.NET Core dependency.
Used exclusively by McpNet.Gateway.Standalone.
Key Type
HttpListenerMcpTransport
// Registered in DI by McpGatewayBuilder
services.AddSingleton<HttpListenerMcpTransport>();
// Called by McpGatewayServer for every /mcp* request
await _mcpTransport.HandleContextAsync(context, cancellationToken);
HandleContextAsync is the single entry point - it receives a raw HttpListenerContext and handles the full MCP session lifecycle (handshake, session, tool dispatch, teardown).
Protocol Support
| Method | Transport |
|---|---|
POST /mcp |
Streamable HTTP (request/response) |
GET /mcp |
SSE stream (persistent connection) |
Configuration
services.AddSingleton(new HttpListenerMcpOptions
{
Port = 5050,
McpPath = "/mcp"
});
No ASP.NET Core
This library uses only:
System.Net.HttpListener(built into .NET)McpNet.Gateway(business logic)
No Microsoft.AspNetCore packages are referenced.
Dependency Graph
McpNet.Transport.Http (net8.0)
└── McpNet.Gateway
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- McpNet.Gateway (>= 1.0.6)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on McpNet.Transport.Http:
| Package | Downloads |
|---|---|
|
McpNet.Gateway.Standalone
Self-contained MCP Gateway using System.Net.HttpListener. No ASP.NET Core dependency - embed in any .NET 8 application. Call McpGatewayBuilder.Create().ListenOn(5050).Build() to start. |
GitHub repositories
This package is not used by any popular GitHub repositories.