# MCP Zero-Trust Gateway

> MCP Zero-Trust Gateway is an open-source MCP server for security. Gateway that verifies what an MCP server really does, then confines every call. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted, Linux, macOS
- **Website:** https://pypi.org/project/mcp-ztgateway/
- **MCP Registry name:** io.github.nabrahma/mcp-ztgateway
- **Categories:** security
- **Listing updated:** 2026-11-15

## About

MCP servers describe themselves and agents tend to believe the description. mcp-ztgateway does not. On onboarding it scans each tool's name, description and schema with 44 static rules, runs the server under strace in a hardened Docker container, and compares the observed files, network and processes with what the server declared. A server that exceeds its own declaration is denied, and the finding names the exact resource, such as a file read.

After verification, each call runs in a fresh container with only the granted paths mounted, no network unless hosts were declared, only the declared environment variables and a seccomp filter built from the verdict. Arguments are checked against policy and optionally against the task the user stated, and tool output is screened for injected instructions, though that last check is advisory only.

It runs on one machine as a local HTTP service plus Docker, with a local SQLite trust store and nothing sent elsewhere. The PyPI page calls it a research prototype in beta and says the repository is not public yet. It needs Python 3.11 or newer.

## Features

- **Static scan:** 44 rules over tool names, descriptions and schemas, aimed at attacks on the agent.
- **Kernel-level profiling:** Runs the server under strace three times and takes the union of what it does.
- **Declaration check:** Denies servers that exceed what they declared.
- **Per-call confinement:** Each call runs in a fresh container with mounts, seccomp and network limits.
- **Policy and task scope:** Checks arguments and whether the call fits the stated task.
- **Response check:** Flags tool output that looks like injected instructions before the agent sees it.
- **Review tokens:** Lets an operator re-register a tool after judging a static finding harmless.

## Good for

- Vet an unfamiliar MCP server before giving it to an agent
- Catch tools whose read-only hint is false
- Limit a tool server to the files and hosts it needs
- Hold risky calls for human approval
- Audit servers from public registries

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcp-ztgateway --env GATEWAY_API_KEY='<GATEWAY_API_KEY>' -- uvx mcp-ztgateway
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcp-ztgateway": {
      "command": "uvx",
      "args": [
        "mcp-ztgateway"
      ],
      "env": {
        "GATEWAY_API_KEY": "<GATEWAY_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcp-ztgateway": {
      "command": "uvx",
      "args": [
        "mcp-ztgateway"
      ],
      "env": {
        "GATEWAY_API_KEY": "<GATEWAY_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "mcp-ztgateway": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcp-ztgateway"
      ],
      "env": {
        "GATEWAY_API_KEY": "<GATEWAY_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcp-ztgateway": {
      "command": "uvx",
      "args": [
        "mcp-ztgateway"
      ],
      "env": {
        "GATEWAY_API_KEY": "<GATEWAY_API_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "mcp-ztgateway": {
      "command": "uvx",
      "args": [
        "mcp-ztgateway"
      ],
      "env": {
        "GATEWAY_API_KEY": "<GATEWAY_API_KEY>"
      }
    }
  }
}
```

## FAQ

### What does it need?

Python 3.11 or newer and Docker, with pip install mcp-ztgateway.

### Where does data go?

The trust store is a local SQLite file and the page says nothing is sent anywhere.

### What licence is it?

MIT.

### Is it production ready?

The page calls it a research prototype in beta, usable on a single machine.

### Is MCP Zero-Trust Gateway free?

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

### How do I add MCP Zero-Trust Gateway to Claude Code?

Run this command in your terminal: claude mcp add mcp-ztgateway --env GATEWAY_API_KEY='<GATEWAY_API_KEY>' -- uvx mcp-ztgateway

### What are the best alternatives to MCP Zero-Trust Gateway?

The closest alternatives to MCP Zero-Trust Gateway are REA, Agent Roast, Midplane, Leash and Tinplate Edge AI Safety, Security & EU Compliance.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Agent Roast](https://ai-powered.com/mcp/agent-roast): Agent Roast is an open-source MCP server for developer tools.
- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [Leash](https://ai-powered.com/mcp/leash): Leash is a free MCP server for security.
- [Tinplate Edge AI Safety, Security & EU Compliance](https://ai-powered.com/mcp/tinplate-edge-ai-safety-security-and-eu-compliance): Tinplate Edge AI Safety, Security & EU Compliance is a freemium MCP server for security.
- [SecureCloud](https://ai-powered.com/mcp/securecloud): SecureCloud is a free MCP server for security.
- [Eikino](https://ai-powered.com/mcp/eikino): Eikino is a freemium MCP server for security.
- [SynomosAI Governance MCP](https://ai-powered.com/mcp/synomosai-governance-mcp-2): SynomosAI Governance MCP is an open-source MCP server for security.

---
Source: https://ai-powered.com/mcp/mcp-zero-trust-gateway
