Skip to content
MCP server

MCP Zero-Trust Gateway

Gateway that verifies what an MCP server really does, then confines every call

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted, Linux
Runs
Locally
Version
0.5.5
Listing updated
2 days ago

About MCP Zero-Trust Gateway

MCP Zero-Trust Gateway is an open-source MCP server for security. It runs locally on your machine and is started by your AI client.

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.

Install

Run in a terminal

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

Add to claude_desktop_config.json

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

Add to ~/.cursor/mcp.json

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

Add to .vscode/mcp.json

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

Add to ~/.codeium/windsurf/mcp_config.json

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

Add to your client's MCP settings (most use this shape)

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

Configuration

  • GATEWAY_API_KEYThe running gateway's API key, if it was started with one.

What it does

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

Pricing

Open source

MIT licence; free via pip

Prices change. Check pypi.org before you buy.

MCP Zero-Trust Gateway 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 to MCP Zero-Trust Gateway

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Agent Roast

    MCP server

    Offline review that flags agent changes which weaken tests, assertions or CI

    Runs locally
    • Open source
    • 4 Hacker News points
    • Developer tools
  3. Midplane

    MCP server

    Postgres gateway for AI agents with table grants, column masking and approval for writes

    Runs locally
    • Open source
    • 5 GitHub stars
    • Databases
  4. Leash

    MCP server

    Review what your AI touched, approve risky actions and undo supported changes

    • 1 tool
    • Remote
    • Free
    • 1 GitHub star
    • Security
  5. SecureCloud

    MCP server

    SentinelOne and IT security catalog, prices, quotes and checkout links for Israel

    • 7 tools
    • Remote
    • Free
    • Security