Skip to main content
Glama
Marketing Ops MCP

Marketing Ops MCP

Marketing Ops MCP

Tests License: PolyForm Perimeter 1.0.0

Original Python tools for evidence-first marketing work through ChatGPT-compatible MCP, OpenAI Responses agents, or a local CLI. Version 0.1.1 is an independently implemented alpha release; it is not a fork, a renamed Claude project, or a claim of feature parity with larger reference projects.

Working capabilities

  • calculate_funnel: explicit-denominator conversion rates, cost per lead, media cost per customer and ROAS.

  • reconcile_transactions: exact-ID outer join with decimal arithmetic, duplicate detection and attribution-scope gates.

  • design_experiment: two-proportion, fixed-horizon sample-size approximation.

  • analyze_experiment: sample-ratio checks, stopping-horizon gate, sparse-data gate and two-sided comparison.

  • build_campaign_url: normalized UTM parameters with explicit replacement and query preservation.

These are analysis tools, not CRM connectors or autonomous campaign operators. They do not infer incrementality, fully loaded CAC from media spend, lifetime value from one period, or causal attribution. Experiment assumptions and approximation limitations are included in results.

Related MCP server: 1ClickReport MCP Server

Run the offline example

Python 3.11+ is required. No API key is needed for this example.

python -m venv .venv
. .venv/bin/activate
pip install -e '.[dev]'
marketing-ops-mcp tools
marketing-ops-mcp run calculate_funnel examples/demo.json --out output/demo
pytest -q
ruff check .

The command creates report.json, report.csv, report.md and an escaped report.html. JSON contains the complete structured result; CSV contains tabular findings or metrics when available. No output is published automatically. Inputs are validated and bounded. Errors fail explicitly instead of producing invented success.

Use with ChatGPT and OpenAI

marketing-ops-mcp serve
# Local HTTP endpoint: http://127.0.0.1:8765/mcp
# Generate and export a random secret (keep it private):\nexport MARKETING_OPS_HTTP_TOKEN="$(python -c 'import secrets; print(secrets.token_urlsafe(48))')"\nmarketing-ops-mcp serve --transport streamable-http
# Requires OPENAI_API_KEY and OPENAI_MODEL in your environment:
marketing-ops-mcp agent examples/task.txt --out output/agent

See ChatGPT connection instructions. A ChatGPT connection needs a reachable endpoint or supported tunnel; this repository is not already hosted or connected to your account. HTTP now requires a bearer token in the Authorization header and fails closed without MARKETING_OPS_HTTP_TOKEN (minimum 32 characters). It remains loopback-only and must not be exposed directly; use a TLS gateway with access controls for remote clients. Deterministic MCP tools need no OpenAI key. The agent runner is optional and makes billable API calls.

Repository layout

Path

Purpose

src/marketing_ops/tools.py

Typed tool registry and domain entry points

src/marketing_ops/agent.py

Bounded Responses function-calling loop

src/marketing_ops/server.py

Official MCP SDK server

src/marketing_ops/reports.py

Safe, portable deliverables

examples/

Synthetic inputs and agent task

tests/

Domain, export, agent and real MCP protocol tests

docs/

Architecture, integration, validation and research

Quality and scope

Tests cover important numerical, validation and trust boundaries, including a real MCP stdio discovery/call round trip. OpenAI agent tests use a fake client; they do not prove live model quality. CI runs tests, lint and dependency auditing across Python 3.11–3.13. See validation for the recorded local result and untested deployment boundaries.

This release prioritizes inspectable behavior over code volume. It does not claim to equal the references' line counts or broad feature sets. Scope and research explains the conceptual inspiration and remaining gaps. Source implementation was written independently; reference README descriptions informed the problem selection.

Read SECURITY.md before deployment. Contributions follow CONTRIBUTING.md and the community conduct policy. Current release: PolyForm Perimeter 1.0.0 (source-available, restrictions on competing products). The original v0.1.0 release remains available under the historical MIT licence. See licensing history and commercial-use guidance.

Available Tools

5 tools
analyze_experimentB
Read-onlyIdempotent

Review a completed fixed-horizon experiment with sample-ratio and approximation gates.

Inputs: payload (required).

build_campaign_urlB
Read-onlyIdempotent

Build a normalized UTM URL while preserving unrelated parameters.

Inputs: payload (required).

calculate_funnelC
Read-onlyIdempotent

Calculate explicit-denominator conversion and acquisition metrics for one cohort.

Inputs: payload (required).

design_experimentB
Read-onlyIdempotent

Estimate a fixed-horizon two-proportion experiment sample size.

Inputs: payload (required).

reconcile_transactionsC
Read-onlyIdempotent

Compare exact transaction IDs only when declared attribution scopes match.

Inputs: payload (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool targets a distinct operation: funnel math, transaction reconciliation, experiment sizing, experiment review, and UTM construction. design_experiment vs analyze_experiment are clearly separated by lifecycle stage (pre-run sizing vs post-run review), leaving no realistic misselection risk.

    Naming Consistency5/5

    All five tools follow a consistent snake_case verb_noun pattern (calculate_, reconcile_, design_, analyze_, build_). The convention is uniform and the verbs accurately signal the action type.

    Tool Count4/5

    Five tools is on the lean side but each maps to a genuinely distinct analytical task with no filler. The surface is well-scoped, though it sits at the low end of what a marketing-ops server might warrant.

    Completeness4/5

    The set covers a coherent core: funnel conversion, transaction reconciliation, the full experiment lifecycle (design plus analysis), and campaign URL construction. Gaps exist around data ingestion, cohort/segment definition, and results export or reporting, but core workflows are workable.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      First-party web analytics MCP server for AI agents, providing 42 tools to query traffic, events, funnels, conversions, sources, and performance data.
      40
      40 npm
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Provides 40 MCP tools to connect AI assistants like Claude to marketing platforms (Google Ads, Meta Ads, GA4, Search Console, Stripe) for reading, analyzing, managing, and monitoring ad campaigns and analytics through natural language.
      -
    • 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
      Not graded
      quality
      C
      maintenance
      Lets an MCP client collect the marketing evidence behind any URL — ad libraries, social, SEO, pixels, founders, Reddit, positioning history — as a token-cheap scorecard plus citable evidence index and unknowns. Enables the agent to fetch specific evidence, follow a per-channel analysis method, validate citations and grounding, and produce a step-by-step playbook for copying the growth engine.
      74
      MIT