# Zn Gate

> Zn Gate is a freemium MCP server for security. Local security layer for coding agents: secret redaction, injection checks and MCP proxy. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Starting price:** $19 a month
- **Platforms:** CLI, macOS, Linux, Windows
- **Website:** https://usezn.com
- **Repository:** https://github.com/usezn/zn/tree/HEAD/packages/zn-gate
- **MCP Registry name:** io.github.usezn/zn-gate
- **Categories:** security, developer tools
- **Listing updated:** 2026-11-14

## About

zn-gate sits between a coding agent and what it reads or runs. Its scrubber swaps real secrets for typed placeholders such as `__ZN_AWS_KEY_1__`, so the model never sees the value, and injects the real one only where you allow it when a command executes.

Everything runs locally with no account and no network by default; an optional cloud check can be enabled, with detected secrets removed on your machine first but personal data not removed. Hooks cover Claude Code, Codex CLI, Cursor, OpenCode, Antigravity and the ZCode desktop app. The README suggests starting with `npx -y zn-gate reach`, then `init` and `check`.

The local code is MIT. The cloud check has a free tier of 10,000 calls a month, a Pro plan at $19, a Scale plan at $99 and a per-seat Team plan.

## Features

- **Secret scrubbing:** Replaces secrets with placeholders the model sees instead.
- **Injection checks:** Checks tool output, files and pages before the agent acts.
- **Config scan:** Audits prompts, AGENTS.md and SKILL.md for traps and leaked secrets.
- **Six agent hooks:** Supports Claude Code, Codex CLI, Cursor, OpenCode, Antigravity and ZCode.
- **Local vault:** Moves .env values into an encrypted local vault.
- **Optional cloud:** Adds a classifier and team audit trail if enabled.

## Good for

- Keep API keys out of a coding agent's context
- Run a CI scan of agent config files for injection traps
- See which secrets an agent can reach on a machine
- Give a team a shared audit trail of agent actions

## Install

### Claude Code (Terminal)

```sh
claude mcp add zn-gate --env ZN_API_KEY='<ZN_API_KEY>' -- npx -y zn-gate
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "zn-gate": {
      "command": "npx",
      "args": [
        "-y",
        "zn-gate"
      ],
      "env": {
        "ZN_API_KEY": "<ZN_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "zn-gate": {
      "command": "npx",
      "args": [
        "-y",
        "zn-gate"
      ],
      "env": {
        "ZN_API_KEY": "<ZN_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "zn-gate": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "zn-gate"
      ],
      "env": {
        "ZN_API_KEY": "<ZN_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "zn-gate": {
      "command": "npx",
      "args": [
        "-y",
        "zn-gate"
      ],
      "env": {
        "ZN_API_KEY": "<ZN_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "zn-gate": {
      "command": "npx",
      "args": [
        "-y",
        "zn-gate"
      ],
      "env": {
        "ZN_API_KEY": "<ZN_API_KEY>"
      }
    }
  }
}
```

## FAQ

### Does it need an account?

No. Everything that runs locally needs no account or API key.

### Does anything leave my machine?

Not by default. Only if you turn on the cloud check, and detected secrets are removed first.

### What does the cloud cost?

Free for 10,000 calls a month, Pro is $19 a month and Scale $99; Team is $19 per seat.

### How do I install it?

Run `npx -y zn-gate init` in your own terminal.

### Is Zn Gate free?

Zn Gate has a free plan, with paid plans for more usage or features. Paid plans start at $19 a month.

### How do I add Zn Gate to Claude Code?

Run this command in your terminal: claude mcp add zn-gate --env ZN_API_KEY='<ZN_API_KEY>' -- npx -y zn-gate

### What are the best alternatives to Zn Gate?

The closest alternatives to Zn Gate 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/zn-gate
