Skip to main content
Glama

adtech-mcp-server

A Model Context Protocol (MCP) TypeScript SDK v2 server (@modelcontextprotocol/server + zod/v4) that equips any MCP-compatible AI host (Gemini, Claude Code, Cursor, VS Code) with deterministic AdTech & Growth Engineering tools: ROAS anomaly auditing, Meta CAPI SHA-256 payload generation, and e-commerce LTV/CAC payback math.


Why Deterministic MCP Tools Matter for AdTech


Related MCP server: genpark-creator-paid-amplification-roi-synthesizer-skill

Protocol Architecture

flowchart LR
    Host["AI Host / Cursor / Claude / Gemini"] -->|"JSON-RPC 2.0 stdio"| Server["McpServer v2"]
    Server -->|"Zod v4 Validation"| T1["audit_roas_anomalies"]
    Server -->|"Zod v4 Validation"| T2["build_meta_capi_event"]
    Server -->|"Zod v4 Validation"| T3["calculate_ltv_cac_payback"]

Quick Start

git clone https://github.com/stephanocamoretti-dotcom/adtech-mcp-server.git
cd adtech-mcp-server
npm install
npm run build
npm run inspect

Scaling Ideas for Production

  1. Streamable HTTP Transport: Swap serveStdio for the MCP v2 HTTP/Hono adapter with OAuth 2.1 bearer verification so remote agency teams can share one hosted AdTech MCP endpoint.

  2. Live Meta & Google Ads Connectors: Connect audit_roas_anomalies directly to Meta Insights API v27.0 and Google Ads GAQL queries for real-time portfolio diagnostics inside chat.

  3. MCP Resources & Prompts: Expose brand-specific target CPA/ROAS guardrails as MCP Resources (adtech://clients/{id}/targets).


References

Available Tools

3 tools
audit_roas_anomaliesA

Detects abnormal ad spend velocity (Z-Score) and ROAS/CPA breaches for Meta Ads or Google Ads campaigns.

Inputs: spend (required), revenue (required), conversions (required), campaignName (required), +2 more.

build_meta_capi_eventA

Normalizes and SHA-256 hashes PII into a Meta Conversions API (Graph v27.0) event payload with deterministic event_id and EMQ score.

Inputs: email, phone, value, fbclid, +3 more.

calculate_ltv_cac_paybackB

Calculates e-commerce gross-profit LTV, LTV:CAC ratio, Day-1 contribution margin, and max scaling CAC ceiling.

Inputs: aov (required), cac (required), grossMarginPct (required), repeatPurchaseRate (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool targets a clearly different job: statistical anomaly detection on ROAS/spend, constructing a Meta CAPI event payload, and LTV/CAC unit-economics modeling. There is no overlap in inputs, outputs, or intent, so an agent can select without confusion.

    Naming Consistency5/5

    All three names use a consistent snake_case verb_noun pattern (audit_, build_, calculate_) with domain-specific qualifiers. The verb variation reflects genuinely different actions rather than inconsistency.

    Tool Count4/5

    Three tools is at the low end for an adtech server and the three functions feel somewhat like a grab bag rather than one cohesive workflow. Each tool is substantive and earns its place, but the surface is thin.

    Completeness3/5

    The server covers anomaly detection, CAPI event building, and LTV/CAC math, but lacks obvious adjacent operations: fetching campaign metrics from Meta/Google, budget pacing or reallocation recommendations, and any alerting or remediation after an anomaly is detected. Detection without follow-through leaves dead ends.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      Hosted MCP server that gives AI agents read and write access to your full marketing & ecommerce stack — Google Analytics, Search Console, Google & Meta Ads, Shopify, WooCommerce, Shopware, Slack and LinkedIn. 100+ tools across 10 connectors. BYOK, OAuth 2.1.
      -
    • F
      license
      Not graded
      quality
      B
      maintenance
      Enables modeling and synthesis of creator paid amplification ROI, spark ads performance, and whitelisted return on ad spend (ROAS) for influencer marketing campaigns. It provides deterministic, zero-dependency calculations through MCP for use by AI agents and automation workflows.
      8
      -
    • A
      license
      B
      quality
      B
      maintenance
      Cookieless web analytics your AI agent can read. Self-host it on your own Cloudflare account (Workers + D1) and read visits, sources, pages, countries and custom events over MCP. Prefer hosted? https://a.measuremy.site/mcp (OAuth sign-in, no key).
      20
      1
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Deterministic marketing math for AI agents: 62 engines that compute LTV:CAC, CAC payback, pipeline coverage, A/B test significance, budget allocation, pricing and retention from your own numbers. Runs locally with Node 18+, makes no network calls and stores no data.
      5
      1
      MIT