Snail.Sdk.Mcp.Hosting
0.4.1
dotnet add package Snail.Sdk.Mcp.Hosting --version 0.4.1
NuGet\Install-Package Snail.Sdk.Mcp.Hosting -Version 0.4.1
<PackageReference Include="Snail.Sdk.Mcp.Hosting" Version="0.4.1" />
<PackageVersion Include="Snail.Sdk.Mcp.Hosting" Version="0.4.1" />
<PackageReference Include="Snail.Sdk.Mcp.Hosting" />
paket add Snail.Sdk.Mcp.Hosting --version 0.4.1
#r "nuget: Snail.Sdk.Mcp.Hosting, 0.4.1"
#:package Snail.Sdk.Mcp.Hosting@0.4.1
#addin nuget:?package=Snail.Sdk.Mcp.Hosting&version=0.4.1
#tool nuget:?package=Snail.Sdk.Mcp.Hosting&version=0.4.1
Snail.Sdk.Mcp.Hosting
What every Snail MCP server starts from:
McpHost.CreateBuilder(args): the empty host, with log lines on stderr (UseStderr) since stdout carries JSON-RPC, and the heap compacted once the server has heard no MCP message for five minutes (AddIdleTrim;SNAIL_MCP_IDLE_TRIMsets the seconds,0turns it off).ToolJson.Options(MyJson.Default): the MCP SDK's JSON options with the server's source-generated types put first, so the tools work in a native build.ServerSettings.Read(name)andconfiguration.AddServerSettings(name): the server's settings file — the oneSNAIL_MCP_<NAME>_CONFIGnames, and only that one, or else the first of./.s3l-mcp-<name>.json,./s3l-mcp-<name>.json,~/.config/s3l-mcp-<name>/config.jsonand~/.s3l-mcp-<name>.jsonthat exists — then itsSNAIL_MCP_<NAME>_variables, which win. Both host builders add them by themselves for a program Snail.Sdk.Mcp named.EnvironmentSettings.Read(prefix, variables): settings fromPREFIX_SECTION__FIELDenvironment variables.ServerFolders.DataDirectory(name)andServerFolders.ConfigDirectory(name):~/.s3l-mcp-<name>and~/.config/s3l-mcp-<name>.ServerIdentity.Of(assembly): the name and version the server announces ininitialize.Invocation.Stable(path): the path of the running program that outlives an update of it.
A server built on Snail.Sdk.Mcp references it implicitly.
- Source and issues: https://github.com/orldev/Snail.Sdk
- The standard: orldev.github.io/Snail.Sdk
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Microsoft.Extensions.Hosting (>= 10.0.14)
- ModelContextProtocol (>= 2.3.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Snail.Sdk.Mcp.Hosting:
| Package | Downloads |
|---|---|
|
Snail.Sdk.Mcp.Http
One Snail MCP server for every session of the machine: the empty web host on a loopback address, the MCP SDK's Streamable HTTP transport with a session per client, and no browser let through. |
|
|
Snail.Sdk.Mcp.JobClient
The client side of a Snail MCP server's jobs: a long operation started by a tool and read as a resource, awaited here by being told — a subscription to the job's resource, over resources/subscribe or subscriptions/listen as the protocol revision allows — rather than by asking the server again and again. |
GitHub repositories
This package is not used by any popular GitHub repositories.