Repository avatar
Other Tools
v0.1.1
active

h0-mcp

io.github.h0lang/h0-mcp

Native local SHA-256, Base64, H0 Merkle root and C ABI layout tools for Windows and Linux x64.

Documentation

h0-mcp

Native local MCP tools written in H0, with standalone Linux x64 and Windows x64 executables. No Node.js or Python runtime is required by the released executables.

h0-mcp CI Release Built with H0 License

The server implements JSON-RPC 2.0 over stdio and exposes four tools: SHA-256, Base64, Merkle roots for H0 source and C ABI layout calculation.

Download and discovery

The bundle manifest passed the official schema. Nine Windows protocol responses, oversized-frame and invalid-ID handling, and the extracted Windows manifest command were tested. Desktop extension installation has not yet been verified. The bundle is unsigned; macOS and ARM binaries are not included.

The performance table below records its stated Debian benchmark workload. These measurements and executable file sizes do not establish lower total agent token cost or improved small-model accuracy.


Measured Benchmarks (Identical 4-Tool MCP Server ; Debian Linux x86-64)

Even compared against zero-SDK Node.js and Python servers (no @modelcontextprotocol/sdk, no fastmcp, no node_modules or pip overhead). Wall time (median of 15 runs for cold session, 9 for burst) and true peak memory (ru_maxrss) are measured directly via a tiny C vfork+wait4 harness so no parent runtime memory inflates child RSS.

Metrich0-mcp (Pure H0)Python 3.9 (stdlib only)Node.js v22 (stdlib only)
Cold start + 9-req MCP session0.51 ms (1.0×)90.61 ms (178× slower)225.84 ms (443× slower)
500-req SHA-256 burst (incl. spawn)69.56 ms (7,188 req/s)150.40 ms (3,324 req/s ; 2.16×)236.62 ms (2,113 req/s ; 3.40×)
Peak memory (true vfork RSS)564 KB (0.55 MB)10,924 KB (10.7 MB ; 19.4×)46,768 KB (45.7 MB ; 82.9×)
Standalone binary / runtime45.7 KB static ELF~50+ MB Python + venv~100+ MB Node runtime
External dependencies0Python interpreterNode.js runtime

Reproduce with one command: bash bench/run.sh ./h0-mcp


Built-in Native Tools

  • h0_sha256 — native SHA-256 hex digest of UTF-8 text
  • h0_base64 — native Base64 encoding
  • h0_merkle_root — content-addressed SHA-256 Merkle root & section count of any H0 Tape source
  • h0_cabi_layout — cross-platform C ABI struct size & field offsets (e.g. "1,4,8,8" → size=24 offsets=[0,4,8,16])

Install a released executable

Choose the commands for your operating system and run them in a directory where you want to keep the server. The released executables require x64 Windows or Linux; macOS and ARM are not supported by these downloads.

Linux x64:

curl -fLO https://github.com/h0lang/h0-mcp/releases/download/v0.1.1/h0-mcp-linux-x64 &&
curl -fLO https://github.com/h0lang/h0-mcp/releases/download/v0.1.1/SHA256SUMS.txt &&
sha256sum --ignore-missing -c SHA256SUMS.txt &&
chmod +x h0-mcp-linux-x64

Continue only if the checksum command reports h0-mcp-linux-x64: OK and exits successfully.

Windows x64, using PowerShell:

Invoke-WebRequest https://github.com/h0lang/h0-mcp/releases/download/v0.1.1/h0-mcp-windows-x64.exe -OutFile h0-mcp-windows-x64.exe
$expectedSha256 = '444a2aaec0d013dc9a0292710c1d04762b06ca7e2ba5aff5b9414874170a2fe1'
if ((Get-FileHash .\h0-mcp-windows-x64.exe -Algorithm SHA256).Hash -ne $expectedSha256) { throw 'H0 MCP checksum mismatch' }

The Windows checksum is pinned to this release. The release also publishes SHA256SUMS.txt for both executables.

Connect an MCP client

The server communicates through stdin and stdout. An interactive launch waits for MCP messages; it does not open a browser or listen on a network port.

For clients using the mcpServers JSON format, set an absolute path to the executable. This is a configuration fragment to merge with the client's existing server settings, rather than a replacement for the entire settings file:

{
  "mcpServers": {
    "h0-native": {
      "command": "/absolute/path/to/h0-mcp-linux-x64"
    }
  }
}

On Windows, use a JSON-escaped path such as "D:\\Tools\\h0-mcp\\h0-mcp-windows-x64.exe". Clients with another configuration format need the same executable path as their stdio server command. After connecting, check that the client lists the four tools documented above. Desktop-client installation has not yet been verified.

Build from source

Building from source requires the H0 toolchain and its build prerequisites. The released executables above do not require a local compiler installation.

git clone https://github.com/h0lang/h0.git
git clone https://github.com/h0lang/h0-mcp.git
cd h0-mcp
../h0/h0 build src/h0-mcp.h0 -o h0-mcp
# Windows: ..\h0\h0.cmd build src\h0-mcp.h0 -o h0-mcp.exe

Use the resulting executable path in your client's stdio configuration. A JSON example is also available in examples/claude_desktop_config.json.

Optional Linux x64 container

The prebuilt image archive is 19,185 bytes compressed. Docker itself is not included. This option requires Docker with Linux amd64 support.

curl -fLO https://github.com/h0lang/h0-mcp/releases/download/v0.1.1/h0-mcp-linux-amd64-image.tar.gz &&
curl -fLO https://github.com/h0lang/h0-mcp/releases/download/v0.1.1/h0-mcp-image-SHA256SUMS.txt &&
sha256sum -c h0-mcp-image-SHA256SUMS.txt &&
docker load --input h0-mcp-linux-amd64-image.tar.gz &&
docker run --rm -i --network none --read-only --cap-drop ALL --security-opt no-new-privileges h0-mcp:0.1.1

Alternatively, build the Dockerfile from this repository. It wraps the released v0.1.1 Linux x64 executable, pinned by SHA256, in a scratch image running as UID 65532:

docker build --platform linux/amd64 -t h0-mcp:0.1.1 .
docker run --rm -i --network none --read-only --cap-drop ALL --security-opt no-new-privileges h0-mcp:0.1.1

The process reads MCP JSON-RPC messages on stdin and writes responses to stdout. No port or host-directory mount is needed for these four local tools. The container CI runs the existing protocol and malformed-frame tests against this launch command. Container setup through a desktop MCP client has not yet been verified.

License

Apache 2.0 — part of the Project H0 native ecosystem.

MCPB
https://github.com/h0lang/h0-mcp/releases/download/v0.1.1/h0-mcp-x64.mcpb
Install Command
# mcpb: https://github.com/h0lang/h0-mcp/releases/download/v0.1.1/h0-mcp-x64.mcpb