Connector Documentation

Porter Metrics MCP Server

A remote MCP server that turns Claude, ChatGPT, Gemini and any MCP-compatible client into a marketing workspace: query and blend data across 32 connectors, build hosted reports, generate creatives, and manage campaigns through your Porter account.

Overview

Porter Metrics MCP Server exposes Porter's marketing platform as a Model Context Protocol server. Once connected, an agent can:

  • Discover and connect the data sources a customer uses — 32 connectors across advertising (Meta, Google Ads, TikTok, LinkedIn, Microsoft, Pinterest, X, Apple, DV360), social insights, GA4, Search Console, Shopify, Amazon Seller, Stripe, HubSpot, Klaviyo, Mailchimp, ActiveCampaign, plus BigQuery, Snowflake, PostgreSQL and Google Sheets.
  • Query data ad-hoc — across one connector or blended across many — and return rows ready to render.
  • Save blends (named cross-connector queries) and schedule recurring exports to BigQuery or Google Sheets.
  • Create, edit and share hosted reports: live dashboards deployed behind their own URL.
  • Reach the long tail of marketing operations through an action catalog of 750+ operations: campaign management and write-backs on the ad platforms, AI creative generation (image, video, voiceover), CRM and email marketing, e-commerce, SEO and web research.

The MCP is a thin, audited façade over Porter's existing backend. Every call is bound to the authenticated user's Porter identity and respects their company role assignments and license entitlements.

Requirements

  • A Porter Metrics account. Sign up at portermetrics.com if you don't have one.
  • At least one authorized data source (Facebook Ads, Google Ads, etc.) on your account — or authorize one from the conversation with connect_account.
  • An MCP-compatible client: Claude Desktop, Claude Web (Connectors), ChatGPT (Codex), Gemini, or the @modelcontextprotocol/inspector.
  • For recurring exports: a connected destination — BigQuery or Google Sheets, set up in-app or from the conversation.

Connect Porter to your client

Porter Metrics MCP Server is a remote server. There is nothing to install locally — your client opens an OAuth flow to Porter and from then on calls the public endpoint.

Endpoint

https://mcp.portermetrics.com/mcp

Claude (Desktop / Web)

  1. Open Settings → Connectors → Add custom connector.
  2. Paste the endpoint URL above.
  3. Click Connect. A browser tab opens Porter's login page.
  4. Sign in with the same email you use at portermetrics.com (Google SSO is supported).
  5. Approve access. The tab returns to Claude and the Porter Metrics MCP Server becomes available.

Optional: the install page also offers a downloadable Claude skill that teaches the agent Porter's recommended workflows.

ChatGPT / Codex

  1. Open Connectors → Add MCP server.
  2. Paste the endpoint URL and choose OAuth as the authentication method.
  3. Complete the Porter login redirect.

MCP Inspector (for developers)

npx @modelcontextprotocol/inspector https://mcp.portermetrics.com/mcp

How authorization works

Porter Metrics MCP Server is a resource server in OAuth terms. It speaks RFC 9728 and discovery metadata is published at /.well-known/oauth-protected-resource. The actual identity provider is Amazon Cognito (with Google federation), the same one that powers app.portermetrics.com.

  • One Porter login covers the MCP. If you're already signed in at app.portermetrics.com, Claude inherits that session through SSO.
  • Per-connector authorizations are separate. Authorizing Porter to access your Facebook Ads account, for example, is a different OAuth handshake the agent will offer when needed (connect_account). The MCP itself does not see or store your Facebook tokens; Porter does, server-side.
  • Token storage. The MCP server encrypts persisted OAuth state (DCR clients, refresh tokens) at rest using AES Fernet. Encryption keys can be rotated without invalidating live sessions.

Available tools

The connector exposes 28 tools in five groups: management, analytics, reports, actions and support. Each tool carries an MCP title annotation plus readOnlyHint / destructiveHint / idempotentHint annotations so clients can decide when to ask you for confirmation.

read-only runs without confirmation. additive write creates state. destructive always prompts for confirmation (deletes a blend, modifies a live campaign, etc.). idempotent is safe to retry.

Management

