The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the MCP Hangar listing page.
The policy enforcement plane for MCP -- deterministic admission and egress policy, attributable audit, and SIEM export for your MCP server fleet. MIT, self-hosted, no SaaS.
In MCP, the tool list is a hint the client caches; the call path is the only surface a provider mediates in real time. Every governance primitive worth having -- revocation, per-tenant scoping, audit -- attaches there, or attaches to nothing. Hangar puts a policy enforcement plane on that seam: one mediated path for lifecycle, policy, and telemetry across your whole MCP server fleet.
Background: The Advisory List -- Why MCP Governance Lives at the Call Path
Upgrading rather than installing fresh? The migration steps live in the upgrade guide.
init finds your MCP client (Claude Code, Cursor, Claude Desktop), writes a
config, starts each server once to check it works, and -- while they are up --
records a digest pin for every tool they serve. Restart your client and your
tools are where they were, with Hangar in the path of every call to them.
Now watch a call stop being allowed. An MCP server decides what it advertises every time it connects, and the dangerous change is not a new parameter, it is a new description: same inputs, same outputs, different instructions for the model.
The same call now comes back refused, from Hangar, before the server is asked:
mcp-hangar pin --check prints both digests and exits 1, so it belongs in CI or
a pre-commit hook; --write adopts the change if you meant it. The demo upstream
is examples/rugpull/; the full walkthrough is the
quickstart.
Writing the config by hand instead:
Over stdio, the process that spawned Hangar is the trust boundary -- there is no channel for a credential -- so
auth.stdio.principaldeclares the caller (ADR-026). Over HTTP nothing is declared: Hangar refuses to bind a non-loopback interface without auth. For a quick demo, pass--unsafe-no-auth; for anything real, configure theauthblock.
One line, from nothing to a client wired to a pinned fleet:
The enforcement plane — what the call path actually decides:
tool_projection.pins, or per tenant, which needs authentication so a caller arrives carrying one.mcp-hangar auth bootstrap-admin, and every call carries a verified principal into the audit trail.Everything else it takes to run a fleet:
hangar_call fans out to many MCP servers concurrently; all results returned together.tools: is overloadedThe per-server tools: key accepts two forms that look similar and mean
opposite things:
The list form only lets a tool be listed before its provider has started.
It is not an access policy, and it does not survive startup: the provider's
dynamic tools/list is authoritative and replaces it entirely, so a
statically-listed tool the provider does not return becomes uncallable and
fails with Tool not found: <name> at invocation.
The dict form is the access policy — glob patterns, three-level merge. Reach for it when you mean to restrict something. Full semantics in the configuration reference.
Published in the Official MCP Registry
as io.mcp-hangar/hangar. Clients that consume the registry can install it from
there; the entry describes the PyPI package started over stdio, not a hosted
instance — Hangar is self-hosted only.