Skip to content

Connect ClickSend to ChatGPT: Manage SMS, Voice, and Physical Mail

Learn how to connect ClickSend to ChatGPT using a managed MCP server. Automate SMS, voice calls, and physical mail dispatch with AI agents.

Yuvraj Muley Yuvraj Muley · · 9 min read
Connect ClickSend to ChatGPT: Manage SMS, Voice, and Physical Mail

If you want your AI agents to send SMS messages, dispatch physical letters, trigger voice calls, or manage fax communications, you need to connect ClickSend to ChatGPT. While HTTP requests are straightforward, giving an LLM full read-and-write access to a unified communications API requires a translation layer known as a Model Context Protocol (MCP) server. If your team uses Claude instead, check out our guide on connecting ClickSend to Claude or explore our broader guide on connecting ClickSend to AI Agents.

ClickSend provides a powerful API for multi-channel messaging. Exposing it directly to a foundation model is complex. LLMs do not inherently understand how to format binary uploads for faxing, structure nested arrays for bulk SMS, or manage asynchronous delivery receipts. You either dedicate sprint cycles to building, hosting, and maintaining a custom MCP server, or you use a managed infrastructure layer to handle the boilerplate.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for ClickSend, connect it natively to ChatGPT, and execute multi-channel communications using natural language.

The Engineering Reality of the ClickSend API

A custom MCP server is a self-hosted integration layer that translates an LLM's tool calls into REST API requests. If you decide to build a custom MCP server for ClickSend, you own the entire API lifecycle. ClickSend's API has specific quirks that break standard CRUD assumptions. Here is what makes this integration specifically tricky:

Multi-Channel Schema Discrepancies

ClickSend is not a single tool - it is an orchestration engine for SMS, MMS, voice, fax, and physical post. Each channel requires a completely different request schema. Sending an SMS requires a simple body, to, and source. Sending a physical postcard or letter requires nested objects defining a return_address_id, document structures, template IDs, and margin specifications. If you do not explicitly map these schemas for the LLM inside your MCP server, the model will hallucinate generic fields and the API will reject the payload with 400 Bad Request.

The Two-Step File Upload Dance

You cannot attach a raw file to a fax or physical mail dispatch request. ClickSend forces a two-step process: first, you must upload the media file to the /v3/uploads endpoint. You receive a unique URL or reference string in the response. Second, you inject that exact reference into the subsequent /v3/fax/send or /v3/post/letters/send payload. An LLM cannot execute this sequence successfully unless your MCP server explicitly provides distinct tools and strict contextual instructions linking the outputs of step one to the inputs of step two.

Strict Rate Limiting and 429 Exhaustion

ClickSend enforces rate limits across its endpoints to prevent spam and protect infrastructure. When limits are exceeded, the API returns a 429 Too Many Requests status. It is critical to note that Truto does not automatically retry, throttle, or absorb rate limit errors. When ClickSend returns a 429, Truto passes that HTTP 429 directly to the caller, normalizing the upstream data into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The calling client or the AI agent itself is entirely responsible for implementing the backoff logic. If your client fails to parse the normalized headers, the agent will assume the text message was sent when it was actually dropped.

Asynchronous Delivery Receipts

Sending a message via ClickSend yields an immediate 200 OK from the API, which only confirms the message was queued - not delivered. To track actual delivery, you must poll inbound endpoints or handle webhooks. Instructing an LLM to "tell me when the SMS is delivered" requires providing it with specific tools to poll receipt histories by message_id, otherwise, the model will mistakenly report a successful queue status as a successful delivery.

How to Generate the ClickSend MCP Server

Instead of building custom schema mappers and handling JSON-RPC handshakes yourself, you can use Truto to generate a production-ready MCP server for ClickSend instantly. The MCP feature turns any connected integration into a JSON-RPC 2.0 endpoint compatible with ChatGPT.

You can generate this server via the Truto UI or programmatically via the API.

Method 1: Via the Truto UI

  1. Log into your Truto dashboard and navigate to the integrated account page for your ClickSend connection.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Define a name (e.g., ClickSend Dispatcher) and select your desired configuration (such as allowing only write methods or filtering by specific tags).
  5. Click Save. Copy the generated MCP server URL. This URL contains a secure cryptographic token scoped exclusively to this tenant's ClickSend account.

Method 2: Via the API

For platform engineers who want to automate server provisioning for their users, you can generate the MCP server programmatically using the token management API.

Make a POST request to /integrated-account/:id/mcp with your desired filters:

curl -X POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp \
  -H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "ClickSend Operations",
    "config": {
      "methods": ["read", "write"],
      "require_api_token_auth": false
    }
  }'

