MCP

MCP clients

Add the zn MCP server to Cursor, Claude Code, Codex, OpenCode, Antigravity and other MCP clients.

Ver .md

Esta página ainda não foi traduzida. Você está lendo a versão em inglês.

npx -y zn-gate mcp starts a local MCP server (stdio). It needs no install and runs offline with local rules; add ZN_API_KEY to its environment to enable cloud neural checks.

It exposes four tools:

Tool Use it to
analyze_prompt Scan an incoming message for prompt injection
check_tool_call Inspect outgoing tool arguments before execution
check_tool_result Detect indirect injection in tool output (web pages, database rows)
zn_status Report rule engine health and latency

To protect MCP servers you already use, rather than adding a tool, see Protect MCP servers. For a hosted endpoint, see Hosted MCP endpoint.

Claude Code

claude mcp add zn-gate -- npx -y zn-gate mcp

Or in ~/.claude.json:

{
  "mcpServers": {
    "zn-gate": { "command": "npx", "args": ["-y", "zn-gate", "mcp"] }
  }
}

Cursor

~/.cursor/mcp.json:

{
  "mcpServers": {
    "zn-gate": {
      "command": "npx",
      "args": ["-y", "zn-gate", "mcp"],
      "env": { "ZN_API_KEY": "zn_live_your_key" }
    }
  }
}

Codex

~/.codex/config.toml:

[mcp_servers.zn-gate]
command = "npx"
args = ["-y", "zn-gate", "mcp"]

OpenCode

opencode.json:

{
  "mcp": {
    "zn-gate": {
      "type": "local",
      "command": ["npx", "-y", "zn-gate", "mcp"],
      "environment": { "ZN_API_KEY": "zn_live_your_key" },
      "enabled": true
    }
  }
}

Antigravity

In the MCP settings (mcpServers):

{
  "mcpServers": {
    "zn-gate": {
      "command": "npx",
      "args": ["-y", "zn-gate", "mcp"],
      "env": { "ZN_API_KEY": "zn_live_your_key" }
    }
  }
}

Hermes Agent

~/.hermes/config.yaml:

mcp_servers:
  zn-gate:
    command: npx
    args: ["-y", "zn-gate", "mcp"]

Other clients

Any client that supports stdio MCP servers works the same way: command npx, arguments -y zn-gate mcp. This includes ZCODE, OpenClaw and Pi Agent.