# MCP Hangar

> MCP Hangar is an open-source MCP server for security. Open-source MCP gateway that pins tools, holds risky calls and limits egress. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** self-hosted, CLI, Linux, macOS
- **Website:** https://mcp-hangar.io
- **Repository:** https://github.com/mcp-hangar/mcp-hangar
- **MCP Registry name:** io.mcp-hangar/hangar
- **Categories:** security, developer tools
- **Listing updated:** 2026-11-14

## About

Hangar sits between an MCP client and its servers and decides every tool call by passing it through 13 gates in a fixed order. The first gate that says no is the verdict. The checks include tool access, withdrawal per tenant, a digest pin, health circuit breaking, tenant budgets and rate, human approval, an egress check just before outbound I/O, and a cap on response size. The site says nothing on the verdict path is scored or learned.

The pin is the notable one: if a tool's description or schema changes after you approved it, the call is refused. A short config lists which tools are allowed by pattern and which wait for a person, for example reads allowed and create_issue held. Egress policy is described for Kubernetes.

Every decision is recorded with caller, tenant, gate and a bounded reason code, and SIEM export is offered. It is MIT licensed, self-hosted with no SaaS, installs from PyPI, and runs on a laptop, a VM or Kubernetes. Its stdio entry needs a config.yaml listing upstream servers.

## Features

- **Tool pinning:** Refuses a call if a tool's description or schema changed after approval.
- **Human approval:** Holds selected calls until a person approves or denies.
- **Egress policy:** Controls where a server can connect on Kubernetes.
- **13 ordered gates:** A fixed sequence of checks with named deny reasons.
- **Audit trail:** Records each allow, deny and hold with caller and tenant.
- **Tenant budgets:** Rate and concurrency limits per tenant.

## Good for

- Block a tool whose description was silently rewritten
- Require sign-off on write calls like create_issue
- Give each tenant a rate budget
- Keep an attributable record of MCP calls

## Install

### Claude Code (Terminal)

```sh
claude mcp add hangar -- uvx mcp-hangar
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "hangar": {
      "command": "uvx",
      "args": [
        "mcp-hangar"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "hangar": {
      "command": "uvx",
      "args": [
        "mcp-hangar"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "hangar": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-hangar"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "hangar": {
      "command": "uvx",
      "args": [
        "mcp-hangar"
      ]
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "hangar": {
      "command": "uvx",
      "args": [
        "mcp-hangar"
      ]
    }
  }
}
```

## FAQ

### Is it a hosted service?

No. It is self-hosted and MIT licensed, with no SaaS.

### Does it use machine learning?

No. The site describes the verdict path as deterministic.

### Where can it run?

On a laptop, a VM or Kubernetes.

### What does it need to start?

A config.yaml declaring upstream servers and policy, which `mcp-hangar init` can create.

### Is MCP Hangar free?

Yes. MCP Hangar is open source, so you can use and self-host it for free.

### How do I add MCP Hangar to Claude Code?

Run this command in your terminal: claude mcp add hangar -- uvx mcp-hangar

### What are the best alternatives to MCP Hangar?

The closest alternatives to MCP Hangar are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [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.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/mcp-hangar
