# Hatun MCP - Governed Agent Gateway

> Hatun MCP - Governed Agent Gateway is an open-source MCP server for security. Governed MCP gateway that policy-checks every tool call and returns signed receipts. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** self-hosted, CLI, Linux
- **Website:** https://a-11-oy.com/wires
- **Repository:** https://github.com/szl-holdings/hatun-mcp
- **MCP Registry name:** io.github.szl-holdings/hatun-mcp
- **Categories:** [security](https://ai-powered.com/categories/security), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

Hatun sits in front of the SZL backend services, namely the a11oy command platform with its immune, companion and LLM-router organs, plus the killinchu drone and vessel service. It re-exposes their tools through one MCP endpoint, with each call passing a governance sequence called PURIQ: client authentication, an input gate aimed at injection, a reputation factor, a two-person gate for state-changing tools and a latency-bounded backend call.

Every result, success or failure, is recorded as a Khipu receipt in an append-only sha256 chain and returned with a DSSE-signed response carrying the receipt hash. Receipts are signed only when an operator supplies an ECDSA-P256 key through HATUN_MCP_SIGNING_KEY. Without one they are emitted unsigned and the readiness endpoint reports not_ready.

The server registers 37 static tools, including 31 szl_* tools such as szl_lean_verify and szl_github_estate_snapshot and six governance tools, then adds service tools discovered at startup. Setting HATUN_MCP_DISABLE_DYNAMIC to true gives a local mode with only the static set. It is built on the official Python MCP SDK, runs as an OCI image over stdio and is licensed Apache-2.0. The README warns that the public Hatun Gateway page does not prove this package's endpoint is deployed.

## Features

- **Policy gate per call:** Authenticates clients, screens inputs and requires two-person approval for state-changing tools.
- **Hash-chained receipts:** Each result gets a Khipu receipt in an append-only sha256 chain.
- **DSSE signing:** Responses are signed when an operator key is configured, otherwise clearly marked unsigned.
- **Aggregated backends:** One endpoint re-exposes the a11oy platform and killinchu tools.
- **Static and dynamic tools:** 37 static tools plus service tools discovered at startup, with a hermetic local mode.
- **Fixed-endpoint evidence tools:** Tools like szl_github_estate_snapshot read fixed public sources and accept no URLs or tokens.

## Good for

- Put an auditable policy layer in front of agent tool calls
- Keep signed evidence of what an agent invoked and received
- Expose several internal services to MCP clients through one endpoint
- Verify Lean proofs through the AXLE bridge tools

## Install

### Claude Code (Terminal)

```sh
claude mcp add hatun-mcp --env HATUN_MCP_SIGNING_KEY='<HATUN_MCP_SIGNING_KEY>' -- docker run -i --rm -e HATUN_MCP_SIGNING_KEY ghcr.io/szl-holdings/hatun-mcp:1.0.4
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "hatun-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "HATUN_MCP_SIGNING_KEY",
        "ghcr.io/szl-holdings/hatun-mcp:1.0.4"
      ],
      "env": {
        "HATUN_MCP_SIGNING_KEY": "<HATUN_MCP_SIGNING_KEY>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "hatun-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "HATUN_MCP_SIGNING_KEY",
        "ghcr.io/szl-holdings/hatun-mcp:1.0.4"
      ],
      "env": {
        "HATUN_MCP_SIGNING_KEY": "<HATUN_MCP_SIGNING_KEY>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "hatun-mcp": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "HATUN_MCP_SIGNING_KEY",
        "ghcr.io/szl-holdings/hatun-mcp:1.0.4"
      ],
      "env": {
        "HATUN_MCP_SIGNING_KEY": "<HATUN_MCP_SIGNING_KEY>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "hatun-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "HATUN_MCP_SIGNING_KEY",
        "ghcr.io/szl-holdings/hatun-mcp:1.0.4"
      ],
      "env": {
        "HATUN_MCP_SIGNING_KEY": "<HATUN_MCP_SIGNING_KEY>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "hatun-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "HATUN_MCP_SIGNING_KEY",
        "ghcr.io/szl-holdings/hatun-mcp:1.0.4"
      ],
      "env": {
        "HATUN_MCP_SIGNING_KEY": "<HATUN_MCP_SIGNING_KEY>"
      }
    }
  }
}
```

## Tools

- `szl_a11oy_code_chat`: Code chat through the a11oy platform.
- `szl_a11oy_operator_reason`: Operator reasoning through a11oy.
- `szl_a11oy_sentinel_scan`: Sentinel scan through a11oy.
- `szl_doctrine_lookup`: Doctrine lookup.
- `szl_drone_lookup`: Drone lookup.
- `szl_killinchu_cue`: State-changing killinchu cue, subject to the two-person gate.
- `szl_killinchu_detect`: Killinchu detection.
- `szl_lean_verify`: Lean verification.
- `szl_puriq_evaluate`: Evaluates the PURIQ governance formula.
- `szl_khipu_verify`: Verifies Khipu receipts.
- `szl_github_estate_snapshot`: Observes the fixed public szl-holdings GitHub organization.
- `szl_frontier_chain_read`: Bounded read of the fixed frontier-54-runs dataset.
- `szl_battery_score`: Reads one estate-battery receipt and returns its score.
- `szl_holo_cells`: Local deterministic cell math for the anatomy visualisation.
- `yuyay_gate_check`: Governance input gate check.
- `khipu_append_and_verify`: Appends and verifies a Khipu receipt.
- `dsse_sign`: DSSE signing.
- `mesh_quorum_status`: Mesh quorum status.
- `puriq_master_tool`: PURIQ master tool.
- `governance_pacbayes_bound`: Governance PAC-Bayes bound.

## FAQ

### Are receipts always signed?

No. They are signed only when HATUN_MCP_SIGNING_KEY holds a valid key. Otherwise they are marked unsigned and /readyz reports not_ready.

### How many tools does it expose?

37 static tools, plus a variable number of service tools discovered at startup unless HATUN_MCP_DISABLE_DYNAMIC is true.

### What licence is it under?

The README metadata lists Apache-2.0.

### Can anonymous clients call it?

No. The README says anonymous calls are declined and clients authenticate with an SZL API key or, if enabled, x402 payment context.

### Is Hatun MCP - Governed Agent Gateway free?

Yes. Hatun MCP - Governed Agent Gateway is open source, so you can use and self-host it for free.

### How do I add Hatun MCP - Governed Agent Gateway to Claude Code?

Run this command in your terminal: claude mcp add hatun-mcp --env HATUN_MCP_SIGNING_KEY='<HATUN_MCP_SIGNING_KEY>' -- docker run -i --rm -e HATUN_MCP_SIGNING_KEY ghcr.io/szl-holdings/hatun-mcp:1.0.4

### What are the best alternatives to Hatun MCP - Governed Agent Gateway?

The closest alternatives to Hatun MCP - Governed Agent Gateway are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README and the project's website.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/hatun-mcp-governed-agent-gateway
