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
访问服务器

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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选