← All guides marginal.sh

JSON Email Campaign API: Run Tests Through Structured Calls

Updated June 2026 · Hosted email MCP server

If you're searching for a JSON email campaign API, you probably want to drive sends and subject line experiments programmatically — not through a UI. marginal exposes exactly that through an MCP server, so AI agents and scripts can request structured JSON in and get structured results back.

What a JSON email campaign API looks like here

marginal is a hosted email marketing MCP server. Instead of a sprawling REST surface, it exposes a focused set of tools that your agent calls with JSON arguments and reads back as JSON. Every step of a campaign maps to one tool, which keeps the interface predictable for code generation.

Why agents prefer structured tool calls over raw HTTP

An AI agent email marketing workflow benefits from typed tools far more than from hand-rolled HTTP requests. The MCP layer describes each tool's inputs and outputs, so the model knows what JSON to send and how to parse the response — without you writing glue code for every endpoint.

That means a subject line A/B test can be reasoned about end to end: the agent generates variants, launches the test, waits for data, and reads lift, all inside the same conversation or pipeline.

Connecting and authenticating

marginal is fully hosted — there's no self-hosted server to deploy or maintain. You point a compatible MCP client at the endpoint and authenticate with a Bearer API key.

Clients including Cursor, Claude Desktop, Claude Code, OpenAI Codex, Windsurf, Cline, Continue, and Zed can all reach the same JSON tools.

Get started without committing budget

The free tier covers 100 experiments per month, which is plenty for wiring up a JSON email campaign API into your stack and validating a subject line A/B test workflow end to end. Connect the marginal email MCP server, run a generate_variants call, and confirm get_results returns the metrics you expect 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