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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="McpNet.Transport.Http" Version="1.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="McpNet.Transport.Http" Version="1.0.6" />
                    
Directory.Packages.props
<PackageReference Include="McpNet.Transport.Http" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add McpNet.Transport.Http --version 1.0.6
                    
#r "nuget: McpNet.Transport.Http, 1.0.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package McpNet.Transport.Http@1.0.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=McpNet.Transport.Http&version=1.0.6
                    
Install as a Cake Addin
#tool nuget:?package=McpNet.Transport.Http&version=1.0.6
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.

Version Downloads Last Updated
1.0.6 160 7/6/2026
1.0.5 129 6/26/2026
1.0.4 139 6/26/2026
1.0.3 131 6/22/2026
1.0.2 146 6/22/2026
1.0.1 137 6/22/2026
1.0.0 138 6/18/2026