HTML email tools for AI agents
Every MailCraft Studio tool is open to agents too: an MCP server and a REST API that does the same work. A free MailCraft Studio account is all it takes. When an agent writes an email it can check compatibility, hand the user a link to real client previews, and get the code ready for the backend.
MCP server
Endpoint: https://mailcraftstudio.com/mcp. Transport: Streamable HTTP. Authentication: OAuth 2.1 (the client opens the MailCraft Studio sign-in and asks for consent when connecting) or an API key from the account page (Authorization: Bearer mc_...). Tools work with that account's limits and saved templates.
Claude Code
claude mcp add --transport http mailcraft https://mailcraftstudio.com/mcpSign in with the /mcp command on first use. With an API key: claude mcp add --transport http mailcraft https://mailcraftstudio.com/mcp --header "Authorization: Bearer mc_..."
Claude (claude.ai and desktop)
Settings → Connectors → Add custom connector, enter https://mailcraftstudio.com/mcp as the URL, then Connect and sign in.
ChatGPT
Settings → Apps & Connectors → Create (developer mode). Server URL https://mailcraftstudio.com/mcp, authentication OAuth.
Cursor, VS Code and other MCP clients
{
"mcpServers": {
"mailcraft": { "url": "https://mailcraftstudio.com/mcp" }
}
}Tools
check_email_html: Finds what breaks in real clients: Gmail clipping (102 KB), flex/grid/float/background images in Outlook for Windows, scripts, external CSS, missing alt text and more, each with affected clients and a fix.preview_link: Returns a link that opens the HTML in 9 client and device previews. The template lives in the link's # fragment and never reaches the server.convert_html: Converts HTML into a C# ($@"...") string or a Node.js template literal.minify_html: Strips whitespace and comments and reports the size before and after.format_html: Pretty-prints HTML with Prettier.list_email_clients: Lists the previewed clients and devices.list_email_templates: Lists ready-made Outlook- and Gmail-safe templates (welcome, verification code, password reset, order, shipping, newsletter) with their variables.get_email_template: Returns a template's full HTML.send_test_email: Sends the template as a real email to the member's own account address (5 per day).save_template: Saves HTML to the member's account, where it also opens in the web editor. Pass an existing id to update it.list_saved_templates: Lists the templates saved in the account.get_saved_template: Returns a saved template's HTML.get_account: Returns the account email, limits and today's usage.
Suggested flow: write the HTML, fix every error and warning from check_email_html, give the user a preview_link, then use convert_html for backend code if needed.
Test emails
send_test_email sends the template only to the connected account's own email address; it cannot send anywhere else. Each account can send 5 test emails a day. REST equivalent: POST /api/v1/test-email.
In-browser agents (WebMCP)
In browsers that support WebMCP, the editor page registers get_email_html, open_email_html, check_email_html and get_share_link. WebMCP is a W3C Community Group draft and browser support is still limited.
REST API
Base URL https://mailcraftstudio.com/api/v1. Full schema: OpenAPI 3.1.
Every request needs an API key: Authorization: Bearer mc_.... Create one on the account page.
curl -X POST https://mailcraftstudio.com/api/v1/check \
-H "authorization: Bearer mc_..." \
-H "content-type: application/json" \
-d '{"html": "<table role=\"presentation\">...</table>"}'POST /check: compatibility reportPOST /preview-link: preview link (lang:enortr)POST /convert:targetcsharpornodejs, optionalminifyPOST /minify,POST /formatGET /clients: previewed clientsGET /templates,GET /templates/{slug}: ready-made templatesPOST /test-email: test email to the account addressGET /me: account, limits, today's usageGET|POST /me/templates,GET|PUT|DELETE /me/templates/{id}: saved templates
Limits and privacy
- 120 requests per minute per account. Responses carry
RateLimit-*headers; over the limit you get 429. - 5 test emails a day, up to 200 saved templates. HTML can be up to 512 KB.
- HTML sent for checking, conversion and previews is processed in memory only. Only templates you choose to save are stored in your account. Test emails are delivered through Resend.
- CORS is open, so browsers can call it too.
Discovery files
- /llms.txt and /llms-full.txt
- /mcp/server-card (MCP Server Card, draft standard)
- /.well-known/ai-catalog.json and /.well-known/api-catalog
- A Markdown version of every page: add
.mdto the URL (/index.mdfor the home page).