Skip to main content

Hosted MCP endpoint

Use the optional zn Cloud analyzer as a remote MCP tool over Streamable HTTP, with your API key.

View .md

This page is for developers who call the optional zn Cloud API from their own code. Just want to protect your coding agent? Open your own terminal (not the agent's chat), run npx -y zn-gate init, then npx -y zn-gate check. Step by step: Install.

The hosted endpoint exposes the same analyzer as the zn Cloud REST API as a native MCP tool. Use it when your agent runtime prefers remote MCP servers over local stdio ones.

Endpoint

POST https://api.usezn.com/mcp
Authorization: Bearer $ZN_API_KEY
Content-Type: application/json
Accept: application/json, text/event-stream

Transport: Streamable HTTP (JSON-RPC over POST). Authentication: the same Bearer key as REST. The manifest is published at /.well-known/mcp.json.

Discover and call the tool

{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}

The analyze tool takes one required string, input, and returns the same verdict as POST /analyze.

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": { "name": "analyze", "arguments": { "input": "text from an untrusted source" } }
}

Calls count against your plan like REST calls. For a free alternative that keeps everything on your machine, run the local MCP server.