Skip to main content
Needs Node 20 or newer. For MCP servers, use Gateway for MCP servers.
1

Create an agent

Create it in the gateway’s SQLite file. Keep agent.token.
2

Write gateway.json

3

Start and call

Run the command at the top, then:
The default --database is :memory:, so protected requests get 401. The CLI is SQLite only.

Request order

The first matching policy wins. Error codes: UNAUTHORIZED, FORBIDDEN, RATE_LIMITED, PAYLOAD_TOO_LARGE, BAD_GATEWAY, GATEWAY_TIMEOUT.

Always on

CLI flags

--strip-auth is still accepted and does nothing.

gateway.json

Policy fields: path, method, public, requireAuth, requiredPermissions, requiredScopes (MCP only), rateLimit. Validated on start.

Embedded mode

Pass a createTheAuth() instance as theauth. For Postgres or MySQL, use this mode.

Docker and Kubernetes

Run the gateway as a sidecar. Expose only its port.

Limits

  • Direct upstream access bypasses it. Bind the upstream to a private network.
  • No body inspection. Policies match method and path only.
  • Paths match as the gateway sees them. Test encoded paths such as %2F.
  • HTTP only. No TLS or WebSocket. Put a TLS proxy in front.
  • Rate limits are in memory, per process.
  • Audit is not an access log. It records a permission check, not the decision.
  • Agent revocation is immediate. MCP OAuth limits: MCP page.
Last modified on October 18, 2026