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

Custom MCP server

Define and configure a custom MCP server behind the P0 AI Gateway when P0 does not ship a predefined server for it.

A custom MCP server is one you define yourself, for any MCP server P0 does not ship a predefined definition for. The gateway either proxies to a server hosted outside it or runs a Docker container to host the server's tools. Once configured, it behaves like any other server behind the P0 AI Gateway: agents reach it through the gateway URL, and every tool call is authenticated and checked against policy.

Prerequisites

  • A registered Gateway component, with the gateway deployed in your environment.

Configure the custom MCP server

Follow the shared steps in Add an MCP server to name the server, choose its gateway, and set its path. On the configuration screen, set Definition to Custom, then choose a Server type.

Custom server definition form with Server type set to External, showing Server URL, Label, Logo URL, and Agent prompt fields

Server type

The Server type determines how the gateway reaches the server.

External proxies requests to an MCP server hosted outside the gateway, reachable at a fixed URL:

Field
Description
Required

Server URL

URL of the externally hosted MCP server.

Yes

Label

Human-friendly label for this server.

Yes

Container runs a Docker container behind the gateway to host the server's tools:

Field
Description
Required

Docker image

Image that hosts the MCP server.

Yes

Docker entrypoint

Container run entrypoint. Supports Jinja2 templating to inject request parameters and credentials.

Yes

Server details

These fields apply to both server types:

Field
Description
Required

Logo URL

Address of a logo image for the server.

No

Agent prompt

Text that describes this server to agents.

Yes

Next steps

  • Define the MCP roles and policies that determine which agents and users may call the custom MCP server, and what they may do.

Last updated