Use Cases
Log In

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

  1. Open Settings → Connectors and choose Add custom connector.
  2. Enter https://www.realmailers.com/mcp as the URL and your client ID and secret under Advanced settings. The redirect URI to register is https://claude.ai/api/mcp/auth_callback.
  3. 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.

  1. Open Settings → Apps → Advanced settings and turn on Developer mode.
  2. Choose Create app, give it a name and enter https://www.realmailers.com/mcp as the MCP server URL.
  3. 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.
  4. 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.

  1. Open grok.com/connectors and choose New Connector then Custom.
  2. Enter https://www.realmailers.com/mcp as the URL and your client ID and secret in the OAuth settings. The redirect URI to register is https://www.cursor.com/agents/mcp/oauth/callback.
  3. 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.

  1. Pick a template with list_templates. Own design templates take your artwork, preset templates are filled from your listing details and photos.
  2. Create the campaign with create_campaign and complete it with update_campaign. Artwork, photos, logos and CSVs are given as publicly accessible URLs, data URLs or Base64 strings. Big files are uploaded with create_file_upload first.
  3. Choose the recipients: the homes nearest to an address (targeting_method: map), or your own list of recipients or CSV (targeting_method: own_list).
  4. Review it with get_campaign: steps.payment is true once it can be sent, price is the total and thumbnails and proof show the mailpiece.
  5. 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_url is 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_url sign 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_campaign returns them once they are ready.
  • Tool errors (invalid parameters, a declined card) come back as tool results with isError: true and 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" }
        }
      }
    }
  }'