Skip to content

Connect Gladly to Claude: Sync Customer Profiles and Inbox Workflows

A complete engineering guide to connecting Gladly's API to Claude using an MCP server. Automate customer profiles, task routing, and inbox operations via natural language.

Uday Gajavalli Uday Gajavalli · · 9 min read
Connect Gladly to Claude: Sync Customer Profiles and Inbox Workflows

If you need to connect Gladly to Claude to automate support triage, sync customer profiles, or manage inbox routing, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's LLM tool calls and Gladly's specific REST architecture. You can either spend weeks building and maintaining 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 Gladly to ChatGPT, explore our broader architectural overview on connecting Gladly to AI Agents, or see how this differs from connecting Zendesk to Claude.

Giving a Large Language Model (LLM) read and write access to a specialized support platform like Gladly is a complex engineering challenge. You have to handle API token lifecycles, map deep JSON schemas to MCP tool definitions, and deal with Gladly's strict relationship models. Every time the API updates, you have to update your server code. This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Gladly, connect it natively to Claude, and execute complex workflows using natural language.

The Engineering Reality of the Gladly 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, the reality of implementing it against vendor APIs is painful. You are not just integrating a generic database - you are integrating Gladly's specific, highly opinionated data model.

Gladly is fundamentally different from traditional ticketing systems. It is "person-centric" rather than "ticket-centric." Everything revolves around the Customer profile. If you decide to build a custom MCP server for Gladly, you own the entire API lifecycle. Here are the specific challenges you will face:

Complex Conversation Timelines In Gladly, a conversation is not a simple string of text. It is a timeline of Conversation Items that can include chat messages, internal notes, voice transcripts, and SMS logs. To allow an AI agent to read a conversation, your MCP server must expose tools that traverse a strict parent-child hierarchy: find the Customer ID, list their Conversations, and then paginate through the Conversation Items. Translating this nested structure into flat, LLM-friendly schemas requires significant boilerplate.

Strict Identity Resolution and Merges Gladly handles identity via arrays of emails and phone numbers. When agents merge duplicate customer profiles in the Gladly UI, the API does not cleanly redirect old IDs. If your LLM attempts to query or update a customer using an ID that has been merged, the Gladly API returns a 400 error containing the new ID. A custom MCP server must parse this specific error format and instruct the LLM to retry the operation with the updated ID.

State Lockouts Gladly enforces strict data integrity rules. For example, you cannot delete a customer profile if they have an open conversation. If an LLM attempts this, the API throws a rigid validation error. Your MCP tool schemas must clearly communicate these constraints to the model in advance, or the agent will get stuck in a failure loop trying to execute an impossible state change.

Explicit Rate Limit Management Gladly enforces strict API quotas. Truto handles the integration layer, but it is critical to understand a factual note on rate limits: Truto does not retry, throttle, or apply backoff on rate limit errors. When Gladly returns an HTTP 429 Too Many Requests, Truto passes that exact error back to the caller. However, Truto normalizes Gladly's upstream rate limit info into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). Your AI orchestrator or MCP client is completely responsible for reading these headers and executing its own backoff strategy. Do not rely on the MCP server to absorb 429s.

Instead of building all this schema mapping and error normalization from scratch, you can use Truto. Truto exposes Gladly's endpoints as ready-to-use MCP tools, dynamically derived from live API documentation.

How to Generate a Gladly MCP Server with Truto

Truto creates MCP servers dynamically. Once you connect a Gladly account to your Truto environment (creating an "integrated account"), Truto generates a unique JSON-RPC 2.0 endpoint that serves Gladly resources as MCP-compatible tools.

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

Method 1: Via the Truto UI