The API evaluates the ClickSend integration, checks available tools against your filters, stores a hashed token in a global edge key-value store, and returns the endpoint URL:

{
  "id": "ab12-cd34-ef56",
  "name": "ClickSend Operations",
  "config": {
    "methods": ["read", "write"]
  },
  "expires_at": null,
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f67g8h9i0j..."
}

Keep this url secure. It acts as the routing identifier and authorization layer for your AI agent to execute ClickSend operations.

Connecting the MCP Server to ChatGPT

Once you have your Truto MCP server URL, you need to register it with your ChatGPT environment. You can do this through the ChatGPT UI or manually via an SSE configuration.

Method A: Via the ChatGPT UI

If you are using ChatGPT Plus, Team, or Enterprise, you can add custom connectors directly in the application settings.

  1. Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
  2. Enable Developer mode (MCP support requires this toggle).
  3. Under the MCP servers / Custom connectors section, click Add new server.
  4. Enter a descriptive name (e.g., "ClickSend Gateway").
  5. Paste the Truto MCP URL into the Server URL field and click Save.

ChatGPT will immediately ping the endpoint, execute the MCP initialize handshake, call tools/list, and load the ClickSend capabilities into its context window.

Method B: Via Manual Config File (SSE Transport)

If you are running headless AI agents or prefer file-based configuration (similar to Claude Desktop), you can route requests to the Truto URL using the standard Server-Sent Events (SSE) transport wrapper. Add the following to your agent's MCP configuration JSON:

{
  "mcpServers": {
    "clicksend": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/YOUR_TRUTO_TOKEN"
      ]
    }
  }
}

Restart your agent interface. The wrapper establishes an SSE connection to Truto's JSON-RPC endpoint and registers the tools automatically.

Hero Tools for ClickSend

The ClickSend API contains dozens of endpoints. Exposing all of them is unnecessary and consumes context window tokens. Here are the 6 highest-leverage "hero tools" generated by Truto that enable an LLM to orchestrate multi-channel communications.

click_send_sms_send

This tool is the core of the ClickSend integration. It accepts a JSON array of message objects, allowing the LLM to send single or bulk SMS messages globally. It requires a valid to number and body.

"Send an SMS to +15551234567 saying: 'Your server deployment has failed. Please check the logs.' Use 'AlertOps' as the sender ID."

create_a_click_send_upload

Crucial for physical mail, fax, and MMS. This tool uploads a media file (like a PDF invoice or an image) to ClickSend's servers and returns a string URL. The LLM must call this first before attempting to send physical documents.

"Upload the attached base64 PDF to ClickSend and give me the return URL so we can fax it."

click_send_letters_send

Dispatches physical mail. The LLM constructs a payload containing the file URL (from the upload tool), recipient address details, and layout preferences (color vs black-and-white, duplex printing).

"Send a physical letter to 123 Main St, New York, NY 10001. Use the file URL from our previous upload, print it in color, and use return address ID 4591."

click_send_voice_send

Converts text to speech and initiates an automated phone call to the recipient. The LLM can specify the voice (e.g., female/male, accent) and the lang to match the target demographic.

"Trigger a voice call to +447911123456. Read this alert: 'Critical database outage detected.' Use a UK English female voice."

click_send_sms_list_history

Allows the LLM to audit outbound communications. It queries the historical log of dispatched messages, returning timestamps, message contents, and final delivery status codes.

"Check the ClickSend SMS history for the last 24 hours. Did any messages sent to +15559876543 fail to deliver?"

list_all_click_send_sms_inbound

Reads incoming SMS replies. AI agents can use this tool to build conversational SMS loops, fetching unread messages, processing customer intent, and marking them as read.

"Fetch all unread inbound SMS messages. If anyone replied 'STOP', remove them from our active contact list and summarize their numbers."

To view the complete inventory of available ClickSend tools and their exact JSON schema requirements, visit the ClickSend integration page.

Workflows in Action

AI agents excel at orchestrating multi-step API sequences. By providing ChatGPT with ClickSend tools, you enable complex, cross-channel communication workflows. Here is exactly how an AI agent executes these scenarios in production.

Scenario 1: Automated Invoice Delivery via Postal Mail

An IT administrator wants to automatically mail a physical invoice PDF generated by their billing system.

"I have a PDF invoice for Acme Corp. Upload it to ClickSend and dispatch it as a physical letter to their headquarters at 456 Enterprise Way, Austin TX 78701. Print it in black and white. Confirm when it is queued."