ToolTypeWhat it does
whoamiread-onlyIdentifies the authenticated user and the company they act under.
list_connectorsread-onlyReturns Porter's catalog of data sources, destinations and integrations, searchable and filterable.
list_accountsread-onlyLists the accounts the user can act on for a connector — already connected to Porter (billing applies) or available in the third party but not yet registered. Paginated; pass query= for fuzzy search. Drop-in input for query_data(accounts=…).
connect_accountadditive writeStarts the OAuth flow (or returns manual setup instructions) to authorize a connector or destination. Also connects BigQuery as a data source via role="source".
disconnect_accountdestructiveDisconnects a previously authorized third-party integration.
get_knowledgeread-onlySearches Porter's knowledge base: skills, step-by-step workflows, error→fix patterns and FAQs.
prepare_uploadadditive write idempotentReturns a one-time signed URL to upload heavy payloads (media assets, CSVs) referenced by later calls.

Analytics

ToolTypeWhat it does
list_fieldsread-onlyReturns the catalog of queryable metrics and dimensions, per connector or for a saved blend.
query_dataread-onlyRuns an ad-hoc query over one or more connected accounts — cross-connector when several are passed — with filters and date ranges. Returns rows.
bigquery_joinread-onlyCombines 2–5 BigQuery tables in an ephemeral join (INNER/LEFT/RIGHT/FULL) that can be queried like any source.
query_blendread-onlyRe-runs a saved blend by ID against live data.
list_blendsread-onlyLists saved blends, paginated, filterable by name.
get_blendread-onlyReturns a blend's definition, schema, attached exports and recent executions.
create_blendadditive writePersists a new saved blend (a named cross-connector query) and warms its schema cache.
update_blendadditive write idempotentEdits an existing blend; can re-warm the schema.
delete_blenddestructiveDeletes a blend. Attached exports are removed with it.

Reports

Reports are self-contained HTML/CSS/JS bundles that Porter deploys behind their own URL. The agent writes the frontend and a structured chart config; Porter packages it, hosts it, and enforces sharing/auth on every request.

ToolTypeWhat it does
list_reportsread-onlyLists the company's hosted reports, paginated, searchable by name.
get_reportread-onlyReturns a report's metadata, structure and source-bundle download URL without rendering it (fast path).
preview_reportread-onlyRenders the report against live data and returns diagnostics. Slow by design (5–30 s).
create_reportadditive writeCreates a hosted report from a base template and returns its URL. Private by default until shared.
edit_reportdestructiveEdits an existing report: download → modify → rebuild → redeploy. Sharing settings are unchanged.
duplicate_reportadditive writeClones a report onto new source accounts — the fastest way to roll one template out across clients.
share_reportadditive writeSets visibility and recipients (any email, per-recipient roles). Applies immediately, no redeploy.
delete_reportdestructive idempotentDeletes a hosted report. Its URL stops resolving.

Actions

ToolTypeWhat it does
list_actionsread-onlySemantic search over the 750+ operation catalog: describe the task in plain language and get ranked actions with their parameter schemas.
execute_actiondestructiveRuns a catalog action against the user's authorized account. Marked destructive because many actions modify state on the third-party platform; your client will ask for confirmation.

Support

ToolTypeWhat it does
report_bugadditive writeFiles a bug with Porter's engineering team straight from the conversation. Most reports are fixed within 24 h.
request_featureadditive writeSends a feature request to the product team (asks for your explicit approval first).

The action catalog

The 28 tools above are the fixed surface. The rest of Porter's capability — the long tail of marketing operations — lives in a catalog of 750+ actions across ~40 categories, reached through list_actions / execute_action. The agent searches by intent ("pause underperforming campaigns", "generate a product video"), inspects the returned parameter schema, and executes.

Categories include (non-exhaustive):

  • Creative generation (creative.*, audio.*) — a built-in AI studio: generate and edit images, produce video with native audio, text-to-speech voiceovers and voice design. Generated assets are served from a stable URL, ready to drop into a report or an ad.
  • Ad-platform management — create and edit campaigns, ad sets/groups, ads, budgets and audiences on Google Ads, Meta, TikTok, LinkedIn, Microsoft, Pinterest, X, Apple Ads and DV360.
  • Exports & schedules (blend_export.*, report_email_schedule.*) — attach recurring BigQuery/Sheets exports to a blend, or email a report on a cron schedule.
  • CRM & email marketing — HubSpot, Klaviyo, Mailchimp, ActiveCampaign.
  • E-commerce — Shopify, Amazon Seller: products, orders, customers.
  • SEO, search & web research — keyword/SERP intelligence, Search Console, web scraping.

Every action result comes back in a fixed envelope — {status, result, message, knowledge, follow_up} — where knowledge carries recovery guidance when something needs fixing (an expired token, a missing permission), so the agent can self-correct.

