← All guides marginal.sh

Marginal Tracking Links Documentation

Updated June 2026 · Hosted email MCP server

This page explains how tracking links work in marginal, the hosted email marketing MCP server. Whenever you run a subject line A/B test, marginal wraps and instruments your sends so opens and clicks roll up into the results your AI agent reads back.

What tracking links do in marginal

When you call launch_test, marginal sends each variant through its managed delivery layer and attaches tracking automatically. You don't generate or sign links yourself — the server handles wrapping click URLs and embedding open pixels so every interaction is attributed to the correct variant and recipient.

Reading tracking data with get_results

Tracking links exist to feed your metrics. After a subject line A/B test launches, call get_results to pull open and click counts per variant along with within-test lift — the relative performance of each variant against the others in the same experiment.

Because the data is scoped to a single test, you get clean comparisons without stitching together raw event logs. AI agent email marketing workflows can poll get_results, evaluate lift, then call recommend_next to decide the following move.

Connecting and authenticating

marginal is a hosted email MCP server — there is nothing to self-host. Point your MCP client at https://marginal.sh/mcp and authenticate with a Bearer API key in the marg_live_... format. Once connected, the generate_variants, launch_test, get_results, and recommend_next tools are available to the agent.

Supported clients include Cursor, OpenAI Codex, Claude Desktop, Claude Code, Windsurf, Cline, Continue, and Zed. Tracking link instrumentation is identical across all of them since it happens server-side during sends.

Where to go next

For tool schemas, request and response shapes, and field-level definitions of the tracking metrics described here, see the full marginal docs. The free tier covers 100 experiments per month, which is enough to validate your subject line testing loop end to end before scaling up.

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.

Documentation · Sign up · FAQ