AI Template Studio (MCP)
Create responsive, editable SendMailOS templates from ChatGPT, Claude, and other MCP clients.
The SendMailOS Template Studio MCP lets an AI assistant create and update email templates directly in your workspace. Templates are saved as the same structured rows, columns, and blocks used by the drag-and-drop editor — not as a flattened HTML file — so every heading, image, button, background, spacer, and shape stays editable afterward.
MCP endpoint
https://dash.sendmailos.com/api/mcpUse this URL when your MCP client asks for a remote MCP server or custom connector URL. The server uses Streamable HTTP and OAuth 2.0 with PKCE.
You do not paste a SendMailOS API key or login token into ChatGPT or Claude. Your MCP client opens SendMailOS, you sign in normally, choose the organizations to connect, and approve template access. Tokens are issued and refreshed through OAuth.
Connect from ChatGPT or Claude
- Copy
https://dash.sendmailos.com/api/mcpfrom Developers → Template MCP. - Add a custom remote MCP app or connector in your AI client and paste the URL.
- Continue to SendMailOS, sign in normally, check the organizations to connect, and approve access.
SendMailOS and the AI client automatically register the callback URL, configure PKCE, select the template scopes, and establish refresh access. You do not need to create an OAuth app or copy a client ID.
The connection appears under Connected Apps in your SendMailOS dashboard, where you can revoke it at any time. ChatGPT, Claude, and other clients work when they support remote Streamable HTTP MCP servers with OAuth discovery.
What the assistant can do
- List the names and IDs of approved organizations with
list_organizations. - List and inspect templates in the organization you specify.
- Create a complete responsive template from a campaign brief.
- Update a template's structured document without flattening it.
- Render the document into email-safe HTML.
- Add columns, section backgrounds, buttons, images, spacing, dividers, and decorative shapes supported by the SendMailOS editor.
For the best result, include the email category, audience, visual direction, brand colors, desired sections, call to action, and mobile behavior in your prompt.
Create a premium product-launch email for a skincare brand.
Use warm ivory, terracotta, and charcoal; include a curved decorative shape,
a hero image, three benefit cards, a testimonial, and one strong CTA.
Keep every part editable and make the mobile layout stack cleanly.
Save it as "Autumn Serum Launch" in SendMailOS.How editability works
The MCP writes a versioned template document. Each element has its own type, content, styles, and responsive settings. SendMailOS then renders email-safe HTML from that document when previewing or sending.
That means users can open an AI-generated template in the visual editor and still drag, reorder, duplicate, restyle, or delete individual blocks. Generated HTML remains an output of the editable document, rather than becoming the source of truth.
Choose an organization in chat
Approve FSHF and SweetSpot on the same consent screen, then use ordinary prompts:
Create a match-day template in FSHF.Use SweetSpot for the next template.The assistant calls list_organizations to resolve the organization name, then
passes its organization_id to every data tool. If the name is ambiguous, or
multiple organizations are available and none is specified, it asks you to
choose. Each request uses that explicit organization; there is no shared active
organization that another chat or the dashboard switcher can change.
Security and access
Only the organizations checked on the approval screen are available. Current membership and organization status are checked on every request. Joining another organization later does not give the connection access to it. Approve again to add organizations; older tokens keep their original approval.
An existing connection authorized for just one organization stays limited to that organization. Reconnect once and check all the organizations you want to use. Switching between those approved organizations in chat needs no reconnection.
Tool results include the organization used for the request. Templates remain in the organization where they were created; choosing another organization does not move them.
Under an organization's Connected Apps, revoking a connection removes access to that organization while leaving its other approved organizations connected. Revoking the last organization invalidates the connection. Refresh-token replay revokes the whole connection.
The approval grants only the scopes shown on the consent screen. Never send a SendMailOS password, session cookie, API key, or manually copied access token to an AI assistant.
Deployment
Apply the oauth_approved_organizations database migration, then deploy the API
before the web app. The API adds GET /v1/oauth/organizations for approval metadata
and validates X-Organization-ID on data requests. New MCP approvals require
explicit organization selection on every data request; legacy OAuth integrations
retain their original single-organization default.