PagerDuty
Install the PagerDuty integration and its MCP server so agents behind the P0 AI Gateway can request scoped access to your PagerDuty account.
The PagerDuty integration lets agents behind the AI gateway request OAuth scopes in your PagerDuty account, such as incidents.read. For each grant, P0's connector gets a PagerDuty token that holds only the approved scopes and stores it in your Google Secret Manager. The gateway calls PagerDuty's hosted MCP server with that token. The token acts as your PagerDuty app, not as a PagerDuty user.
Setup has four parts, in this order:
Install the PagerDuty account in P0, which deploys P0's connector in a Google Cloud project.
Create a Scoped OAuth app in PagerDuty and give P0 its credentials.
Add the PagerDuty MCP server to your gateway.
Write the policies that decide which agents get which scopes.
Prerequisites
A registered Gateway component, with the gateway deployed in your environment. The gateway must be able to reach
https://mcp.pagerduty.com(US accounts) orhttps://mcp.eu.pagerduty.com(EU accounts), and Google Secret Manager.The Google Cloud integration installed for your Google Cloud organization.
The Google Secret Manager integration installed on the Google Cloud project where the connector will run, and permission to apply Terraform in that project.
GCP Workload Identity Federation installed for that same project. The gateway uses it to read each grant's token.
A PagerDuty user who can register apps under Integrations > App Registration.
Install the account in P0
Navigate to Integrations on p0.app, select PagerDuty, and choose the Credential provisioning component.
Click Add Account, and enter an identifier for it, such as
acme-prod. Agents and policies use this name for the account. Use letters, digits, and hyphens.Fill in the account details, then click Next:
PagerDuty region: US or EU, the region that hosts the account.
Account subdomain: the subdomain in the account's URL, such as
acmeinacme.pagerduty.comoracme.eu.pagerduty.com. Use lowercase letters, digits, and hyphens.Secret manager provider: choose Google Secret Manager, then the Installation for the project where the connector will run.
P0 generates a Terraform configuration. Copy it into your Terraform project,
applyit, then click Next.The configuration creates:
A Cloud Run service,
p0-connector-pagerduty-ai, that runs P0's connector under its own service account,p0-pagerduty.A secret for the PagerDuty app's client secret,
p0_install_pagerduty_<identifier>_client-secret, which only the connector can read.Permission for the connector to create and manage the secrets that hold grant tokens. Their names start with
p0_access-token_pagerduty_<identifier>_, and the connector can touch no other secret.Bindings that let P0's Google Cloud service account call the connector and read its URL. The connector accepts calls from that service account only.
The Cloud Run, Secret Manager, IAM, and Resource Manager APIs, turned on in the project.
When you click Next, P0 checks that the connector is deployed. A new Cloud Run service can take a minute to start. If the check fails, wait a minute and click Next again.
Create the PagerDuty app
Register an app in PagerDuty under Integrations > App Registration. Give it OAuth 2.0 functionality of type Scoped OAuth.
Choose the app's scopes. Give it only the scopes that agents may request, plus
users.read, which the PagerDuty MCP server requires. A token can hold no scope that the app lacks.Store the client secret. Set
PD_CLIENT_SECRETto the app's client secret, and run the command P0 shows:P0 never sees the client secret: only your connector reads it.
Enter the Client ID of the app in P0.
Review the summary and click Finish. The account now appears with the state Installed.
Add the PagerDuty MCP server
You can add the PagerDuty MCP server once at least one account is installed. P0 offers one server per region, PagerDuty (US) and PagerDuty (EU), and lists each one only when an account in that region is installed.
Follow the shared steps in Add an MCP server to name the server and choose its gateway. On the configuration screen, set the following fields, then click Finish:
Credential source: choose Vaulted credential.
Definition: choose P0, then select PagerDuty (US) or PagerDuty (EU).
The server now appears with the state Installed.
One PagerDuty MCP server serves every account you install in its region. Each grant names the account it is for.
How agents request access
An agent requests access with the server's access tool. It names the account by its P0 identifier, and one or more PagerDuty scopes. P0 adds users.read to every token. The agent's list tool shows the installed accounts and every scope that PagerDuty's MCP server supports, including scopes your app may not hold.
Once a request is approved, access usually works within 5 seconds, and can take up to 30 seconds. Agents see every PagerDuty tool whether or not their scopes cover it. PagerDuty refuses a call that the token's scopes don't cover. Tools that need a current user, such as looking up the calling user, fail, because the token acts as the app.
A request fails if the PagerDuty app doesn't hold every requested scope. The error names the missing scopes.
See Requesting access for how agents submit and use requests.
Write policies for PagerDuty
Match PagerDuty requests in an Agentic access policies with service: pagerduty-ai and accessType: permission. Two filters narrow them:
account: the account, keyed onname, the identifier you gave the account in P0.policy: the scope, keyed onname. A rule covers a request only if it matches every scope in it.
Patterns are regular expressions, so a rule can match one scope (^incidents\.read$), every scope for one resource (^incidents\..*$), or every read scope (^.*\.read$).
For example, auto-approve read-only scopes for one agent, but only in the acme-prod account:
Next steps
Define the Agentic access policies that determine which agents and users may request PagerDuty access.
Last updated