Marketing Agent Eval Harness

Marketing Agent Eval Harness

Provides two MCP tools for querying a synthetic marketing SQLite database and running agent evaluation cases, with read-only SQL guarding and deterministic planning. The server communicates over stdio and supports initialization handshake and tool listing.

Category
Visit Server

README

Marketing Agent Eval Harness

A Python portfolio application for testing SQL-grounded agent workflows over a synthetic marketing dataset. It exposes two tools through an official stdio Model Context Protocol (MCP) server and keeps the supporting planner, SQL guard, and regression evaluation logic inspectable.

What it does

  • Seeds a local SQLite warehouse with synthetic campaign, spend, conversion, and revenue data.
  • Maps a small set of analytics questions to deterministic, read-only SQL and returns the answer with the selected intent, SQL, and result rows.
  • Rejects write operations and multi-statement SQL before a query reaches SQLite.
  • Runs JSON evaluation cases, produces Markdown and JSON reports, and applies a configurable quality gate.
  • Exposes query_marketing_analytics and run_marketing_agent_evals through the official MCP Python SDK over stdio.
  • Retains a small JSON-RPC-shaped adapter so the same shared tool service can be tested independently of an MCP client.

Architecture

flowchart LR
  A["MCP client"] --> B["Official stdio MCP server"]
  B --> C["Shared tool service"]
  C --> D["Deterministic planner"]
  D --> E["Read-only SQL guard"]
  E --> F["SQLite marketing warehouse"]
  C --> G["Eval runner"]
  G --> H["JSON and Markdown reports"]

The MCP server is an interface layer only. It calls the same service functions as the existing JSON-RPC-shaped adapter, so tool behavior is tested in one place rather than duplicated.

Run locally

Use Python 3.10 or newer:

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e .
python -m unittest discover -s tests -v
marketing-agent-eval seed-db
marketing-agent-eval ask "Which campaign has the best ROAS?"
marketing-agent-eval eval --cases evals/marketing_eval_cases.json --report-dir reports

The supplied evaluation cases currently report:

cases: 4
passed: 4
score: 1.00
quality_gate: pass

Run the MCP server

marketing-agent-eval mcp

The command starts a stdio server. Configure a compatible MCP client to run the installed marketing-agent-eval executable with the mcp argument. The server exposes:

  • query_marketing_analytics(question, database_path) - returns the answer, intent, read-only SQL, result rows, and row count.
  • run_marketing_agent_evals(cases_path, database_path) - returns case counts, score, quality gate, and per-case checks.

The test suite launches the server through stdio, completes the MCP initialization handshake, lists both tools, and calls the analytics tool.

Commands

marketing-agent-eval seed-db
marketing-agent-eval ask "Show spend by channel"
marketing-agent-eval eval --cases evals/marketing_eval_cases.json --report-dir reports
marketing-agent-eval mcp-sample
marketing-agent-eval mcp

Evidence boundaries

This is a portfolio application, not a production marketing platform. It uses synthetic data and deterministic planner rules; it does not call a live LLM, operate an autonomous agent, connect to customer data, or claim Claude Code or enterprise MCP-client usage. The official MCP server is tested locally through stdio, not against a hosted gateway.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured