Skip to content

Connect CallRail to Claude: Manage tracking numbers and SMS

Learn how to connect CallRail to Claude via an MCP server. Automate phone number provisioning, audit call logs, and orchestrate SMS campaigns using AI agents.

Riya Sethi Riya Sethi · · 10 min read
Connect CallRail to Claude: Manage tracking numbers and SMS

If your team needs to connect CallRail to Claude to automate phone number provisioning, audit missed calls, or orchestrate conversational SMS campaigns, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's natural language tool calls and CallRail's REST API. You can either build and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL.

If your team uses ChatGPT, check out our guide on connecting CallRail to ChatGPT or explore our broader architectural overview on connecting CallRail to AI Agents.

Giving a Large Language Model (LLM) read and write access to a sprawling telecom and marketing analytics ecosystem like CallRail is an engineering challenge. You have to handle API key token lifecycles, map deep, nested JSON schemas to MCP tool definitions, and deal with CallRail's unforgiving concurrency limits. Every time CallRail updates a resource payload, you have to update your server code, redeploy, and test the integration.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for CallRail, connect it natively to Claude Desktop, and execute complex telecom workflows using natural language.

The Engineering Reality of the CallRail API

A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools over JSON-RPC, the reality of implementing it against specialized telecom APIs is painful. You are not just integrating a simple CRUD database; you are integrating a live communications system with complex provisioning logic, asynchronous transcripts, and threaded messaging.

If you decide to build a custom CallRail MCP server in-house, here are the specific integration challenges you will face:

Asynchronous Call Milestones and Keywords

Call data in CallRail is rarely static. When querying a call via the /v3/a/{account_id}/calls/{id}.json endpoint, the returned object contains deeply nested milestones and keywords_spotted arrays. These properties represent AI-driven transcription and analysis events that populate asynchronously after a call concludes. If your agent is polling for call data too quickly, these arrays will be empty. You must design your MCP tools to explicitly instruct Claude on how to parse these nested structures and when to re-query the endpoint if expected conversational intelligence data is missing.

Number Pool vs. Source Tracker Provisioning

CallRail supports two radically different tracking methodologies: source trackers (a single static phone number assigned to a billboard or offline campaign) and session trackers (a dynamic pool of numbers that swap on your website to track individual visitor sessions). When exposing a tool to create trackers, the LLM must understand this distinction. Creating a session tracker requires a highly specific JSON payload detailing the call_flow, pool_size, and swap_targets. If you do not constrain the LLM using strict JSON Schema definitions in your MCP tool, it will routinely fail validation checks by passing source tracker parameters to a session tracker request.

Flat Namespace Resolution

When Claude executes a tool call, it typically passes arguments as a single, flat JSON object. However, the CallRail API often expects arguments split between query parameters (e.g., date_range, company_id) and the request body (e.g., note, lead_status). A production-grade MCP router must intelligently split this flat argument namespace, mapping the LLM's inputs to the correct schema locations before dispatching the HTTP request to CallRail.

Auto-Generating the CallRail MCP Server via Truto

Instead of writing boilerplate JSON-RPC handlers, Truto derives your MCP tools dynamically from CallRail's documented API schema. Every available endpoint is parsed, enhanced with LLM-specific descriptions, and exposed as an MCP-compatible tool. Tools are scoped to a single integrated account and secured via a cryptographic token URL.

You can spin up a CallRail MCP server in two ways.

Method 1: Via the Truto UI

For IT admins and no-code operations teams, Truto provides a visual interface to generate servers instantly:

  1. Log into your Truto dashboard and navigate to the integrated account page for your connected CallRail instance.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Select your desired configuration (e.g., filter by specific tags like marketing or allow only read operations).
  5. Copy the generated MCP server URL (e.g., https://api.truto.one/mcp/a1b2c3d4...).

Method 2: Via the Truto REST API

For developers building programmatic agents, you can generate MCP servers dynamically on behalf of your users by interacting with the Truto API.

Make a POST request to /integrated-account/:id/mcp:

curl -X POST https://api.truto.one/api/integrated-account/YOUR_CALLRAIL_ACCOUNT_ID/mcp \
  -H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "CallRail SMS & Tracking Agent",
    "config": {
      "methods": ["read", "write", "custom"]
    }
  }'

The API responds with a secure URL containing the hashed token:

{
  "id": "mcp_srv_987654321",
  "name": "CallRail SMS & Tracking Agent",
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f6g7h8i9j0",
  "config": {
    "methods": ["read", "write", "custom"]
  }
}

This URL is completely self-contained. It encodes the tenant mapping, the allowed tool filters, and the underlying CallRail authentication context.

Connecting the MCP Server to Claude

Once you have the URL, connecting it to Claude requires zero additional coding. You can configure it via the Claude UI or through local configuration files.

Method A: Via the Claude User Interface