For ad-hoc agent testing or internal operations, the UI is the fastest path.

  1. Log into your Truto dashboard and navigate to the integrated account page for your connected Gladly instance.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Select your desired configuration (e.g., name the server, restrict allowed methods to "read" only, or set an expiration date).
  5. Click Save and copy the generated MCP server URL (it will look like https://api.truto.one/mcp/abc123def456...).

Method 2: Via the Truto API

If you are building a multi-tenant AI product and need to provision MCP servers for your end users programmatically, you use the Truto API.

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

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

The API securely provisions the configuration and returns a self-contained URL. This URL contains a cryptographic token that authenticates the client and scopes access to the specific Gladly environment.

How to Connect the MCP Server to Claude

Once you have the MCP server URL, connecting it to Claude requires zero additional coding. The URL is entirely self-contained.

Method A: Via the Claude UI (Desktop/Web)

Anthropic has made connecting remote servers trivial in their official clients.

  1. Open Claude Desktop or the web interface.
  2. Navigate to Settings -> Integrations -> Add MCP Server.
  3. Paste the Truto MCP URL you generated in the previous step.
  4. Click Add.

Claude will immediately perform an initialization handshake with the Truto server, request the list of available Gladly tools, and load their descriptions and schemas into its context window.

Method B: Via Manual Config File

If you are running custom orchestrators, Cursor, or prefer managing Claude Desktop via local configuration, you can update the JSON config directly.

Locate your claude_desktop_config.json file and add the server using the official Server-Sent Events (SSE) transport wrapper:

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

Restart Claude Desktop. The model now has real-time access to the Gladly API.

Gladly Hero Tools for Claude

Truto automatically maps dozens of Gladly API endpoints into MCP tools. Because Truto uses documentation-driven tool generation, every tool includes explicit descriptions and JSON schemas that instruct Claude exactly how to structure its payloads.

Here are the highest-leverage "hero" tools your agent will use to automate support workflows.

get_single_gladly_customer_by_id

This is the foundational tool for Gladly orchestration. Because Gladly indexes everything around the person, you must retrieve the customer profile to find the unique ID needed for subsequent task or conversation lookups.

Usage Context: If a customer's profile has been merged, this tool will explicitly return the new ID in its error payload, allowing the LLM to self-correct.

"Look up the Gladly customer profile for ID cus_892834. If they have a VIP tag, summarize their details."

list_all_gladly_customers

Allows Claude to search for customers using identifiers like phone numbers or email addresses, returning up to 50 matching profiles sorted by recent activity.

Usage Context: Vital for inbound triage. When a user requests help via SMS or email, the LLM uses this tool to resolve their identity before taking action.

"Search Gladly for any customer associated with the phone number +14155552671. Return their customer ID and current lifetime value."

list_all_gladly_conversation_items

Retrieves the detailed timeline of a specific conversation, including chat messages, system notes, and agent responses.

Usage Context: Essential for summarization. Claude uses this tool to read the history of an interaction so it can draft a context-aware response or summarize a long thread for a human agent.

"Fetch the conversation items for conversation ID con_9912. Summarize the back-and-forth between the agent and the customer into a bulleted list."

create_a_gladly_task

Creates an actionable task assigned to a specific inbox or agent, tied to a customer profile.

Usage Context: Used for cross-functional escalation. If an AI agent resolves a basic query but detects a billing dispute, it can use this tool to drop a structured task into the Finance team's Gladly inbox.

"Create a task in Gladly for customer ID cus_892834. Set the body to 'Review recent refund request for order 8812'. Assign it to the Billing inbox."

list_all_gladly_voice_transcripts

Retrieves the raw text transcript of a phone call or voicemail associated with a conversation item.

Usage Context: Call summarization and QA. The LLM extracts the transcript, analyzes customer sentiment, and automatically logs a summary note back into the customer timeline.

"Get the voice transcript for conversation item ID item_772. Analyze the customer's tone and tell me if they sound frustrated."

list_all_gladly_public_answers

Searches the Gladly knowledge base for active public answers based on organization configurations.

Usage Context: Auto-reply generation. Claude uses this tool to find the canonical company policy on a topic before drafting an email response to the customer.

"Search the Gladly public answers for 'international shipping delays' and draft a polite email using the policy you find."

For the complete inventory of available Gladly tools, including webhooks, schedules, and analytics reporting, visit the Gladly integration page.

Workflows in Action

MCP tools become powerful when Claude chains them together to solve multi-step problems. Here are two real-world workflows you can execute once Gladly is connected.

Workflow 1: Support Triage and Task Escalation

Customer service teams spend hours manually reading inbound emails, identifying the customer, and routing the ticket to the right department. Claude can automate this entirely.

"A new SMS just came in from +1-555-0198 saying their recent delivery was missing item X. Find this customer in Gladly, check their latest conversation to see if this is a recurring issue, and if it is, create a high-priority task for the Escalations inbox."

Execution Steps:

  1. Claude calls list_all_gladly_customers with the phone number to resolve the identity to cus_123.
  2. Claude calls list_all_gladly_customer_conversations using cus_123 to find the most recent conversation ID.
  3. Claude calls list_all_gladly_conversation_items to read the recent timeline and determines the user has complained about missing items before.
  4. Claude calls create_a_gladly_task assigned to the Escalations inbox, injecting a summary of the past issues into the task body.

Result: The customer is identified, context is gathered, and a structured escalation task is created without human intervention.

Workflow 2: Automated Call Auditing

Quality assurance teams need to review agent calls to ensure compliance and identify coaching opportunities.

"Find the recent voice transcripts for customer ID cus_456. Read the transcript and determine if the agent properly verified the customer's security PIN. If they failed, add a comment to the associated task flagging it for QA review."

Execution Steps:

  1. Claude calls list_all_gladly_customer_conversations for the customer.
  2. Claude extracts the conversation item IDs and calls list_all_gladly_voice_transcripts to pull the raw text of the calls.
  3. Claude analyzes the text locally, determining the agent skipped the PIN verification step.
  4. Claude calls list_all_gladly_tasks to find the active QA task, then calls create_a_gladly_task_comment to document the compliance failure.

Result: An automated, deterministic audit of voice communications directly integrated into the team's standard task workflow.

Security and Access Control

Giving an LLM access to your primary customer database requires strict boundaries. Truto MCP servers support multiple layers of programmatic access control so you can deploy agents safely.

  • Method Filtering: When generating the server, you can restrict access entirely to specific HTTP methods. Passing methods: ["read"] ensures the MCP server will only generate tools for GET and LIST endpoints. Claude will be physically unable to delete profiles or alter tasks.
  • Tag Filtering: You can restrict tools by functional area. By passing specific tags, you can limit the MCP server to only expose tools related to "knowledge_base" or "public_answers," keeping the LLM entirely isolated from PII.
  • Secondary Authentication (require_api_token_auth): By default, possessing the MCP URL is enough to invoke tools. For higher security environments, setting this flag forces the MCP client to also pass a valid Truto API token in the Authorization header. This guarantees that even if the URL leaks in a log file, the tools cannot be invoked by unauthenticated actors.
  • Automatic Expiration (expires_at): You can provision temporary MCP servers for contractors or short-lived automated jobs by passing a TTL. Truto will automatically destroy the server token and background infrastructure when the timestamp is reached.

Strategic Wrap-Up

Integrating AI into customer support is no longer a research project - it is an operational mandate. However, forcing your engineering team to build custom API wrappers, normalize Gladly's unique pagination schemas, and manage token infrastructure is a massive distraction from your core product.

By leveraging Truto's dynamic MCP generation, you can give Claude real-time, strongly-typed access to your Gladly environment in minutes. You get the power of natural language workflow automation without the technical debt of maintaining an in-house integration layer.

FAQ

How does Claude authenticate with the Gladly API?
Claude connects to a managed MCP server endpoint provided by Truto. Truto handles the underlying OAuth 2.0 or API key lifecycle with Gladly and maps Claude's tool calls into authenticated REST requests.
Does Truto automatically handle Gladly rate limits?
No. Truto does not retry, throttle, or apply backoff on rate limit errors. It normalizes Gladly's rate limit info into standard headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) and passes the 429 error to Claude. Your client is responsible for retries.
Can I restrict Claude to read-only access for Gladly?
Yes. When generating the MCP server URL in Truto, you can apply method filters like ['read'] to ensure the model can only query customer data, preventing it from creating or updating records.
How do I connect the MCP server to Claude Desktop?
In Claude Desktop, you navigate to Settings > Integrations > Add MCP Server, and paste the Truto SSE URL. Alternatively, you can configure it manually in the claude_desktop_config.json file using the @modelcontextprotocol/server-sse command.

More from our Blog