MCPServer is a .NET 10 workspace for an MCP host, SSH tooling, AgentRouter, and a NativeAOT Python bridge.
The host runs stdio by default. Streamable HTTP is loopback-only and opt-in.
Protocol baseline: MCP 2025-11-25. The current implementation matrix lives in docs/SPEC_COMPLIANCE.md.
MCPServer.Hostis the primary MCP server host.MCPServer.Host.Sidecaris the sidecar entry point for host composition.MCPServer.Client.Consoleis the local client for stdio and HTTP checks.MCPServer.AgentRouter.*contains the AgentRouter contracts, application layer, infrastructure, and hosting composition.MCPServer.SshandMCPServer.Tools.Sshown SSH policy, runtime, and MCP tool exposure.python/contains thectypeswrapper for the NativeAOT bridge.scripts/Sync-PythonBridge.ps1publishes the native bridge, syncs the Python package payload, and can build the wheel.
Solid arrows point from the owning project or boundary to the dependency it uses.
flowchart LR
subgraph ClientSide["Client side"]
Console["MCPServer.Client.Console"]
ClientLib["MCPServer.Client"]
ClientInfra["MCPServer.Client.Infrastructure"]
Python["python/"]
Native["MCPServer.AgentRouter.PythonBridge.Native"]
end
subgraph HostSide["Host side"]
MainHost["MCPServer.Host"]
Sidecar["MCPServer.Host.Sidecar"]
Infra["MCPServer.Infrastructure"]
App["MCPServer.Application"]
Ssh["MCPServer.Ssh"]
SshTools["MCPServer.Tools.Ssh"]
end
subgraph RouterCore["AgentRouter core"]
ARAbs["Abstractions"]
ARDom["Domain"]
ARApp["Application"]
ARInfra["Infrastructure"]
ARHost["Hosting"]
end
Console --> ClientLib
Console --> ClientInfra
ClientInfra --> ClientLib
Python --> Native
Native --> ARApp
MainHost --> Infra
MainHost --> App
Sidecar --> Ssh
Infra --> App
SshTools --> Ssh
ARHost --> ARInfra --> ARApp --> ARDom --> ARAbs
dotnet restore .\MCPServer.slnx
dotnet build .\MCPServer.slnx -c Debug
dotnet test .\MCPServer.slnx -c DebugStdio host:
dotnet run --project .\MCPServer.Host\MCPServer.Host.csprojConsole against stdio:
dotnet run --project .\MCPServer.Client.Console\MCPServer.Client.Console.csproj -- --server-path dotnet --server-arg MCPServer.Host.dll --working-directory .\MCPServer.Host\bin\Debug\net10.0 --tool server.infoHTTP host on loopback:
$env:McpTransport__Http__Enabled = 'true'
$env:McpTransport__Http__Port = '3011'
dotnet run --project .\MCPServer.Host\MCPServer.Host.csprojConsole against HTTP:
dotnet run --project .\MCPServer.Client.Console\MCPServer.Client.Console.csproj -- --endpoint http://127.0.0.1:3011/mcp/ --tool ssh.profiles.listThe NativeAOT bridge ships separately.
The release and install path starts from .NET, then syncs the native payload into the Python package and builds the wheel. See docs/INSTALL.md.
If you only need the wrapper package layout, see python/README.md.
- docs/REPO_ARCHITECTURE.md
- docs/BUILD_AND_TEST.md
- docs/INSTALL.md
- docs/SSH_BOUNDARY.md
- docs/AGENT_ROUTER_BOUNDARY.md
- docs/SPEC_COMPLIANCE.md
- docs/KNOWN_DRIFT.md
System.Text.Jsononly.- Autofac for composition.
- No MediatR.
- Keep boundaries explicit.
- Fix the first real failure before chasing downstream metadata errors.