The Power My Analytics MCP server is a hosted endpoint at https://pma-mcp.web.app that exposes your PMA Hub to Model Context Protocol-compatible AI assistants. Once connected, your AI assistant can browse your connected data sources, inspect schemas, run analytics queries against your warehoused marketing data, and read or build Data Builder datasets, all through natural-language conversation.
You do not need new credentials. AI assistant clients authenticate using OAuth 2.1 with PKCE against your existing PMA login (Google single sign-on or email and password); headless / server-to-server integrations authenticate with your existing PMA API token as a Bearer credential. Either way, your data stays in PMA's existing data warehouse; the AI assistant or your service only receives the specific query results it needs to answer you.
In short: the MCP server turns your PMA Hub into a conversational analytics surface. Instead of building a Looker Studio scorecard or assembling a Data Builder dataset to answer a one-off question, you can simply ask.
The MCP server is a new way to consume the data you have already centralized in your PMA Hub. It does not replace your existing reporting tools; it complements them. Here is how it lines up with the rest of the platform:
PMA Surface |
Best For |
Relationship to MCP |
Looker Studio, Google Sheets, Microsoft Excel reports |
Recurring, shareable, board-ready dashboards. |
Stay authoritative for scheduled and shared reporting. The MCP server sits alongside, not on top. |
Data Builder |
Saving multi-source, multi-table reporting workspaces and exporting blended data. |
The MCP server can read, write, and query Data Builder datasets through dedicated tools. A dataset created via MCP is the same dataset you see in the Hub. |
Sources, Schema Explorer, Manage Accounts |
Configuring connections, sub-accounts, and sync schedules. |
The MCP server can list and inspect these but configuration changes are still done in the Hub. |
PMA API and Custom-plan exports (BigQuery, SQL, FTP, Sovereign SQL Warehouse) |
Programmatic, scheduled, and large-volume data access. |
The MCP server proxies to the same warehoused, deduplicated, time-zone-normalized SQL layer. It is an additional access surface, not a replacement. |
Single-platform third-party MCPs |
Live data from one specific platform. |
The PMA MCP queries the warehoused, blended, multi-platform layer; cross-platform comparison is a single tool call, not a manual reconciliation. |
The MCP server shines when you want to ask an ad-hoc question ("How is my Facebook Ads performance compared to last month?", "Did anything weird happen this week?", "Which campaigns are driving the most conversions?") without first having to build a report.
AI Client |
Plan / Tier Required |
Who Adds the Connector |
Claude (Desktop / Code / Web) |
A Claude plan tier that supports custom MCP connectors (e.g., Claude Pro or Team). |
Individual users: add the connector yourself from the AI client. Organizations: the Claude organization Owner adds it once for the whole org, and individual users then connect their own PMA accounts. |
ChatGPT |
A ChatGPT plan tier that supports custom MCP connectors. |
Individual users: add the connector yourself from the AI client. Organizations: the ChatGPT organization Owner adds it once for the whole org. Either way, each user must also explicitly select the PMA MCP from the tools menu in each new chat. |
Other MCP-compatible clients |
Any client supporting Streamable HTTP transport and OAuth 2.1. |
Whoever has permission to register MCP connectors in that client. |
Headless integrations (custom backend services with no browser, no interactive user session) authenticate directly with a Bearer token, skipping the OAuth handshake entirely. To set one up you will need:
Authorization header. The official @modelcontextprotocol/sdk package ships with a compatible StreamableHTTPClientTransport; equivalent libraries exist in other languages.For the full walkthrough, see Headless/Server-to-Server Integration with PMA MCP Server.
last_sync timestamp is queryable via pma_list_data_sources for current freshness.The Claude Desktop flow is the most common way to use the PMA MCP server today. Individual Claude users on a qualifying plan can add the connector themselves; in organization contexts, the Claude organization Owner adds it once for the whole org, and individual users then connect their own PMA accounts.
Claude Web (claude.ai) supports custom MCP connectors using the same setup pattern as Claude Desktop. The OAuth flow, browser handshake, and Continue-button behavior are identical; only the entry point in Claude differs.
Claude Web then uses the PMA MCP automatically when you ask data-related questions.
Claude Code is Anthropic's command-line interface for Claude. It connects to the PMA MCP server through a one-time CLI command, then completes the OAuth handshake the same way the other Claude clients do.
In a terminal where Claude Code is already installed, run:
claude mcp add pma-mcp --transport http https://pma-mcp.web.app/This registers the PMA MCP server with your Claude Code configuration.
claude./mcp to view the list of registered MCP servers. The PMA MCP appears as unauthenticated.The ChatGPT flow is similar but has one important behavioral difference: the PMA MCP must be selected explicitly in each new chat for ChatGPT to call it.
Headless / server-to-server integrations skip the OAuth handshake used by browser-based AI clients and authenticate directly with your PMA API token as a Bearer credential. This is the right path when you are building a custom backend service (for example, a Node.js API on Fly.io, a scheduled job on AWS, or an agentic system on your own infrastructure) and there is no browser available to complete OAuth.
Locate the API token shared with you during your MCP Alpha onboarding (typically delivered via your alpha access support ticket) and store it in your service's secrets manager or environment-variable system. Do not commit the token to source control or expose it in client-side code; treat it like any production credential.
Configure your MCP client library to call https://pma-mcp.web.app/mcp over Streamable HTTP with header Authorization: Bearer <your-pma-api-token> on every request. The example below uses the official @modelcontextprotocol/sdk package for Node.js and TypeScript:
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const transport = new StreamableHTTPClientTransport(
new URL("https://pma-mcp.web.app/mcp"),
{ requestInit: { headers: { Authorization: `Bearer ${process.env.PMA_API_TOKEN}` } } }
);
const client = new Client({ name: "my-service", version: "1.0.0" }, { capabilities: {} });
await client.connect(transport);Any MCP client library that supports the Streamable HTTP transport plus a static Bearer token will work; equivalent libraries exist in other languages.
Call a low-cost diagnostic tool such as pma_list_data_sources to confirm the connection is wired correctly. If the call returns the expected list of connected platforms (with their has_data and last_sync flags), your headless integration is working.
For the complete walkthrough (including environment-variable setup details, full error-handling patterns, token rotation guidance, and headless-specific troubleshooting), see Headless/Server-to-Server Integration with PMA MCP Server.
The PMA MCP server exposes 22 first-party tools. You will rarely call them by name; your AI assistant picks the right tool based on the question. The reference below is mainly useful when you want to understand what the AI is doing on your behalf, debug an unexpected response, or write more efficient prompts.
Tools are grouped into five families.
These tools answer "what do I have, and is it healthy?". The AI assistant typically calls one or more of these before doing analytical work.
Tool |
What It Does |
Typical Prompt That Triggers It |
pma_list_data_sources |
Lists every connected platform and account in your hub, with a flag for whether each has data and when it last synced. |
"What platforms do I have connected?" |
pma_describe_platform |
Call once to get the available report types for a platform; call again with a specific report type to get the queryable metrics and dimensions for that report. Usually called silently by the AI as a prerequisite, not triggered by direct user prompts. |
"Show me my HubSpot deals from last month" |
pma_inspect_org_data |
Diagnostic scan that confirms which platform-and-report-type combinations actually have data, with row counts and date ranges. Slow on full scans (30–45 seconds); pass a connector_type to keep it fast. |
"Why isn't my Shopify data returning anything?" |
pma_list_accounts_with_token_status |
Paginated list of every connected account with OAuth token health for each. |
"Show me all my connected accounts and their connection status" |
pma_get_token_health_summary |
Org-wide health snapshot with counts of valid, expired, and revoked tokens, plus a list of at-risk accounts each with its own recommended fix. |
"Why isn't my data syncing?" |
Tool |
What It Does |
Typical Prompt That Triggers It |
pma_list_usages |
Lists the sub-accounts under one connected account (for example, the individual ad accounts under a single Facebook login) with access status and last-sync information. |
"Which Facebook ad accounts is my login connected to?" |
pma_list_activity |
Returns recent organization events (syncs, exports, connector changes), paginated. |
"What's happened in my hub recently?" |
These are the tools that do the actual analytical work. The AI assistant chooses among them based on the kind of question you asked.
Tool |
What It Does |
Typical Prompt That Triggers It |
pma_get_account_summary |
Returns one aggregated row of headline numbers (spend, conversions, revenue, ROAS, row count) for one platform or all platforms. |
"How is my Facebook Ads doing this month?" |
pma_query_custom |
Flexible analysis, grouping, ranking, and within-period trend queries on one platform. |
"Show me my top 10 Google Ads campaigns by spend last month." |
pma_query_performance |
Returns raw individual records (no aggregation, no grouping) for browsing. Note: for platforms with multiple sub-types (e.g., Facebook Ads, Google Analytics), this tool may return no results; use pma_query_custom with a specific account instead. |
"List my last 20 Shopify orders." |
pma_compare_sources |
Ranked side-by-side comparison of one metric across 2 to 10 platforms. |
"Which platform is generating the most revenue: Shopify or Amazon?" |
pma_get_date_range_comparison |
Period-over-period comparison (week-over-week, month-over-month, quarter-over-quarter, year-over-year, or custom) for one metric. |
"Is my ad spend up or down compared to last month?" |
pma_get_trend |
Multi-period series (daily, weekly, or monthly) with pre-computed period-over-period change. |
"Show me weekly clicks for the last 12 weeks." |
pma_detect_anomalies |
Statistical anomaly detection (z-score) for spikes and drops. Analysis window is set via date_from, date_to, and lookback_days. Zero-value days are explicitly excluded from anomaly results and reported separately in the data_gaps field. |
"Did anything weird happen in my Google Ads spend this week?" |
These tools let your AI assistant work with PMA Data Builder datasets: saved, blended, multi-source reporting workspaces that live in your hub.
Tool |
What It Does |
Typical Prompt That Triggers It |
pma_list_datasets |
Lists every dataset in your hub with a summary of its data tables. |
"What datasets do I have?" |
pma_get_dataset |
Returns the structure of a single dataset, including each data table and the fields it pulls. |
"What's inside my Q4 Performance dataset?" |
pma_get_dataset_data |
Runs all the data tables in a dataset and returns the blended results for a date range. |
"Show me my Q4 Performance dataset for last month." |
pma_get_data_table_data |
Returns the rows from one specific data table inside a dataset (one connector and account). |
"Show me just the Google Ads data from my Q4 Performance dataset" |
pma_create_dataset |
Creates a new dataset, either from a template or blank. Includes a mandatory user-confirmation step before creation. |
"Create a dataset called 'Holiday Campaigns' that blends my Facebook Ads and Google Ads." |
pma_add_data_table |
Adds a new data table (one connector account, configured fields, and a date range) to an existing dataset. |
"Add my TikTok Ads account to the 'Holiday Campaigns' dataset." |
Tool |
What It Does |
Typical Prompt That Triggers It |
pma_list_dataset_templates |
Lists pre-built dataset recipes for common stacks (for example, "Facebook Ads + Google Ads performance overview"). Pass the template ID to pma_create_dataset to create a dataset from it. |
"Create a dataset blending my Facebook Ads and Google Ads" |
pma_list_templates |
Lists pre-built report templates (distinct from dataset templates, which are used for Data Builder). |
"What report templates are available?" |
This is the kind of task that takes ten minutes of clicking through the Hub UI but a single sentence in the MCP server. We will build the same thing both ways: a dataset that blends Facebook Ads spend with Google Ads spend so we can see total paid-search-and-social spend by week.
Your prompt to Claude:
"Create a Power My Analytics dataset called 'Paid Spend Weekly' that blends Facebook Ads and Google Ads. Include spend, impressions, and clicks for the last 30 days. Then show me the blended weekly totals."
What Claude does behind the scenes:
What you see in chat (excerpt):
I created the dataset Paid Spend Weekly in your hub and pulled the last 30 days. Here are the blended weekly totals across Facebook Ads and Google Ads:
Week starting Spend Impressions Clicks 2026-03-30 $8,420.55 612,803 9,144 2026-04-06 $9,107.10 655,201 9,802 2026-04-13 $8,946.22 643,012 9,640 2026-04-20 $9,415.78 671,495 10,218Spend is up roughly 12% from the first to the most recent full week. The dataset is now saved in your Hub at Data Builder > Paid Spend Weekly. Want me to add a third source or change the date range?
Total elapsed time: roughly 30 seconds, from a single prompt.
The same workflow done by hand in the Hub. The result is identical (same dataset, same data, same place in your hub) but you do the clicks.
Where the MCP server really shines is when a question requires synthesizing several different angles. Imagine you log in on a Monday morning and notice that last week's ad spend looks lower than usual. You want to know:
In a traditional reporting workflow, that is four separate Looker Studio scorecards, a Manage Accounts > History scan, and twenty minutes of manual digging. With the MCP server, it is one prompt.
"My total ad spend looks down this past week vs the week before. Can you (a) confirm with a week-over-week comparison across Facebook Ads and Google Ads, (b) check whether any of the days with low spend are actually data gaps rather than real drops, (c) if it's a real drop, show me the top campaigns where spend fell, and (d) tell me whether any of those accounts have OAuth issues?"
Here is what I found across your two ad platforms for the week of April 20-26 compared with April 13-19:
Headline week-over-week change:
- Facebook Ads: spend down 18.4% (from $4,902 to $3,999).
- Google Ads: spend down 4.1% (from $4,205 to $4,033). Within normal variance.
- Combined spend down 11.8%.
Real drop or data gap? Anomaly detection found:
- Facebook Ads: 1 data gap on April 24 (no data reported, possible sync gap, not a real drop). 2 days flagged as anomalous spend drops on April 22 and April 25 (z-scores -2.4 and -2.1 against the 30-day baseline).
- Google Ads: 0 anomalies, 0 gaps.
Where the real drop happened (Facebook Ads, April 22 and April 25): Top 3 campaigns by absolute spend decrease vs the prior week:
- Q2-Awareness-USA: down $385 (campaign moved to PAUSED on April 22, per its status field).
- Retargeting-Cart-Abandoners: down $214 (daily budget was reduced from $80 to $40 on April 21).
- Brand-Lookalike-1pct: down $112 (CPC trended up; impressions roughly flat).
OAuth health: All Facebook Ads and Google Ads accounts in your hub have valid tokens. The April 24 gap is not explained by an OAuth issue; it most likely reflects a brief Facebook Marketing API sync delay. I recommend kicking off a manual backfill from Sources > Facebook Ads > Actions > Backfill data range for April 24 if the gap persists.
Bottom line: the headline drop is real and is concentrated in two paused/budget-reduced Facebook Ads campaigns, not a cross-platform performance issue. April 24 is a data gap to backfill, not a true zero day.
Five tools, six tool calls, one synthesized answer. The same investigation done by hand requires touching at least three different surfaces in the Hub plus manual cross-referencing.
The fixes below cover the situations PMA's support team sees most often during the alpha. If your issue is not listed here, contact PMA support and include the AI client you are using, the prompt that triggered the problem, and any error message you received.
Authorization header, or the organization is not on the alpha access list. Authorization: Bearer <token> (the literal word Bearer followed by a single space, then the token). If the header is correct and the request still fails, confirm your organization has been allow-listed for MCP Alpha access. For more headless-specific troubleshooting (token rotation, transport issues, rate limits in agentic loops), see Headless/Server-to-Server Integration with PMA MCP Server.