Skip to main content
This guide gets you connected to the hosted PG:AI MCP server at https://mcp.getpg.ai. Most users connect Claude with OAuth; developers often use an API key in Cursor or scripts.

Before you start

  • A PG:AI account with access to at least one organisation
  • For Claude: a plan that supports Connectors (Pro, Team, or Enterprise)
  • For API key auth: permission to create keys in Settings → API Keys

Claude connects through a Custom connector and signs in with your PG:AI identity (OAuth). Your organisation is resolved automatically from your PG:AI user email - you do not paste an org ID into Claude.

Step 1: Open Connectors in Claude

  1. Open Claude.ai and sign in.
  2. Go to Settings (profile menu → Settings).
  3. Open Connectors (sometimes under Integrations depending on your plan).
Screenshot needed: Claude Settings → Connectors page with the Add connector button visible.

Step 2: Add the PG:AI connector

  1. Click Add connector (or Add custom connector).
  2. Enter a name, for example PG:AI.
  3. Enter the server URL:
If your Claude build only supports SSE connectors, use:
  1. Save the connector.
Screenshot needed: The “Add custom connector” form filled in with name PG:AI and URL https://mcp.getpg.ai/mcp.

Step 3: Sign in with PG:AI

  1. Claude will prompt you to authenticate.
  2. Complete the PG:AI / Auth0 login with the same email as your PG:AI workspace user.
  3. Approve access when asked.
Your PG:AI account email must match your login email. Org membership is resolved server-side - if login succeeds but tools return no data, check that your user exists in the correct organisation in PG:AI.
Screenshot needed: OAuth consent / PG:AI login screen during connector authorisation.

Step 4: Enable the connector in a chat

  1. Start a new chat in Claude.
  2. Open the + or tools menu near the message box.
  3. Enable the PG:AI connector for that conversation.
Screenshot needed: New chat with the PG:AI connector toggled on in the tools/connectors menu.

Step 5: Verify it works

Try these prompts in order: If Claude says it cannot reach PG:AI or authentication failed, see Troubleshooting below.

Claude Team / Enterprise

An admin can add the same connector once under Admin settings → Connectors. Each user still connects with their own PG:AI login so data stays scoped to their organisation membership.

Option B - API key (Cursor, scripts, other clients)

Use this when OAuth is not available (for example Cursor or local testing).

Step 1: Create an API key

1

Open Settings

In PG:AI go to Settings → API Keys
2

Create a key

Click Create API Key. Name it (e.g. “Cursor MCP”). Enable MCP scopes if prompted.
3

Copy the key

Copy the key immediately - it starts with pgai_live_ and is only shown once.
Screenshot needed: PG:AI Settings → API Keys with Create API Key and scope selection visible.
Treat API keys like passwords. Revoke compromised keys in Settings immediately.

Step 2: Configure Cursor

Create or edit .cursor/mcp.json in your project (or add via Cursor Settings → MCP):
You can also use Authorization: Bearer pgai_live_YOUR_KEY_HERE instead of x-api-key. Reload Cursor (Cmd/Ctrl + Shift + PDeveloper: Reload Window). You should see pgai as a connected MCP server.

Step 3: Verify with tools/list

Any MCP client can list tools with a JSON-RPC tools/list call. Example with curl:
You should see tools such as company, search, accounts, and templates.

Connection details (reference)


Troubleshooting

  • Confirm you completed OAuth with the same email as your PG:AI user.
  • Try removing and re-adding the connector.
  • For Team/Enterprise, confirm an admin enabled custom connectors.
  • API key: check the key starts with pgai_live_ and was not revoked.
  • Claude: ensure the connector is enabled for the current chat.
  • Enable the connector in the chat’s tools menu (not only in Settings).
  • Ask a PG:AI-specific question: “Use PG:AI to list my accounts”.
Template discovery depends on the Data Hub and Xano template routes. If you see a UUID validation error, contact support - this is a known routing issue being fixed on the backend.
  • Reload the window after editing mcp.json.
  • Check JSON syntax and that the URL has no trailing slash issues.
Generation and enrichment are asynchronous. After template_generate, companies_add, or contact_find_email_phone, poll get_operation_status every few seconds until status is completed or failed.

Next steps

Tools reference

All 22 tools and parameters

Examples

Prompts for research, contacts, and generation

Resources

Passive company and territory lists