For the complete documentation index, see llms.txt. This page is also available as Markdown.

Gateway

Register your self-hosted P0 AI Gateway with P0 so it can enforce policy on agent tool calls and receive its MCP server definitions.

The Gateway component registers a deployed P0 AI Gateway with P0. Once registered, P0 recognizes the gateway's identity, pushes it the definitions of the MCP servers it should host, and enforces policy at runtime. The gateway ships access logs directly to the system of your choice. You register one Gateway component per gateway deployment.

Prerequisites

  • An existing P0 account at p0.app.

  • A deployed P0 AI Gateway. See Deploying the P0 AI Gateway. You need the gateway's public URL and its OAuth server endpoint from that deployment.

Register the gateway

  1. Navigate to Integrations on p0.app and select Agentic gateway, then choose the Gateway component.

Agentic gateway integration page listing the Gateway and MCP server components, not installed
  1. Click Add gateway.

Gateway component page with an empty list of installed gateways and an Add gateway button
  1. Enter the gateway details, then click Next:

Form for installing a new gateway with fields for gateway identifier and agentic gateway URL
  • Gateway identifier: a name for this gateway within P0.

  • Agentic gateway URL: the public URL where your gateway runs. The gateway exposes your MCP servers under this URL. This is the gateway host you configured during deployment.

  1. Enter the OAuth server endpoint then click Finish:

Second step of gateway configuration showing the read-only gateway URL and the OAuth server endpoint field
  • OAuth server endpoint: the public URL of your gateway's OAuth server, typically the same as the Agentic gateway URL. It must be publicly accessible and serve .well-known/jwks.json. P0 uses this endpoint as the gateway's token issuer to verify the requests it receives, so it must exactly match the issuer your deployed OAuth server presents.

  1. The gateway now appears with the state Installed.

Installed gateways list showing the new gateway with state Installed

How it works

After registration, the gateway periodically calls P0 to sync its configuration. P0 returns the set of MCP servers configured for this gateway, and the gateway reconciles them, adding newly configured servers and removing ones that are no longer configured. No servers are exposed until you configure them.

Next steps

Last updated