Marginal Tracking Links Documentation
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.
- Click tracking: outbound links are rewritten so marginal records which variant earned the click
- Open tracking: a pixel records opens per variant for rate calculations
- Attribution: events tie back to the test and variant that produced them
- No setup: tracking is enabled as part of managed sends, not a separate config step
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.
- Open rate and click rate per variant
- Within-test lift to compare variants directly
- Sample sizes so an agent can judge confidence before acting
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.
- Full reference: https://marginal.sh/docs/
- MCP endpoint: https://marginal.sh/mcp
- Registry: sh.marginal/mcp
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