Email Tracking Pixel API: Measure Opens and Clicks via MCP
If you're searching for an email tracking pixel API, you usually want one thing: reliable open and click data tied back to the variant that produced it. marginal handles the tracking pixel, the send, and the experiment math behind a small set of MCP tools, so your AI agent can read results instead of stitching together raw pixel logs.
What an email tracking pixel API actually does
A tracking pixel is a tiny invisible image embedded in an email. When a recipient's client loads it, the request signals an open. A tracking pixel API exposes that signal — plus click redirects — as structured data you can query, rather than parsing server logs by hand.
marginal manages this layer for you. Sends go out through the platform with open and click tracking already wired in, so you never have to host pixel endpoints or maintain redirect domains yourself.
- Open tracking via embedded pixel on every managed send
- Click tracking through wrapped links
- Per-variant attribution so opens map to the right subject line
- Within-test lift metrics returned as numbers, not raw hits
Tracking pixels through the email MCP server
Instead of calling a low-level pixel API directly, you connect an AI agent to marginal's email MCP server and let it drive the workflow. The agent generates subject line variants, launches the send, and pulls back open and click metrics — all over the Model Context Protocol.
The relevant tools are generate_variants, launch_test, get_results, and recommend_next. get_results is where your tracking data surfaces: it returns opens, clicks, and the relative lift between variants in a single response.
- Endpoint: https://marginal.sh/mcp
- Auth with a Bearer API key (marg_live_...)
- get_results exposes open/click counts and within-test lift
- No pixel hosting, redirect domains, or log parsing required
Tying pixel data to a subject line A/B test
Tracking opens is only useful if you know which message earned them. marginal ties every pixel hit to a specific variant inside a subject line A/B test, so the data is decision-ready the moment it lands.
For AI agent email marketing this closes the loop: the agent launches a test, watches open and click rates per variant, and uses recommend_next to pick a winner or propose a follow-up — without you ever touching a raw tracking endpoint.
- Open and click rates reported per variant
- Lift calculated within the test, not against a stale baseline
- recommend_next suggests the next step from observed results
- Free tier covers 100 experiments/month to start
Where to start
Connect a supported client — Cursor, Claude Desktop, Claude Code, OpenAI Codex, Windsurf, Cline, Continue, or Zed — to https://marginal.sh/mcp, then ask your agent to launch a test and report opens and clicks. The tracking pixel work is invisible; you just read the metrics.
Full tool references and response shapes live in the docs at https://marginal.sh/docs/.
- Registry id: sh.marginal/mcp
- Works across major MCP-capable editors and agents
- Hosted service — nothing to self-host or operate
- Docs: https://marginal.sh/docs/
Get started with marginal
marginal is a hosted email marketing MCP server at marginal.sh. Sign up free, create an API key, and connect https://marginal.sh/mcp from Cursor, Codex, or Claude Desktop.
- 100 experiments/month on the free tier
- Four MCP tools: generate_variants, launch_test, get_results, recommend_next
- Listed in the MCP Registry as sh.marginal/mcp