Typical flows

Brand-new account: query Facebook Ads for the last 7 days

  1. list_connectors(query="facebook") — confirm Facebook Ads is supported.
  2. list_accounts(connector="facebook-ads") — empty means nothing is authorized yet; rows with connection_status="available" are accounts already authorized in the third party but not yet registered in Porter.
  3. connect_account(connector="facebook-ads") — the agent hands you a URL. You open it; Porter runs the OAuth flow; the page returns you to your client. Re-run list_accounts to see the new accounts.
  4. query_data(accounts=[…], fields=[…], date_range="last_7_days") — rows. Picking an available account registers it on the first query (billing starts then).

Returning user: query an already-known account

  1. list_accounts(query="…") — find the account by name or ID.
  2. query_data(accounts=[…], fields=[…], date_range={…}) — rows.

Build and share a live dashboard

  1. list_fields / query_data — explore the data and settle the metrics.
  2. create_report — the agent writes the dashboard and gets back its hosted URL (private by default).
  3. preview_report — render against live data, iterate with edit_report until it's right.
  4. share_report — grant access to specific emails or roles; duplicate_report to roll the same template out to another client's accounts.

Recurring export to BigQuery or Google Sheets

  1. connect_account with the destination if you haven't yet (BigQuery supports OAuth or a service-account key).
  2. create_blend(name, …) — save the cross-connector query you want exported.
  3. list_actions(task="schedule a recurring export")execute_action("blend_export.create", …) — attach the destination and cron. Your client prompts for confirmation, then the export runs once immediately.

Data handling & privacy

  • Authorization scope. The MCP never sees passwords. It receives a short-lived Cognito id_token for the authenticated Porter user and uses it to call Porter's existing backend. Third-party tokens (Facebook, Google, Shopify, …) live exclusively on Porter, encrypted at rest.
  • Conversation data. Porter Metrics MCP Server does not request access to your chat history, memory, conversation summaries or files. The server only receives the tool calls your client decides to make and the parameters they carry.
  • Telemetry. Server logs record tool name, latency and error type — never tool arguments or response bodies — for diagnostics.
  • Data residency. Calls hit Porter's existing US-region infrastructure. BigQuery exports go to whatever region you select when configuring the destination dataset.
  • Account ownership. The MCP filters returned accounts by the companies in which your Porter user has a role. You cannot see accounts that live in companies you do not belong to.

The full Porter Privacy Policy and Terms of Service apply to all use of the MCP.

Common errors and how to recover

Every tool returns errors in a structured envelope — {error_type, message, hint} — and the hint usually contains the exact recovery step. The most common cases:

You seeWhat it meansWhat to do
An empty list_accounts result + a message mentioning re-authorizationThe third-party token (e.g. Facebook) is expired or revoked for one of your authorizations.Run connect_account with the affected connector and re-authorize. Retry.
"Porter has no role assignments on file for this user"Your Porter user is signed in but has no company role yet.Sign in at app.portermetrics.com and complete onboarding (create or join a company).
"No third-party authorizations found"You're signed in but haven't authorized any connector yet.Use connect_account(connector=…).
HTTP 401 from any tool callThe MCP access token expired.Disconnect and reconnect the Porter Metrics MCP Server in your client; the OAuth flow will refresh.
account_not_allowed when duplicating or editing a reportThe target accounts belong to a company your user has no role in.Pick accounts from list_accounts (they're pre-filtered to what you can use), or get access to that company in Porter first.
A failed execute_action with a knowledge blockThe action ran into a recoverable condition (missing param, expired 3P token, platform-side rejection).Follow the knowledge/follow_up guidance in the response — it's generated for that exact failure.

Limits

  • Query rows. query_data accepts limit with no fixed upper bound; very large queries may be slower because Porter walks the third-party API in real time.
  • Field catalog. Large per-connector catalogs are truncated with a hint telling the agent how to narrow the search.
  • BigQuery joins. bigquery_join combines 2–5 tables per join.
  • Report preview. preview_report renders against live data and typically takes 5–30 s; get_report is the fast path when you don't need rendered output.
  • Schedules. Recurring exports and report emails accept cron expressions for fine-grained control.
  • Rate. Porter applies the same per-account rate limits that govern the rest of the platform. The MCP does not impose additional caps.

Support

If something is wrong or missing:

When reporting an MCP bug, please include: the client name (Claude Desktop / Web / ChatGPT / …), the timestamp, the tool name, and the exact error message.