**The policy enforcement plane for MCP -- deterministic admission and egress pol
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
Same tool, same arguments, same call — refused because the description changed underneath it.
Real output; regenerate it with vhs demo.tape .
Why
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
Install
Upgrading rather than installing fresh? The migration steps live in the
upgrade guide.
Quickstart
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 it
has a mcp-hangar server beside the ones you already had. Your existing entries
are left as they are; a server is behind Hangar once it is listed under
mcp_servers in the config init wrote.
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.
bash
curl -sSL https://mcp-hangar.io/install.sh | bash && export PATH="$HOME/.mcp-hangar/bin:$PATH" && mcp-hangar init -y
yaml
tools: # LIST -- pre-start visibility projection
- name: add
inputSchema: { type: object, properties: { a: { type: number } } }
tools: # DICT -- access policy
allow_list: [create_issue, list_issues]
deny_list: [delete_repository]
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: 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.
Documentation
- Getting Started · Configuration · Python API
- Governance & Front Door · Authentication & RBAC · Observability
- Kubernetes operator · Helm charts · All docs
- Release compatibility matrix · which core, operator, and chart versions are released and tested together
MCP Registry
Published in the Official MCP Registry
as io.mcp-hangar/hangar. Clients that consume the registry can install it from