Agent Execution Flow:

  1. Calls create_a_click_send_upload with the PDF data. ClickSend returns a secure file URL.
  2. Calls click_send_letters_send using the newly acquired file URL, mapping the address string to the required nested address_line_1, address_city, address_state, and address_postal_code fields.
  3. The agent reads the 200 OK response containing the dispatch ID and replies to the user confirming the letter is queued for printing and mailing.

Scenario 2: Urgent On-Call Escalation

A DevOps engineer asks ChatGPT to initiate an escalation protocol during a server outage.

"The primary database is down. Text Sarah at +15554443333 with a critical alert. If she doesn't reply 'ACK' within 2 minutes, trigger a voice call to read the alert aloud."

Agent Execution Flow:

  1. Calls click_send_sms_send targeting Sarah's number with the alert body.
  2. The agent pauses or relies on system timers to wait 120 seconds.
  3. Calls list_all_click_send_sms_inbound to check for recent replies from Sarah's number.
  4. Detecting no 'ACK' response, the agent calls click_send_voice_send, passing the alert text to ClickSend's text-to-speech engine to call her mobile phone immediately.
graph TD
  A["ChatGPT / Agent"] -->|"1. click_send_sms_send"| B["ClickSend API"]
  B -->|"Queued"| A
  A -->|"Wait 120s"| A
  A -->|"2. list_all_click_send_sms_inbound"| B
  B -->|"No new replies"| A
  A -->|"3. click_send_voice_send"| B
  B -->|"Call initiated"| A

Scenario 3: Bulk SMS Campaign Price Calculation

A marketing manager needs to estimate the cost of an upcoming campaign before committing budget.

"We want to send a promotional SMS to our 'Summer 2026' contact list (list ID 88412). Calculate the price for sending 'Use code SUMMER20 for 20% off!' before actually sending it."

Agent Execution Flow:

  1. Calls click_send_sms_campaigns_calculate_price, passing the list_id, a campaign name, the sender ID, and the message body.
  2. ClickSend processes the recipient count, checks message segmentation (length), and returns the projected cost in the account's base currency.
  3. The agent parses the payload and outputs the exact estimated cost to the manager without risking an accidental blast.

Security and Access Control

Giving an LLM access to dispatch physical mail and global SMS incurs real financial costs. Truto's MCP architecture provides strict boundaries to prevent runaway agent behavior and unauthorized access.

  • Method Filtering: You can restrict the MCP server to only allow read operations (like fetching inbound messages and history) by setting methods: ["read"] during server creation. This entirely prevents the LLM from triggering costly POST requests.
  • Tag Filtering: ClickSend resources can be tagged. You can generate an MCP server that only exposes tools tagged with sms, strictly preventing the agent from discovering or calling voice, fax, or postal endpoints.
  • Require API Token Auth: By default, possessing the MCP URL grants access. For enterprise deployments, setting require_api_token_auth: true forces the connecting client to also pass a valid Truto API token in the headers, adding a secondary layer of authentication.
  • Time-to-Live (Expires At): You can enforce a strict expiration date on the server using expires_at. Once the ISO timestamp passes, Truto automatically evicts the token from the edge store and schedules a cleanup routine, instantly severing the LLM's access to ClickSend.

Connecting ClickSend to ChatGPT transforms a text-based AI into a physical and telephonic operations engine. By utilizing a managed MCP server, engineering teams bypass the grueling work of normalizing multi-channel schemas, handling two-step file uploads, and standardizing 429 rate limit headers. Instead of maintaining point-to-point connector code, your developers can focus on prompt engineering and workflow orchestration, letting the infrastructure seamlessly translate LLM intent into real-world communication.

FAQ

Does Truto automatically retry ClickSend rate limit errors?
No. Truto does not retry, throttle, or apply backoff on rate limit errors. When ClickSend returns an HTTP 429, Truto passes that error to the caller, normalizing the upstream info into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The calling agent must handle the retry logic.
How do I send physical letters or faxes via the ClickSend MCP?
Sending physical media requires a two-step process. First, the AI agent must use the create_a_click_send_upload tool to upload the document and retrieve a file URL. Second, the agent calls the letter or fax dispatch tool, passing that file URL in the payload.
Can I prevent ChatGPT from sending messages and only allow it to read inbox replies?
Yes. When creating the Truto MCP server, configure it with methods: ["read"]. This filters out all write operations, ensuring the LLM can only query historical logs and inbound messages without the ability to dispatch outbound communications.
Do I need to hardcode JSON schemas to use ClickSend with ChatGPT?
No. The Truto MCP server dynamically generates JSON-RPC tool definitions based on ClickSend's API documentation. The schemas are automatically formatted and served to the LLM during the MCP initialization handshake.

More from our Blog