MCP Server
The RealMailers Model Context Protocol server lets AI assistants such as Claude create, review and send RealMailers campaigns on behalf of a signed in user: pick a template, upload artwork or fill in a preset template, target homes on the map or mail your own list, then pay and schedule the mailing.
Server URL: https://www.realmailers.com/mcp
Connecting
The server speaks MCP over HTTP (JSON-RPC requests sent with POST) and authenticates users with OAuth 2.0. Clients discover the authorization server from https://www.realmailers.com/.well-known/oauth-protected-resource and its endpoints from https://www.realmailers.com/.well-known/oauth-authorization-server.
To get OAuth client credentials, fill out this form with the redirect URI of your MCP client:
https://forms.gle/cTkzzfMjaaEHmtEf9
Claude
- Open Settings → Connectors and choose Add custom connector.
- Enter
https://www.realmailers.com/mcpas the URL and your client ID and secret under Advanced settings. The redirect URI to register ishttps://claude.ai/api/mcp/auth_callback. - Choose Connect and sign in with your RealMailers account.
ChatGPT
Custom MCP apps need developer mode, on Business, Enterprise and Edu workspaces an admin turns it on for the workspace first.
- Open Settings → Apps → Advanced settings and turn on Developer mode.
- Choose Create app, give it a name and enter
https://www.realmailers.com/mcpas the MCP server URL. - Set Authentication to OAuth and enter your client ID and secret under the advanced OAuth settings, with PKCE turned on. Register the redirect URI shown there with the form above.
- Confirm you trust the app, choose Create and sign in with your RealMailers account.
Grok
On Business and Enterprise workspaces a team admin provisions the connector in the xAI cloud console first.
- Open grok.com/connectors and choose New Connector then Custom.
- Enter
https://www.realmailers.com/mcpas the URL and your client ID and secret in the OAuth settings. The redirect URI to register ishttps://www.cursor.com/agents/mcp/oauth/callback. - Connect and sign in with your RealMailers account.
Other clients
Add a remote (HTTP) MCP server with the URL above. On the first request the server answers 401 with a WWW-Authenticate: Bearer header and the client starts the OAuth flow. Requests are authorized with the access token:
Authorization: Bearer ACCESS_TOKEN Access tokens expire after 24 hours, clients renew them with the refresh token.
Mailing a campaign
The tools follow the same steps as the RealMailers editor. Every tool is described on the Tools.
- Pick a template with
list_templates. Own design templates take your artwork, preset templates are filled from your listing details and photos. - Create the campaign with
create_campaignand complete it withupdate_campaign. Artwork, photos, logos and CSVs are given as publicly accessible URLs, data URLs or Base64 strings. Big files are uploaded withcreate_file_uploadfirst. - Choose the recipients: the homes nearest to an address (
targeting_method: map), or your own list of recipients or CSV (targeting_method: own_list). - Review it with
get_campaign:steps.paymentistrueonce it can be sent,priceis the total andthumbnailsandproofshow the mailpiece. - Send it with
send_campaign.
Payment
send_campaign charges the account, assistants are instructed to confirm the price with the user first and to offer the available credits. How it pays depends on the account:
- Accounts with monthly invoicing are billed on their next invoice.
- Other accounts pay with their credits and / or a card saved on the account (
list_payment_methods). - When neither covers the price, or the card asks for confirmation (3D Secure), nothing is charged and a
payment_urlis returned where the user finishes the payment in the browser.
Sent campaigns can be cancelled with cancel_campaign until they go to print, by default 15 minutes after sending (see scheduled_at).
Notes
- Prices and credits are in cents.
- The links from
get_campaign_edit_urlsign the user in to the editor. They expire after 30 minutes, so get a new one each time. - Thumbnails and the proof render in the background after a change,
get_campaignreturns them once they are ready. - Tool errors (invalid parameters, a declined card) come back as tool results with
isError: trueand a message describing the issue.
curl -X POST https://www.realmailers.com/mcp \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_campaign",
"arguments": {
"name": "Spring Mailer",
"designs": [
"https://www.example.com/front.pdf",
"https://www.example.com/back.pdf"
],
"sender": {
"name": "ACME REALTY",
"street_address": "20 W 34TH ST",
"city": "NEW YORK",
"state": "NY",
"zip": "10001"
},
"targeting_method": "map",
"map_targeting": {
"postcard_quantity": 500,
"center": { "address": "20 W 34th St, New York, NY 10001" }
}
}
}
}'