paid-media-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_API_KEY | No | API key for remote (e.g., Vercel) MCP server authentication. Required if not allowing unauthenticated access. | |
| BIGQUERY_DATASET_ID | No | Deprecated legacy variable. Use PAID_MEDIA_BQ_DATASET instead. | |
| BIGQUERY_PROJECT_ID | No | Deprecated legacy variable. Use PAID_MEDIA_GCP_PROJECT instead. | |
| PAID_MEDIA_DATA_DIR | No | Absolute path to the data directory containing JSON files (e.g., campaigns, teams, performance). If not set, the default is likely the current working directory's ./data. | |
| PAID_MEDIA_AGENT_URL | No | Optional URL for paid-media-agent integration (Cloud Run endpoint). | |
| PAID_MEDIA_BQ_DATASET | No | BigQuery dataset name. Defaults to 'paid_media'. | paid_media |
| PAID_MEDIA_GCP_PROJECT | No | GCP project ID for BigQuery mode. Enables BigQuery adapter. Required if using BigQuery data source. | |
| MCP_ALLOW_UNAUTHENTICATED | No | If set to 'true', allows requests without MCP_API_KEY. Default is false. | false |
| GOOGLE_APPLICATION_CREDENTIALS | No | Path to a GCP service account key JSON file for BigQuery authentication. | |
| GOOGLE_APPLICATION_CREDENTIALS_JSON | No | The GCP service account key JSON as a string (alternative to file path). |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
| prompts | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_campaignsA | List and filter paid media campaigns. Filter by team, platform, status, objective, funnel stage, or tag. Returns campaign details including budget, targeting, and status. |
| get_campaignB | Get full details for a single campaign by its ID. |
| get_accountA | Get details for an ad account, including which team manages it and its budget. |
| list_accountsA | List all ad accounts, optionally filtered by team. |
| list_teamsA | List all media teams, their objectives, KPIs, managed platforms, and account assignments. |
| get_teamA | Get full details for a single media team: objectives, KPIs, platforms, members, and managed accounts. |
| get_team_for_accountA | Look up which team owns a given ad account. |
| list_team_membersA | List team members, their roles, platform specialties, and responsibilities. Optionally filter by team. |
| get_team_memberA | Get full details for a single team member by ID. |
| get_campaign_performanceC | Get historical performance data for a campaign. Returns per-day records plus aggregated totals for the date range. |
| get_team_performanceA | Get aggregated performance data across all campaigns for a team, within an optional date range. |
| get_benchmarksA | Get industry/platform benchmarks for key metrics (CTR, CPC, CPM, CPA, ROAS) to compare against actual performance. |
| list_attribution_modelsA | List all attribution configurations used by the team: model type (last-click, data-driven, etc.), windows, conversion events, and which platforms each applies to. |
| get_attribution_modelA | Get full details for a specific attribution configuration: model, window, conversion events, cross-device settings, and intended use cases. |
| compare_attribution_modelsB | Compare two attribution configurations side-by-side to understand how they differ in model type, windows, conversion events, and use cases. |
| list_reporting_templatesA | List available reporting and dashboard templates. Filter by audience (executive, media_team, client, internal). Returns template structure, metrics, delivery format, and cadence. |
| get_reporting_templateA | Get the full structure of a reporting template including all sections, metrics, dimensions, and visualizations. |
| build_performance_reportB | Generate a narrative performance report for a campaign or team, combining live performance data with the appropriate reporting template. Best used with a reporting template ID to match the intended audience format. |
| get_campaign_performance_reportB | Query live campaign performance from BigQuery. Returns spend, impressions, clicks, platform ROAS, MTA attributed ROAS, margin ROI, attributed CPA, and pipeline value per campaign. All three ROAS numbers are returned side-by-side so you can see the gap between what platforms claim vs what multi-touch attribution shows. Requires BigQuery mode. |
| get_pacing_reportB | Return budget pacing status for all campaigns that have started flying. Shows expected spend (based on days elapsed) vs actual spend, required daily spend to hit budget, projected total spend at current burn rate, and a pacing_status label. Overpacing: >110% of expected. Underpacing: <90%. Sorted by urgency: overpacing first, then underpacing, then on_pace. Requires BigQuery mode. |
| get_roas_comparisonA | Compare platform-reported ROAS vs MTA attributed ROAS vs margin ROI for each channel. Returns platform_overcount_pct — the percentage by which platforms over-claim credit compared to the attribution model. Use this to quantify platform attribution inflation and justify budget reallocation decisions. Requires BigQuery mode. |
| get_channel_efficiencyA | Cross-channel efficiency report showing attributed CPA, attributed ROAS, pipeline share, and spend share per channel. The pipeline_vs_spend_gap_pct column shows which channels punch above their spend weight (positive gap = efficient) vs drag (negative gap). Use for budget allocation recommendations. Requires BigQuery mode. |
| get_ad_performanceA | Ad/creative level performance with multi-touch attribution credit. Returns thumbstop_rate, frequency, view_through_rate, attributed_cpa, and attributed_roas per creative. Use to identify winning creatives for scaling and underperforming ones to pause or rotate. Requires BigQuery mode. |
| get_keyword_performanceA | Keyword performance with spend, quality scores, and Google impression share metrics. Excludes negative keywords. Returns quality_score (1–10), avg_search_impression_share, avg_IS_lost_budget, and avg_IS_lost_rank. Use low_quality_score=true to find SQO opportunities and lost_is_budget=true to find keywords throttled by budget caps. Requires BigQuery mode. |
| get_daily_performanceB | Daily performance time series across all campaigns. Supports optional aggregation by week or month. Returns spend, impressions, clicks, video_views, platform_conversions, platform_conversion_value, CTR, CPC, and CPM. Use for trend analysis, anomaly detection, and week-over-week or month-over-month reporting. Requires BigQuery mode. |
| get_asset_libraryA | Get the asset library overview: DAM system name and URL, access instructions, brand and copy guidelines links, and a summary of asset categories available. |
| list_asset_categoriesA | List asset categories (image, video, copy, etc.) with their storage locations, naming conventions, and platform specs. Optionally filter by asset type. |
| get_asset_categoryB | Get full details for an asset category: location URL, naming convention, and per-platform specs (dimensions, file size limits, formats, aspect ratios). |
| get_asset_specsA | Get platform-specific asset specs (dimensions, file size, aspect ratio, duration limits) for a given asset type and platform combination. |
| get_testing_methodologyA | Get the team's testing methodology: confidence threshold (e.g. 95%), stat sig requirements, minimum sample size and duration, minimum detectable effect, and what constitutes a winning test. |
| list_testsA | List tests — active, planned, completed, or all. Covers both in-campaign A/B tests (creative, audience, bidding, etc.) and vendor/partner evaluations (dsp, agency, ad_network, platform, tool). Filter by status, type, team, or platform. |
| get_testA | Get full details for a single test: hypothesis, all variants, results, confidence level, primary metric lift, conclusion, and action taken. |
| get_test_learningsB | Summarize completed test results: what was tested, which variant won, lift achieved, whether stat sig was reached, and action taken. Covers both in-campaign A/B tests and vendor/partner evaluations (dsp, agency, ad_network, platform, tool). |
| get_audience_library_overviewA | Get a high-level overview of the full audience library: count of first-party audiences, contracted data providers, onboarding platforms, lookalike strategy summary, and third-party layer count. |
| list_first_party_audiencesB | List first-party audiences (CRM lists, pixel-based, customer match, suppression lists, lookalike seeds, etc.). Filter by business unit or platform availability. |
| list_data_providersA | List contracted third-party data providers (e.g. Oracle Data Cloud, Acxiom, Experian). Shows contract status, available segments, platforms, and contact info. |
| get_lookalike_strategyA | Get the full lookalike audience strategy: seed audiences used per platform, expansion percentages tested, best-performing expansion sizes, and strategic notes. |
| list_third_party_audience_layersA | List third-party audience segments and layers used as targeting overlays. Filter by platform, default use, or best-performing flag. Includes CPM premium estimates and performance notes. |
| get_onboarding_platformsA | Get details on first-party data onboarding platforms and clean rooms in use (e.g. LiveRamp, Habu, InfoSum): platforms connected, use cases, and contact info. |
| get_measurement_overviewA | Get a high-level overview of the full measurement and tracking setup: tag management system, implementation type (client-side/server-side/hybrid), pixel count, conversion API count, and measurement partners. |
| get_tag_managementA | Get full tag management system details: platform (GTM, Tealium, etc.), container ID, implementation type, server-side endpoint, and configuration notes. |
| list_pixels_and_tagsB | List all platform pixels and tracking tags: implementation type (client/server-side), events tracked, custom parameters. Optionally filter by platform. |
| list_conversion_apisB | List all Conversion API implementations (Meta CAPI, Google Enhanced Conversions, TikTok Events API, etc.): events sent, match rate, deduplication method. Filter by platform. |
| get_cm360_setupA | Get Campaign Manager 360 configuration: account ID, Floodlight configuration ID, and all u-variables (custom dimensions) with their names, types, descriptions, and example values. |
| get_website_data_captureA | Get the website data capture setup: data layer implementation status and variables, analytics platform and property ID, first-party cookie config (domain, duration, captured data). |
| list_measurement_partnersB | List measurement and analytics partners (MMM, incrementality testing, brand lift, attribution providers). Shows status, platforms covered, cadence, and contacts. |
| list_bulk_upload_platformsA | List the GMP platforms that support bulk upload (DV360 SDF, SA360 Bulksheet, CM360 Trafficking Sheet) with a summary of their format, entity types, and upload process. |
| get_bulk_upload_schemaA | Get the full field schema for a platform bulk upload entity type (e.g. DV360 line_item, SA360 campaign, CM360 placement). Returns all column names, data types, required status, valid values, and org-configured defaults. |
| get_platform_org_defaultsA | Get the org-configured default field values and naming conventions for a platform's entity types. Use this when generating bulk upload files to apply the team's standard settings. |
| get_bulk_upload_instructionsC | Get step-by-step upload instructions and file naming requirements for a GMP platform's bulk upload format. |
| list_identity_namespacesA | List all registered identity signal types from the shared schema namespace registry. Covers platform click IDs (gclid, fbclid, li_fat_id, ttclid, etc.), analytics cookies (GA4 client_id, Adobe ECID, Segment), CRM IDs, hashed first-party signals (email SHA-256, phone), and custom org-defined identifiers. Filter by category to get a focused list. Use this to understand what signals are available for identity stitching. |
| get_identity_namespaceA | Get full details for a specific identity signal namespace, including capture method, lifetime, PII status, which platforms use it, and implementation notes. Useful when setting up a new signal or diagnosing a stitching gap. |
| get_identity_signal_coverageA | Review which identity signal namespaces are active for a given set of platforms and identify gaps in coverage. For example: 'we run Meta and LinkedIn — which signals should we be capturing and which are we missing?' Returns a coverage map with implementation priority for each missing signal. |
| get_attribution_resultsA | Get the latest multi-touch attribution results from the most recent Analyst agent run. Returns weighted credit by channel and platform: attributed conversions, conversion value, spend, attributed CPA, attributed ROAS, and each channel's share of total credit. This is the output of the MTA model — distinct from platform-reported attribution. Filter by conversion_type for B2B pipeline stages (e.g. 'opportunity_created') or B2C events. |
| get_attribution_run_historyB | List recent attribution model runs: model used, date range, number of paths modeled, identity match rate, and run status. Use this to check when the model last ran, whether it succeeded, and whether a new run is needed. |
| get_watchdog_alertsA | Get data quality alerts from the Watchdog agent. Returns active alerts about signal capture rate drops (gclid, fbclid, etc.), spikes in null CRM fields, CAPI match rate issues, spend anomalies, or identity match rate declines. Always check this before running attribution analysis — active critical alerts mean the underlying data is unreliable and attribution results should be treated with caution. |
| get_analyst_insightsA | Get insights and recommendations produced by the Analyst agent: channel anomalies, attribution model readiness assessments, stitching quality findings, budget efficiency observations, and incrementality signals. Filter by priority or status to focus on what needs attention now. |
| get_pending_approvalsA | Get media actions proposed by the Operator agent that are awaiting human approval. Each approval includes: what action is proposed, which platform entity is affected, the rationale from attribution data, estimated impact, and budget at stake. Review these before they expire — the Operator agent will not execute them until approved. |
| trigger_agent_runA | Trigger an on-demand run of one of the autonomous agents: 'watchdog' (data quality audit), 'analyst' (attribution model run), or 'operator' (media optimization pass). Requires PAID_MEDIA_AGENT_URL to be set in the MCP server's environment. The agent runs asynchronously — use get_attribution_run_history or get_watchdog_alerts to check results after a few minutes. |
| query_account_journeyA | Query the BigQuery data warehouse to return the full multi-touch attribution path for all users mapped to a specific company account domain. Shows every paid media touchpoint (across all platforms) that influenced the account, in chronological order, with attribution credit weights. Essential for B2B account-based attribution — surfaces cross-platform, cross-device journeys that platform-level reporting misses. Requires BigQuery mode (BIGQUERY_PROJECT_ID env var must be set). |
| check_signal_capture_healthA | Check the current capture rates for all monitored identity signal namespaces (platform click IDs and analytics cookies) against their thresholds. Reads from watchdog_capture_rate_log for historical rates and watchdog_alerts for active issues. Use this when diagnosing a suspected tracking problem, before running attribution analysis, or when a stakeholder questions the data quality. Unlike get_watchdog_alerts (which shows cached alert records), this tool can also surface the trend direction for each signal. |
| detect_crm_null_fieldsA | Scan recent CRM lead records for missing media identifier fields — a key signal that the tracking pipeline has broken. Returns the count and percentage of leads created in the past N hours that are missing gclid, fbclid, li_fat_id, ga4_client_id, and/or utm_source. A spike in null fields means conversions are arriving unattributed, which degrades attribution model accuracy. Cross-reference with check_signal_capture_health to identify the break point. |
| push_audience_suppressionA | Add a list of company domains to an audience exclusion list on a supported ad platform (DV360, Meta, LinkedIn, Google Ads, TikTok, Reddit Ads) to stop showing top-of-funnel ads to accounts already in open pipeline. This is the 'closed-loop' action that connects CRM pipeline data to media buying. The action is logged to operator_action_log. If PAID_MEDIA_AGENT_URL is configured, the request is forwarded to the agent's /action/audience-suppression route, which runs the Operator's guardrail path (approval gating via OPERATOR_REQUIRE_APPROVAL, audit logging). Otherwise, it is queued as a pending approval with full context for manual execution. |
| reallocate_media_budgetA | Shift budget from an underperforming campaign or line item to one with higher attributed pipeline contribution. Supports DV360, SA360, Meta, LinkedIn, Google Ads, TikTok, and Reddit Ads. When PAID_MEDIA_AGENT_URL is configured, the request is forwarded to the agent's /action/reallocate-budget route, where the Operator's guardrails apply: the platform clients enforce the MAX_BUDGET_SHIFT_PCT cap and OPERATOR_REQUIRE_APPROVAL queues the action for human approval instead of executing immediately. The action is logged to operator_action_log with full attribution rationale. Without an agent URL it is queued for manual execution with a pending approval record. Always provide the attribution insight that drives the recommendation. |
| get_company_profileA | Look up the enriched firmographic profile for a company domain. Returns industry, employee range, annual revenue range, technology stack, CRM pipeline stage, account tier (tier_1/tier_2/tier_3/nurture/excluded), ICP score, and enrichment metadata. Populated by the Analyst agent's IP intelligence enrichment pipeline. Requires BigQuery mode. |
| get_target_account_funnelA | Return ranked target accounts from the dark funnel, sorted by composite priority score. Score = pipeline stage (0–30pts) + intent score×0.25 (0–25pts) + recency (0–20pts) + key page visits (0–15pts) + paid exposure (0–10pts). Use intent_spiking=true to surface accounts with sudden engagement increases (today > 30d avg × 1.5). Requires BigQuery mode and at least one completed enrichment run. |
| get_company_sessionsA | Return de-anonymized web sessions for a specific company over a lookback window. Each session includes channel, UTM campaign, landing page, page flag signals (visited_pricing, visited_demo, visited_contact, visited_docs), and paid touchpoint info. Note: no raw IP addresses are stored — sessions are linked via /24 prefix resolution only. Requires BigQuery mode. |
| get_company_engagementA | Return the rolling engagement summary for a company, including composite intent score. Intent score = recency (50%) + depth/page signals (30%) + content/paid exposure (20%). Also returns pricing_page_sessions, demo_page_sessions, session_growth_pct vs prior period, and the intent_spiking flag. Use this for a quick account health check before outreach. Requires BigQuery mode. |
| get_dark_funnel_coverageA | Classify target accounts by web presence: 'dark' (never seen on website), 'lapsed' (last seen >90 days ago), or 'visible' (recent web activity detected). Use to identify which in-pipeline accounts are invisible to your tracking and trigger outbound, direct mail, or LinkedIn outreach for dark/lapsed accounts in key pipeline stages. Requires BigQuery mode. |
| get_target_account_activityB | Return the daily activity history for a specific target account: web sessions (today/7d/30d/90d), pricing and demo visits, paid touchpoints, intent spikes, and coverage completeness score. Use to build a longitudinal engagement chart or brief a sales rep before an outreach call. Requires BigQuery mode. |
| get_campaign_performance_metricsA | Query daily campaign spend, impressions, clicks, and platform-reported conversions across all active channels (Meta, Google Ads, TikTok, Reddit) from the unified |
| get_campaign_downstream_roiA | Compare campaign performance across three measurement layers using the This view aggregates all-time metrics per campaign (no date windowing inside the view). Use |
| get_monthly_budget_pacingA | Retrieve current calendar-month pacing status for all active campaigns from the This view is always scoped to the current calendar month — no date filter is available. Results are capped at 150 rows. Requires PAID_MEDIA_GCP_PROJECT and PAID_MEDIA_BQ_DATASET. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| campaign_performance_review | Generate a structured performance review for a campaign over a given period, including pacing analysis and recommendations. |
| team_weekly_report | Generate a weekly performance report for a media team across all their campaigns. |
| attribution_analysis | Explain how different attribution models would affect campaign credit allocation and recommend the best model for a given objective. |
| budget_pacing_check | Check whether all active campaigns are on track to deliver their budgets by end of flight. |
| channel_mix_analysis | Analyze the current channel/platform mix and recommend optimizations based on performance and objectives. |
| test_and_learn_review | Review the full test-and-learn history for a team, summarize key learnings, and recommend next tests based on gaps in the testing roadmap. |
| audience_strategy_review | Review the full audience strategy for a platform: first-party segments available, lookalike setup, third-party layers in use, and recommendations for improving targeting efficiency. |
| measurement_audit | Audit the full measurement and tracking setup: identify gaps, deduplication risks, signal quality issues, and attribution reliability concerns. |
| asset_readiness_check | Check whether assets are ready for a campaign launch: verify specs compliance, identify missing sizes or formats, and confirm asset locations. |
| create_campaign_brief | Design a new paid media campaign using your team's historical performance, audience library, attribution setup, and platform knowledge. Produces a structured campaign brief ready for implementation. For GMP platforms, optionally outputs a bulk upload file. |
| optimize_campaign | Analyze a campaign's performance and produce a prioritized optimization action list. For GMP campaigns, optionally output bulk upload files with the changes pre-populated. |
| analyze_performance | Generate a comprehensive performance analysis across all campaigns for a team or the full portfolio. Cross-references benchmarks, team targets, and historical trends. |
| create_report | Generate a formatted performance report for a specific audience (executive, media team, client, internal) using your configured reporting templates. |
| generate_attribution_report | Generate a cross-channel attribution analysis comparing how different attribution models distribute credit across platforms and campaigns, and recommend the optimal model for each use case. |
| generate_bulk_upload | Generate a ready-to-upload bulk file for DV360 (SDF), SA360 (Bulksheet), or CM360 (Trafficking Sheet) based on a campaign brief or optimization action list. |
| diagnose_tracking_drop | Watchdog workflow: diagnose a suspected tracking degradation across the full pipeline. Checks signal capture rates, CRM null fields, and active alerts, then produces a structured anomaly report identifying the break point and likely cause. |
| optimize_high_value_pathways | Analyst workflow: identify campaigns that are driving outsized pipeline contribution but are being underfunded, and recommend precise budget reallocations grounded in multi-touch attribution data. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Paid Media MCP — System Context | Start here. Describes what data this MCP server has, what tools are available, and how to answer paid media questions without asking for credentials. |
| Company & Team Overview | Company metadata, all teams, and their account/platform assignments |
| All Campaigns | Full list of all campaigns across all teams and platforms |
| Team Structure | All teams, their members, objectives, KPIs, and account assignments |
| Attribution Models | All attribution configurations including models, windows, and conversion events |
| Reporting Templates | All reporting and dashboard templates by audience and cadence |
| Asset Library | DAM system info, asset categories, naming conventions, and per-platform specs |
| Testing Program | Testing methodology, tools, and full test history (active, planned, completed) |
| Audience Library | First-party audiences, data providers, onboarding platforms, lookalike strategy, and third-party layers |
| Measurement & Tracking Setup | Tag management, pixels, conversion APIs, CM360 u-variables, website data capture, and measurement partners |
| GMP Platform Bulk Upload Schemas | DV360 SDF, SA360 Bulksheet, and CM360 Trafficking Sheet schemas with field definitions, valid values, and org defaults |
| Identity Schema Reference | The paid-media-schema identity layer table schemas: identity_signals, identity_entities, identity_entity_signals, identity_stitching_log. Read this before writing any SQL that joins on entity_id, namespace_id, or identifier_value. Also includes the namespace category taxonomy and confidence scoring rules. |
| Attribution Schema Reference | The paid-media-schema attribution layer table schemas: attribution_paths, attribution_runs, attribution_results, attribution_channel_summary. Read this before writing attribution SQL or interpreting model outputs. Includes column descriptions, the credit_weight formula logic, and join keys. |
| Attribution Milestones & Model Config | B2B pipeline stage definitions and attribution model weight configurations. Defines what each conversion_type means in the pipeline (Lead → MQL → SQL → Opportunity → Won), which touches get credit at each stage, and the configured model weights. Read this before analyzing attribution results to understand what 'good' looks like and which conversion types correspond to which pipeline stages. |
| Reporting Views Schema Reference | The paid-media-schema reporting layer view schemas (06_reporting.sql): v_campaign_performance, v_pacing_status, v_roas_comparison, v_channel_efficiency, v_ad_performance, v_keyword_performance, v_daily_performance. Read this before calling any get_*_report or get_*_performance MCP tools to understand what columns are returned and how the views join underlying tables. |
| Account Analytics Overview | Summary of B2B dark funnel visibility: top target accounts by intent, dark funnel coverage breakdown (dark/lapsed/visible), and recent intent spikes. Read this at the start of any ABM or account analytics session to understand which accounts are heating up and which are invisible to your tracking. |
| Autonomous Agent Status | Current status of all three autonomous agents: latest Watchdog alerts, most recent Analyst attribution run, and any Operator actions pending approval. Read this at the start of any analysis session to understand the current data quality and what the agents have found since the last run. |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kenlim5656/paid-media-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server