Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

MCP Hangar

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.

PyPI CI License: MIT

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

pip install mcp-hangar
# or: uv pip install mcp-hangar

Quickstart

Point Hangar at an MCP server in config.yaml:

mcp_servers:
  github:
    mode: subprocess
    command: [uvx, mcp-server-github]
    env:
      GITHUB_TOKEN: ${GITHUB_TOKEN}

Then serve it:

mcp-hangar serve --config config.yaml                     # stdio (Claude Desktop)
mcp-hangar serve --config config.yaml --http --port 8000  # HTTP + REST API at /api/

The 1.5 server refuses to bind a non-loopback interface without auth. For a quick/insecure demo, pass --unsafe-no-auth; for anything real, configure the auth block.

Or skip the config entirely -- get filesystem, fetch, and memory servers wired into Claude Desktop in one line:

curl -sSL https://mcp-hangar.io/install.sh | bash && mcp-hangar init -y && mcp-hangar serve

What you get

  • Parallel tool calls -- one hangar_call fans out to many MCP servers concurrently; all results returned together.
  • Lifecycle management -- lazy start, health checks, single-flight cold starts, idle shutdown, and per-server circuit breaking.
  • Hot config reload -- add or withdraw servers and tools via file watch, no restart.
  • Per-tenant tool projection -- front-door mode presents a different executable surface per caller, fail-closed on unknown identity.
  • OAuth ingress -- advertise as an RFC 9728 protected resource and challenge external agents for verified tokens.
  • Auth & RBAC -- API-key and OIDC/JWT identity with role-based access; bootstrap the first administrator with mcp-hangar auth bootstrap-admin, and every call carries a verified principal into the audit trail.
  • Observability built in -- OpenTelemetry traces, Prometheus metrics, structured logs, and an event-sourced audit trail.

Configuring tools:

The per-server tools: key is overloaded and accepts two distinct forms:

  • A list of tool schemas is a pre-start visibility projection. It lets a tool be listed before its provider has started, so callers can see it up front. It is not an access policy. On start, the provider's dynamic tools/list is authoritative and replaces this projection entirely — a statically-listed tool that the provider does not return becomes uncallable and fails with Tool not found: <name> at invocation (a warning naming the unconfirmed tool is logged at start).

  • A dict with allow: / deny: is an access policy (glob-pattern, three-level merge) that filters which discovered tools are exposed.

mcp_servers:
  math:
    mode: subprocess
    command: [python, -m, examples.provider_math.server]
    tools:                     # list form: pre-start schema projection
      - name: add
        description: "Add two numbers"
        inputSchema: { type: object, properties: { a: { type: number } } }
  github:
    mode: subprocess
    command: [uvx, mcp-server-github]
    tools:                     # dict form: allow/deny access policy
      allow: [create_issue, list_issues]
      deny: [delete_repository]

Documentation

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_hangar-2.0.0rc2.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_hangar-2.0.0rc2-py3-none-any.whl (881.9 kB view details)

Uploaded Python 3

File details

Details for the file mcp_hangar-2.0.0rc2.tar.gz.

File metadata

  • Download URL: mcp_hangar-2.0.0rc2.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mcp_hangar-2.0.0rc2.tar.gz
Algorithm Hash digest
SHA256 1fa314408ba5cc5d479756d68cc8a26049d09f49fe28cf232862f95c201fac18
MD5 9022da9d0f4ad945d9be1548a7b573ad
BLAKE2b-256 ee97109eaa4a11691f83c276195269637bf77175fcaad4d2a98c359f4babf742

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_hangar-2.0.0rc2.tar.gz:

Publisher: release.yml on mcp-hangar/mcp-hangar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_hangar-2.0.0rc2-py3-none-any.whl.

File metadata

  • Download URL: mcp_hangar-2.0.0rc2-py3-none-any.whl
  • Upload date:
  • Size: 881.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mcp_hangar-2.0.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 02ecf3958354eaeda60eebc8827fc38b7ab712d2b235192c3341c1f6766493af
MD5 701e72a0ca682cb99191328c2feae036
BLAKE2b-256 acd47a404fd274e2e65af804bcb168b6828d3120718f6b5a90bdb09459c32b0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_hangar-2.0.0rc2-py3-none-any.whl:

Publisher: release.yml on mcp-hangar/mcp-hangar

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

2.17.0

2 files

2.16.0

2 files

2.15.0

2 files

2.14.1

2 files

2.14.0

2 files

2.13.1

2 files

2.13.0

2 files

2.12.0

2 files

2.11.0

2 files

2.10.1

2 files

2.10.0

2 files

2.9.0

2 files

2.8.0

2 files

2.7.0

2 files

2.6.0

2 files

2.5.3

2 files

2.5.2

2 files

2.5.1

2 files

2.5.0

2 files

2.4.0

2 files

2.3.0

2 files

2.2.1

2 files

2.2.0

2 files

2.1.1

2 files

2.1.0

2 files

2.0.1

2 files

2.0.0

2 files

This release

2.0.0rc2 This release

2 files

1.6.3

2 files

1.6.2

2 files

1.6.1

2 files

1.6.0

2 files

1.5.1

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.2.3

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.12.0

2 files

0.11.0

2 files

0.9.0

2 files

0.8.0

2 files

0.6.7

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.1

2 files

0.2.3

2 files

0.2.1

2 files

0.2.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page