Connect to the PMA MCP Server from Claude Code

Connect to the PMA MCP Server from Claude Code

Info
This article walks you through connecting your PMA Hub to Claude Code, Anthropic's command-line interface for Claude, so you can ask questions about your marketing data in plain language directly from the CLI. For a full overview of the PMA MCP server, including the available tools and worked examples, see the Power My Analytics MCP Server Guide.
Notes
The PMA MCP server is currently in Alpha. Access is granted per organization on request. To request access, open a support ticket with the subject line "MCP Early Access" at support.powermyanalytics.com.

Requirements

Before you begin, confirm the following on both sides of the connection.

Claude Code:

  • Claude Code installed on your machine. (Refer to Anthropic's Claude Code installation documentation if you have not installed it yet.)
  • A Claude plan tier that supports custom MCP connectors (e.g., Claude Pro or Team).

Power My Analytics:

  • Your PMA organization must be allow-listed for MCP Alpha access by the PMA team.
  • Org Admin role in PMA.
  • At least one data source connected and actively syncing in your PMA Hub.

Step 1: Register the PMA MCP Server

In a terminal where Claude Code is already installed, run the following command to register the PMA MCP server with your Claude Code configuration:

claude mcp add pma-mcp --transport http https://pma-mcp.web.app/

You only need to do this once. The MCP registration persists across Claude Code sessions.

Step 2: Authorize Your PMA Account

  1. Open the Claude Code CLI by running claude.
  2. Type /mcp to view the list of registered MCP servers. The PMA MCP appears as unauthenticated at this point.
  3. Select pma-mcp from the list. Claude Code displays a one-time authorization link.
  4. Open the link in your browser. The PMA OAuth flow runs the same way as in Claude Desktop:
    • Sign in to PMA using your existing credentials. Both Sign in with Google and email + password are supported.
    • When prompted, select the hub you want to authorize.
    • Click Continue when the "Authorization Successful" page loads. (The button is disabled until the OAuth callback completes, so clicking too early is no longer possible; the page also auto-redirects after a few seconds.)
  5. Return to the Claude Code CLI. The PMA MCP now appears as authorized, and Claude will use its tools automatically when you ask data-related questions.

Reconnect or Reauthenticate

MCP access tokens last 1 year. Refresh tokens are not yet implemented; when a token expires (or if your hub access is revoked or your PMA login changes), reauthorize from the CLI:

  1. Run claude to open Claude Code.
  2. Type /mcp to view the registered MCP servers.
  3. Select pma-mcp and complete the authorization flow again, following Step 2 above.

To remove the PMA MCP from your Claude Code configuration entirely, run:

claude mcp remove pma-mcp

Troubleshooting

PMA MCP shows as unauthenticated even after completing the OAuth flow

Cause: The OAuth callback may not have completed before the CLI was queried, or the authorization handshake was interrupted. Solution: Wait a few seconds, then run /mcp again. If the status still shows unauthenticated, retry the authorization by selecting pma-mcp in /mcp and re-running the flow.

Token expired or sudden loss of tool access

Cause: Access tokens are valid for 1 year, but they can expire earlier if your hub access is revoked or your PMA login changes. Solution: Reauthorize from the Claude Code CLI by running claude, typing /mcp, and re-running the authorization flow for pma-mcp. See Reconnect or Reauthenticate above.

Connection fails completely with no clear error

Cause: Your PMA organization may not yet be on the Alpha access list. Solution: Open a support ticket with the subject line "MCP Early Access" at support.powermyanalytics.com.

The CLI cannot find the claude mcp command

Cause: Claude Code is not installed, or the binary is not on your shell PATH. Solution: Confirm Claude Code is installed by running claude --version. If the command is unrecognized, follow Anthropic's Claude Code installation documentation, then retry Step 1.

    • Related Articles

    • Connect to the PMA MCP Server from Claude Desktop

      This article walks you through connecting your PMA Hub to Claude Desktop so you can ask questions about your marketing data in plain language, directly inside Claude. For a full overview of the PMA MCP server, including available tools and worked ...
    • Headless/Server-to-Server Integration with PMA MCP Server

      This article walks you through connecting a headless server (no browser, no interactive user session) to the PMA MCP server using a static Bearer token. It is intended for developers integrating the MCP server into custom backend services such as ...
    • Connect to the PMA MCP Server from ChatGPT

      This article walks you through connecting your PMA Hub to ChatGPT so you can ask questions about your marketing data in plain language, directly inside ChatGPT. For a full overview of the PMA MCP server, including available tools and worked examples, ...
    • PMA MCP Tools Reference

      This article is the complete tools reference for the Power My Analytics MCP server. It lists every tool exposed by the server, organized by functional group, with a description of what each tool does, typical prompts that trigger it, and key ...
    • Troubleshooting and Important Considerations for PMA MCP Server

      This article covers known limitations and current Alpha-stage behaviors of the Power My Analytics MCP server, followed by specific troubleshooting steps for the issues most commonly encountered. The Limitations and Important Considerations section ...