If your organization uses Claude Enterprise or Team plans, administrators can configure custom connectors visually.

  1. Open Claude and navigate to Settings → Integrations (or Settings → Connectors).
  2. Click Add MCP Server or Add custom connector.
  3. Provide a name (e.g., "CallRail Operations").
  4. Paste the Truto MCP URL into the connection field.
  5. Click Add. Claude will automatically negotiate the JSON-RPC handshake and index the available CallRail tools.

Method B: Via the Claude Desktop Config File

If you are a developer using Claude Desktop locally, you can map the Truto server directly in your claude_desktop_config.json file. Because Truto MCP servers speak Server-Sent Events (SSE) over HTTP, you use the standard @modelcontextprotocol/server-sse wrapper to bridge the connection.

Open your configuration file (usually located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows) and add the following:

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

Restart Claude Desktop. The application will immediately read the file, execute the SSE wrapper, connect to Truto, and display the new tools via the "plug" icon in your input bar.

Hero Tools for CallRail

Truto automatically generates comprehensive tool sets covering the entire CallRail REST API. Rather than overwhelming your agent with unstructured endpoints, these tools are highly typed and engineered with injected LLM instructions (such as cursor-handling hints for pagination). Here are the highest-leverage tools available for your agent.

1. list_all_call_rail_calls

This tool allows Claude to query historical call data across an account. It supports deep filtering by date range, call direction, company, specific tracking numbers, and assigned tags. The LLM can use this to generate daily reporting or identify missed calls.

Usage notes: Returns extensive metadata including duration, customer location data, lead status, and voicemail flags.

"Review the call log for yesterday. Find any inbound calls that went to voicemail or were shorter than 10 seconds, and summarize the caller's phone numbers and locations."

2. get_single_call_rail_call_by_id

While listing calls provides metadata, this tool goes deeper into a specific interaction. It returns the exact timestamps, AI-generated milestones, spotted keywords, and agent assignments for a single session.

Usage notes: Essential for analyzing call outcomes. Claude can read the keywords_spotted array to automatically determine if a customer mentioned "pricing," "cancel," or a specific competitor.

"Look up call ID 987654321. Check the milestones and keywords spotted to determine if the customer sounded frustrated or asked about our enterprise tier."

3. call_rail_calls_bulk_update

This tool acts on a specific call ID, allowing the agent to update the call's note, tags, lead status, customer name, or mark it as spam.

Usage notes: Perfect for automated triage. Your agent can read transcripts, determine intent, and write a summary directly back into the CallRail dashboard.

"Update call ID 11223344. Change the lead status to 'Qualified', add the tag 'Enterprise Inquiry', and append a note summarizing that they want a demo next Tuesday."

4. create_a_call_rail_text_message

CallRail isn't just for phone calls; it handles robust SMS operations. This tool sends an outbound text message from a specified CallRail tracking number to a customer, initiating a new thread or appending to an existing conversation.

Usage notes: Requires the account_id, customer_phone_number, tracking_number, and content.

"Send a text message from our main tracking number to +1-555-0199. Say: 'Hi! We noticed we missed your call. How can we help you today?'"

5. list_all_call_rail_trackers

Allows the agent to audit the active tracking numbers in a CallRail account. It retrieves details on both source trackers and session (number pool) trackers.

Usage notes: Returns configuration data including the destination routing number, SMS capability status, whisper messages, and call flow assignments.

"List all active trackers for the 'Acme Corp' company. Tell me which numbers have SMS enabled and which ones do not have a whisper message configured."

6. create_a_call_rail_tracker

Empowers Claude to programmatically provision new phone numbers. It can create either a source tracker for a specific marketing campaign or a session tracker pool for dynamic website insertion.

Usage notes: The LLM must supply the exact call_flow routing rules and define the tracker type.

"Provision a new source tracker for the upcoming 'Q4 Billboard' campaign. Route all inbound calls to our main office line at +1-555-0100 and set the whisper message to 'Billboard Lead'."

7. call_rail_calls_get_recording

Retrieves the direct audio recording URL for a specific call ID.

Usage notes: AI agents can use this URL to pipe the audio into an external Whisper model or transcription service if CallRail's native transcripts are unavailable.

"Get the recording link for call ID 44556677 so I can send it to the quality assurance team for review."

For the complete tool inventory, required schema definitions, and detailed payload structures, view the CallRail integration page.

Workflows in Action

Individual tools are useful, but the true power of an MCP server emerges when Claude chains these tools together to execute complex telecom workflows autonomously.

Scenario 1: Automated Missed Call Recovery via SMS

Marketing teams spend heavily to drive inbound calls, but missed calls frequently fall through the cracks. An AI agent can audit the call log, identify missed opportunities, and instantly engage them via text.

"Find any inbound calls from today that were not answered. For each one, check if we've already replied to them. If not, send them a polite text message from the number they called apologizing for missing them and asking how we can help."

