Connect ClickSend to Claude: Handle Global Messaging and Campaigns
Learn how to connect ClickSend to Claude using a managed MCP server. Automate global SMS, voice, and direct mail workflows directly from your AI agent.
If you are engineering AI workflows to handle global communications, you need to connect ClickSend to Claude. By using a Model Context Protocol (MCP) server, your AI agents can orchestrate multichannel campaigns across SMS, voice, fax, and even physical direct mail. If your team uses ChatGPT, check out our guide on connecting ClickSend to ChatGPT, or explore our architectural deep dive on connecting ClickSend to AI Agents.
Giving a Large Language Model (LLM) read and write access to an omni-channel messaging platform like ClickSend is an infrastructure challenge. You have to handle complex nested arrays for bulk dispatch, strict payload requirements for physical mail, and aggressive API rate limits. Instead of building and hosting this integration layer yourself, you can use Truto to dynamically generate a secure, authenticated MCP server URL.
This guide breaks down exactly how to use Truto to generate a managed MCP server for ClickSend, connect it natively to Claude, and execute complex communication workflows using natural language.
The Engineering Reality of the ClickSend API
A custom MCP server is a self-hosted translation layer that bridges the gap between Claude's JSON-RPC tool calls and a vendor's REST API. While the open MCP standard provides a predictable way for models to discover tools, implementing it against ClickSend's specific API design introduces severe maintenance overhead.
ClickSend is not just an SMS gateway. It is a unified communications API that handles digital messaging (SMS, MMS, Email, Voice) alongside physical logistics (Postcards, Letters). If you build a custom MCP server, you own the entire API lifecycle. Here are the specific challenges you will face when mapping ClickSend to Claude.
Polymorphic Payload Structures
ClickSend endpoints require highly specific data formats depending on the channel. An SMS payload expects an array of messages containing to, body, and source. A physical letter payload requires a file_url, template_id, and a highly structured nested object for the recipient's address. If you expose raw endpoints to an LLM, the model will struggle to generate these exact nested structures consistently, leading to 400 Bad Request errors. Truto normalizes these structures into standardized JSON Schemas, providing explicit instructions to the LLM on exactly which fields are required for which channel.
The Cost Estimation Constraint
Omni-channel messaging costs real money. ClickSend charges different rates depending on the destination country, carrier networks, and the physical printing costs of letters. Before dispatching a campaign, you typically want your agent to calculate the cost to get human approval. ClickSend provides dedicated price calculation endpoints (e.g., /v3/sms/price, /v3/post/letters/price). If you build your own server, you have to write explicit routing logic to ensure the LLM calls the price endpoint before the send endpoint. Truto exposes these price endpoints as distinct, easily identifiable tools, allowing Claude to execute cost estimations naturally.
Strict Rate Limiting and Handling 429s
ClickSend enforces rate limits to prevent spam and platform abuse. If an AI agent attempts to iterate through hundreds of contacts or rapidly dispatch individual messages instead of using bulk arrays, the API will reject the requests with an HTTP 429 status code.
It is critical to note that Truto does not retry, throttle, or apply backoff on rate limit errors. When ClickSend returns an HTTP 429, Truto passes that error directly to the caller. However, Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) following the IETF specification. Your AI agent or MCP client is responsible for reading these headers and implementing the appropriate retry and exponential backoff logic.
How to Generate a ClickSend MCP Server with Truto
Truto dynamically derives tool definitions directly from ClickSend's API documentation. A tool only appears in the server if it has a verified schema, acting as a strict quality gate for the LLM.
You can generate an MCP server for your ClickSend account in two ways.
Method 1: Via the Truto UI
If you prefer a visual interface, you can generate the server directly from your Truto dashboard:
- Navigate to the Integrated Accounts page and select your connected ClickSend instance.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Select your desired configuration. You can restrict the server to specific methods (like read-only) or specific tags (like
smsorpost). - Copy the generated MCP server URL. It will look like
https://api.truto.one/mcp/abc-123...
Method 2: Via the Truto API
For teams automating their infrastructure, you can generate the MCP server programmatically. The API validates the configuration, generates a secure cryptographic token, and provisions the endpoint.
Make a POST request to /integrated-account/:id/mcp:
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 Global Communications AI",
"config": {
"methods": ["read", "write"],
"tags": ["sms", "post", "voice"]
}
}'The API will return a payload containing the unique url for the server. This URL contains an embedded token that authenticates the requests - no additional credentials are required for the client.
How to Connect the MCP Server to Claude
Once you have the Truto MCP server URL, you must configure Claude to route tool calls to it. Truto handles all the JSON-RPC 2.0 protocol translation.
Method A: Via the Claude UI
If you are using the desktop applications for Claude or ChatGPT, you can add the server via the UI.
- For Claude Desktop: Open Settings, navigate to Integrations, click Add MCP Server, paste your Truto MCP URL, and save.
- For ChatGPT (Developer Mode): Open Settings, navigate to Connectors, select Add custom connector, paste the Truto URL, and save.
The client will immediately ping the endpoint, execute the tools/list initialization handshake, and populate the model's context with the available ClickSend tools.
Method B: Via the Claude Desktop Configuration File
For engineering environments and centralized deployment, you can edit the claude_desktop_config.json file manually. This requires using the official Model Context Protocol SSE transport proxy to tunnel requests to the remote HTTP endpoint.
Edit your configuration file (located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"clicksend_truto": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"https://api.truto.one/mcp/YOUR_SECURE_TOKEN"
]
}
}
}Save the file and restart Claude Desktop. The model will now have native access to your ClickSend environment.
Hero Tools for ClickSend Automation
When the LLM connects to the MCP server, it gains access to the standardized Proxy APIs. Here are the highest-leverage tools available for automating global communications.
click_send_sms_send
This tool allows the agent to dispatch SMS messages globally. It handles arrays of messages, allowing bulk sending in a single API call to avoid rate limits.
Usage Note: Ensure the LLM includes country codes in the phone numbers and respects the 160-character limit for standard GSM encoding to prevent multi-part message billing.
"Send a reminder SMS to +14155552671 and +447700900077 stating that the server migration begins in 30 minutes. Keep it brief."
click_send_voice_send
Converts text to speech and initiates a voice call to the target phone number. This is critical for high-urgency alerts where an SMS might be ignored.
Usage Note: The tool accepts parameters for voice type (male/female) and language localization to ensure the text-to-speech engine pronounces the message correctly.
"Trigger an automated voice call to the on-call engineer at +14155550199. Read them the current P1 incident summary regarding the database failover."
click_send_letters_send
Transmits a digital document to ClickSend's fulfillment centers to be printed, folded, stuffed in an envelope, and mailed via standard postal services.
Usage Note: The LLM must provide a public URL to a PDF document or construct the specific letter template payload. This requires exact address formatting.
"Take the generated invoice PDF URL I just gave you and send it as a physical letter to Acme Corp at 123 Main St, New York, NY 10001."
click_send_postcards_send
Similar to letters, but dispatches a physical postcard. Excellent for automated direct mail marketing campaigns triggered by CRM events.
Usage Note: Requires a front and back image or PDF. The LLM needs strict instructions to map the recipient data to the specific postcard payload structure.
"Send a welcome postcard to our new customer at their registered address in London. Use the standard global welcome template."
click_send_sms_campaigns_calculate_price
Allows the agent to calculate the exact cost of an SMS campaign before committing to the send. This is a mandatory safety check for high-volume dispatches.
Usage Note: Always instruct your agent to call this tool and await user approval before calling the actual execution tool.
"I want to send our holiday promo text to the 5,000 contacts in list ID 88392. Calculate the total cost for this campaign first and show me the breakdown."
list_all_click_send_contacts
Retrieves paginated lists of contacts stored within ClickSend directories. Truto normalizes the pagination into standard limit and next_cursor fields.
Usage Note: Instruct the agent to pass the next_cursor back exactly as received if it needs to iterate through thousands of records.
"Fetch the first 100 contacts from our 'VIP Customers' list so we can review who will receive the early access SMS."
For the complete inventory of available ClickSend endpoints, including MMS, email routing, and subaccount management, review the ClickSend integration page.
Workflows in Action
By chaining these tools together, Claude can execute complex, multi-step workflows that bridge digital data and physical action.
Automated Escalation: SMS to Voice Call
When dealing with critical infrastructure incidents, an agent can escalate notifications if there is no response.
"Check the status of the database alert. Send an SMS to the primary on-call engineer. Wait 2 minutes. If the incident is still open, trigger a voice call reading the alert summary."
- The agent calls
click_send_sms_sendto dispatch the initial text message. - The agent monitors the internal incident state (via another integration or context).
- If unresolved, the agent constructs the speech payload and calls
click_send_voice_sendto forcefully wake the engineer.
This guarantees delivery across different attention channels without manual intervention.
sequenceDiagram
participant User
participant Claude
participant Truto as Truto MCP
participant ClickSend as ClickSend API
User->>Claude: "Trigger incident escalation flow"
Claude->>Truto: Call click_send_sms_send
Truto->>ClickSend: POST /v3/sms/send
ClickSend-->>Truto: 200 OK (Message Queued)
Truto-->>Claude: SMS Sent confirmation
Claude->>Claude: Wait/Check State
Claude->>Truto: Call click_send_voice_send
Truto->>ClickSend: POST /v3/voice/send
ClickSend-->>Truto: 200 OK (Call Initiated)
Truto-->>Claude: Voice Call confirmationOmnichannel Marketing Campaign Execution
Marketing operations often require coordinating digital and physical touchpoints simultaneously.
"We are launching the new enterprise tier. Calculate the cost to send an SMS blast to list 1045, and the cost to send physical postcards to list 1046. Present the costs to me. If I approve, execute both."
- The agent calls
click_send_sms_campaigns_calculate_pricepassing the list ID and message body. - The agent calls
click_send_postcards_calculate_pricepassing the postcard parameters. - The agent pauses execution and presents the combined fiat cost to the user in the chat interface.
- Upon receiving a "Yes, proceed" from the user, the agent calls
click_send_sms_campaigns_sendandclick_send_postcards_send.
This workflow implements a critical human-in-the-loop safety gate for financial operations.
Invoice Dispatch and Tracking
Accounting teams can automate the mailing of physical invoices to legacy clients.
"Take this list of overdue invoices. For each one, send a physical letter to their billing address with the invoice PDF URL attached, and log the return receipt ID."
- The agent iterates over the provided data.
- For each record, it calls
click_send_letters_send, providing the address object and the PDF URL. - The tool returns a
message_idfor the physical post. - The agent compiles a table of client names and ClickSend tracking IDs, allowing the accounting team to verify that the mail was dispatched to the postal service.
Security and Access Control
Exposing a communications platform capable of spending money and contacting thousands of people requires strict governance. Truto MCP servers enforce security at the infrastructure layer, ensuring your AI agents operate within defined boundaries.
- Method Filtering: When creating the server via the
/mcpendpoint, you can restrict theconfig.methodsarray to["read"]. This allows the agent to check delivery receipts and contact lists but physically blocks it from dispatching SMS or spending account balance. - Tag Filtering: You can use
config.tagsto limit the server to a specific domain. For example, filtering by["sms"]ensures the agent cannot access voice calling or physical letter endpoints. - Mandatory API Authentication: By enabling
require_api_token_auth: true, the token URL alone is insufficient. The client must also pass a valid Truto API token in theAuthorizationheader, preventing unauthorized usage if the MCP URL is exposed in logs. - Time-to-Live Expiration: You can set an
expires_atISO datetime when generating the server. Truto stores this in a managed KV store; once the timestamp passes, the token is automatically purged and the server instantly revokes access.
Architecting for Scale
Connecting ClickSend to Claude transforms your AI agent from a text generator into a global communications orchestrator. Building this infrastructure in-house requires handling complex polymorphic schemas, standardizing rate limit headers, and managing OAuth lifecycles.
By leveraging Truto's documentation-driven MCP generation, you offload the protocol translation and security boilerplate. Your engineering team can focus on designing the actual campaign logic and agent prompts, rather than writing custom JSON parsers for physical postcard schemas.
FAQ
- Does Truto automatically handle ClickSend rate limits?
- No. Truto does not retry, throttle, or apply backoff logic. When ClickSend returns an HTTP 429 error, Truto passes the error through to the caller. However, Truto normalizes the rate limit information into standard IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) so your agent can implement proper backoff.
- Can I prevent my AI agent from sending physical mail?
- Yes. When generating the MCP server in Truto, you can use tag filtering or method filtering to restrict access. By omitting write permissions or specific tags, you physically block the LLM from executing unauthorized endpoints like sending postcards or spending account balance.
- How are complex payloads like physical letters handled by the LLM?
- Truto dynamically generates standardized JSON Schemas from ClickSend's documentation. These schemas explicitly define required parameters like file_url and nested address objects, providing the LLM with strict, validated instructions on how to construct the payload.
- Do I need to maintain integration code when ClickSend updates its API?
- No. Truto's MCP servers are documentation-driven. Tools are generated dynamically from the underlying integration resources and schemas. When Truto updates the integration definition, your MCP server inherits the changes instantly without requiring code deployments.