Gateway: protect and meter an MCP server
gateway_createPut your MCP server behind Privi. You get an HTTP URL and a WebSocket URL that forward to it unchanged (x402 payments keep working) while Privi rate-limits callers, optionally requires a Privi Passport, meters every tool call and writes each call to your tamper-evident log. The kill switch stops the gateway instantly. Upstream must be public HTTPS. Requires the organization API key.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | A name for this gateway, e.g. 'acme-search-mcp' | |
| guard | No | Privi Guard on every tool result: off, tag (add the verdict in _meta) or block (withhold injected results). Each check uses your Guard allowance or credits | off |
| min_score | No | 0 = open to everyone. >0 = callers must prove a KYA wallet whose Passport scores at least this (0-1000) | |
| rate_per_min | No | Requests per minute per caller (1-1200) | |
| upstream_url | Yes | The MCP server's public https URL (streamable HTTP), e.g. https://api.acme.com/mcp |