Step-by-step execution:

  1. Claude calls list_all_call_rail_calls with the query filter answered=false and direction=inbound for today's date.
  2. For each resulting call record, Claude identifies the customer_phone_number and the tracking_phone_number.
  3. Claude calls list_all_call_rail_text_messages to ensure there isn't an active, recent thread with that customer.
  4. Claude calls create_a_call_rail_text_message using the extracted tracking number as the sender, dispatching the custom apology text to the prospect.
sequenceDiagram
    participant Agent as Claude Agent
    participant MCP as Truto MCP
    participant CR as CallRail API
    
    Agent->>MCP: call_tool: list_all_call_rail_calls (answered=false)
    MCP->>CR: GET /v3/a/{account_id}/calls.json?answered=false
    CR-->>MCP: [Missed Call from 555-0199]
    MCP-->>Agent: JSON array of missed calls
    Agent->>MCP: call_tool: create_a_call_rail_text_message
    MCP->>CR: POST /v3/a/{account_id}/text_messages.json
    CR-->>MCP: Message ID: 778899
    MCP-->>Agent: Success confirmation

Scenario 2: Post-Call Triage and CRM Tagging

After a sales team finishes a block of calls, the LLM can act as an administrative assistant, reading the conversational intelligence data and updating the system of record.

"Review the last 5 calls on our 'Sales Inbound' tracking number. Analyze the keywords spotted and milestones for each. If they mentioned 'pricing', tag the call as 'High Intent'. If it was spam, flag it accordingly."

Step-by-step execution:

  1. Claude calls list_all_call_rail_calls filtering by the specific tracker ID and limiting the query to 5 records.
  2. For each call, it iterates through and calls get_single_call_rail_call_by_id to extract the deep nested keywords_spotted and milestones arrays.
  3. Claude evaluates the JSON locally. If the conditions match, it calls call_rail_calls_bulk_update on that specific call ID, pushing the tags: ["High Intent"] or updating the spam status flag to true.

Security and Access Control

Exposing telecom infrastructure to an LLM requires strict security guardrails. Truto's MCP servers are designed with built-in zero-trust principles:

  • Method Filtering: Restrict an MCP server to read-only access. By setting methods: ["read"], you allow Claude to query calls and trackers but categorically prevent it from buying numbers or sending text messages.
  • Tag Filtering: Group specific API resources (e.g., tagging all SMS tools as messaging). You can configure the server to exclusively expose tools matching specific tags, hiding unrelated resources.
  • API Token Authentication: By default, possessing the MCP URL grants access. For higher security, enable require_api_token_auth. The client must then pass a valid bearer token in the headers, adding a second layer of identity verification.
  • Automatic Expiration: Use the expires_at parameter to provision ephemeral servers. The backend automatically schedules a Durable Object alarm to completely destroy the token and its associated KV cache exactly when the timestamp is reached.

Handling Rate Limits in Production

CallRail enforces strict concurrency and rate limits to protect its infrastructure. Truto does not retry, throttle, or apply backoff on rate limit errors.

When the CallRail API rejects a request with an HTTP 429 Too Many Requests status, Truto passes that error directly back to the caller. Crucially, Truto normalizes CallRail's proprietary rate limit headers into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset).

It is strictly the responsibility of your LLM agent framework (or the prompt instructions you provide to Claude) to inspect these headers, detect the 429 response, and implement exponential backoff logic before re-attempting the tool call.

Summary

Building an AI agent that can reliably parse call logs, buy tracking numbers, and orchestrate SMS conversations transforms CallRail from a passive analytics dashboard into an active operational engine.

By leveraging Truto's dynamic MCP generation, engineering teams can bypass the grueling work of managing nested telecom JSON schemas, OAuth scopes, and pagination algorithms. You configure the guardrails, generate the secure token URL, and immediately give Claude the tools it needs to scale your inbound and outbound communications.

FAQ

How do I give Claude access to my CallRail account?
You can connect CallRail to Claude by generating a Model Context Protocol (MCP) server URL using Truto. This URL maps CallRail's REST API into AI-accessible tools. You then add this URL as an MCP Server in Claude's integration settings or desktop configuration file.
Can Claude send SMS messages through CallRail?
Yes. By utilizing the `create_a_call_rail_text_message` tool through the MCP server, Claude can dispatch outbound text messages from your CallRail tracking numbers to follow up on missed calls or engage prospects.
Does Truto automatically retry CallRail API rate limits?
No. Truto does not retry, throttle, or apply backoff. It passes HTTP 429 errors directly back to the caller while normalizing the rate limit details into standard IETF headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`). Your agent is responsible for retry logic.
How do I prevent Claude from deleting my CallRail tracking numbers?
When creating the MCP server in Truto, you can use Method Filtering to restrict the server to specific operations. Setting the allowed methods to `["read"]` or explicit methods like `["get", "list", "create"]` ensures Claude cannot execute delete commands.

More from our Blog