Connect Tidio to ChatGPT: Sync Customer Data and Manage Tickets
Learn how to build a managed MCP server to connect Tidio to ChatGPT. Automate ticket routing, sync contact properties, and manage Lyro AI data sources.
Connecting Tidio to ChatGPT gives your AI agents the ability to read customer conversations, update ticket statuses, and manage Lyro AI data sources dynamically. If your team uses Claude, check out our guide on connecting Tidio to Claude or explore our broader architectural overview on connecting Tidio to AI Agents.
Automating a modern helpdesk ecosystem requires more than basic data extraction. You need an AI agent that can actively parse unstructured conversation history, isolate actionable technical problems, assign them to the correct operator departments, and update contact properties in real-time. Giving a Large Language Model (LLM) read and write access to a production Tidio instance is a serious engineering challenge. You must map complex JSON schemas to tool definitions, handle authentication token lifecycles, and implement aggressive retry logic for rate limits.
You can either spend weeks building, hosting, and maintaining a custom Model Context Protocol (MCP) server, or you can use a managed infrastructure layer that handles the boilerplate for you. This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Tidio, connect it natively to ChatGPT, and execute complex support workflows using natural language.
The Engineering Reality of the Tidio API
A custom MCP server is a self-hosted integration layer that translates an LLM's tool calls into REST API requests via JSON-RPC 2.0. While the MCP standard provides a predictable way for models to discover tools, the reality of implementing it against vendor APIs is consistently painful.
If you decide to build a custom MCP server for Tidio, you own the entire API lifecycle. You are not just building standard CRUD wrappers; you are dealing with Tidio's specific implementation quirks. Here are the distinct challenges you face when integrating Tidio:
Asynchronous AI Agent Constraints
Tidio exposes an endpoint specifically for invoking its Lyro AI agent (tidio_lyro_answer_ticket). However, this endpoint is aggressively synchronous on a long-polling model - it can take up to 40 seconds to process the context and return a generated answer. Furthermore, it currently only works for the first message in a ticket. If your MCP server uses standard 10-second HTTP timeouts, the LLM's tool call will fail mid-execution, causing the agent to hallucinate a response or blindly retry until it triggers a hard rate limit.
All-or-Nothing Bulk Operations
When enriching contact data, an AI agent might attempt to update dozens of users simultaneously. Tidio supports bulk operations (tidio_contacts_bulk_update and tidio_contacts_bulk_create), but they enforce a strict maximum of 100 contacts per request using an all-or-nothing strategy. If a single contact in the array is missing a required property (like a distinct_id), the entire batch is rejected. Your custom server must parse the bulk rejection and instruct the LLM on which specific record caused the failure.
Strict Contact Identity Rules
Creating a contact in Tidio requires a distinct_id. However, that alone is not enough. The API enforces a complex validation rule where at least one of the following must also be provided: email, first_name, last_name, or phone. If your LLM attempts to create an anonymous placeholder contact with only an ID, the request drops.
Raw 429 Rate Limits and IETF Headers
Tidio enforces strict API usage limits. When building against Truto, you must understand a critical architectural fact: Truto does not retry, throttle, or apply backoff on rate limit errors. When the upstream Tidio API returns an HTTP 429 Too Many Requests, Truto passes that error directly to the caller. Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) conforming strictly to the IETF specification. Your client (or the LLM orchestration layer) is entirely responsible for interpreting these headers and executing exponential backoff. Do not expect the integration layer to magically absorb rate limit violations.
How to Create the Tidio MCP Server
Rather than hand-coding tool definitions, Truto dynamically derives them from Tidio's API definitions and human-readable documentation records. A tool only appears in the MCP server if it has a corresponding documentation entry, ensuring the LLM only interacts with well-defined endpoints.
Each MCP server is scoped to a single integrated account. The server URL contains a cryptographic token that encodes the account, available tools, and access rules.
You can generate this server via the Truto UI or programmatically via the API.
Method 1: Via the Truto UI
If you prefer visual configuration, you can generate an MCP server directly from your integration dashboard.
- Navigate to the integrated account page for your connected Tidio instance.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Select your desired configuration (name, allowed methods, specific tags, and expiration).
- Copy the generated MCP server URL (e.g.,
https://api.truto.one/mcp/a1b2c3d4e5f6...).
Method 2: Via the Truto API
For teams embedding MCP provisioning into their own administrative dashboards, use the REST API. The API validates that the integration has available tools, generates a secure token, and returns a ready-to-use URL.
Execute a POST request to /integrated-account/:id/mcp:
fetch('https://api.truto.one/integrated-account/YOUR_ACCOUNT_ID/mcp', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TRUTO_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: "Tidio Support MCP",
config: {
methods: ["read", "write"], // Excludes custom methods
tags: ["tickets", "contacts"]
}
})
})
.then(response => response.json())
.then(data => console.log(data.url));The response returns a cryptographically secure URL that requires no additional client-side configuration.
How to Connect the MCP Server to ChatGPT
Once you have the Truto MCP server URL, connecting it to your AI client takes less than a minute. You can configure this via the ChatGPT desktop UI or via a headless Server-Sent Events (SSE) configuration file.
Method 1: Via the ChatGPT UI
This is the fastest method for internal teams and individual developers testing workflows.
- Copy the MCP server URL from the Truto API or UI.
- In ChatGPT, navigate to Settings -> Apps -> Advanced settings.
- Enable the Developer mode toggle (MCP support is currently behind this flag).
- Under the MCP servers / Custom connectors section, click to add a new server.
- Set the Name to something identifiable, like "Tidio Support Desk".
- Paste your Truto MCP URL into the Server URL field and click Save.
ChatGPT will immediately ping the server, complete the JSON-RPC initialization handshake, and list the available Tidio tools.
Method 2: Via Manual Configuration File
If you are running custom agents, using tools like Cursor, or orchestrating via a framework that requires a configuration file, you can map the MCP server using the official remote SSE client.
Add the following to your mcp_config.json file:
{
"mcpServers": {
"tidio-support": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"--url",
"https://api.truto.one/mcp/YOUR_SECURE_TOKEN"
]
}
}
}Note: If you created the server with require_api_token_auth: true, you must inject your Truto API key into the authorization header for the SSE client to connect successfully.
Hero Tools for Tidio
Truto automatically generates precise JSON schemas for every documented Tidio endpoint. When an LLM calls one of these tools, the arguments are passed as a single flat object, and Truto's proxy layer splits them into the correct query parameters and body payloads based on the underlying integration schema.
Here are 6 high-leverage tools available for Tidio automation.
list_all_tidio_tickets
Retrieves a paginated list of all Tidio tickets without fetching full message histories. This is the primary tool for triage and auditing workflows.
"Fetch all open tickets in Tidio and group them by the assigned operator ID."
get_single_tidio_ticket_by_id
Fetches the complete context of a specific ticket, including the entire nested array of messages. This is required before an LLM can summarize a conversation or generate a reply.
"Get the full details and message history for ticket ID 987654. Summarize the customer's core complaint in two sentences."
update_a_tidio_ticket_by_id
Allows the agent to modify ticket metadata. You can change statuses, update priorities, assign tickets to specific operators, or apply tags based on conversation context.
"Update ticket ID 987654 to have a 'high' priority and change its status to closed."
tidio_tickets_reply
Injects a new message into an existing ticket thread. Crucially, this requires the author_type to dictate whether the reply is logged as coming from a support operator or the contact themselves.
"Send a reply to ticket ID 987654 as an operator thanking the user for their patience, and let them know we have issued a refund."
list_all_tidio_contacts
Searches and lists customer records. This is frequently used to verify email consent or lookup a distinct_id before attempting to create a ticket on a user's behalf.
"Search for any Tidio contacts with the email address j.doe@example.com and tell me if they have opted into email marketing."
tidio_lyro_data_sources_upsert_website
Uploads or updates a website data source for the Lyro AI agent. If the URL already exists, it updates the content; otherwise, it provisions a new data source. This allows your LLM to actively train Tidio's internal AI on new documentation.
"Take this updated pricing policy text and upsert it into the Lyro data sources under the title '2026 Pricing Updates' with the URL 'https://example.com/pricing'."
For the complete tool inventory and granular JSON schemas, visit the Tidio integration page.
Workflows in Action
Connecting these tools allows you to orchestrate autonomous support operations. Here are two concrete examples of how an LLM utilizes the Tidio MCP server.
Scenario 1: Automated Ticket Triage and Reply
When support volume spikes, human agents spend hours just categorizing tickets. You can instruct ChatGPT to act as a level-1 triage bot.
"Fetch the 10 most recent Tidio tickets. For any ticket missing an assigned operator, read the message history. If the issue is related to billing, assign it to department ID 'billing-uuid', set priority to high, and send a reply to the customer stating we are reviewing their invoice."
Execution Steps:
list_all_tidio_tickets- Retrieves the recent queue.get_single_tidio_ticket_by_id- Loops through unassigned tickets to read themessagesarray.update_a_tidio_ticket_by_id- Assigns the department and sets priority.tidio_tickets_reply- Dispatches the automated response to the customer.
sequenceDiagram
participant ChatGPT as ChatGPT
participant MCP as Truto MCP Server
participant Tidio as Tidio API
ChatGPT->>MCP: Call list_all_tidio_tickets
MCP->>Tidio: GET /tickets
Tidio-->>MCP: Array of tickets
MCP-->>ChatGPT: Tool response
ChatGPT->>MCP: Call get_single_tidio_ticket_by_id (id: 123)
MCP->>Tidio: GET /tickets/123
Tidio-->>MCP: Full ticket with messages
MCP-->>ChatGPT: Tool response
Note over ChatGPT: Analyzes intent (Billing)<br>Determines department routing
ChatGPT->>MCP: Call update_a_tidio_ticket_by_id<br>(department, priority)
MCP->>Tidio: PATCH /tickets/123
Tidio-->>MCP: 204 No Content
MCP-->>ChatGPT: Success
ChatGPT->>MCP: Call tidio_tickets_reply
MCP->>Tidio: POST /tickets/123/reply
Tidio-->>MCP: Reply ID
MCP-->>ChatGPT: SuccessScenario 2: Synchronizing Knowledge Base Updates
Support documentation updates frequently. Instead of manually updating Tidio's Lyro AI agent, you can have ChatGPT handle the knowledge sync.
"Read the provided markdown file containing our new refund policy. Upsert this text into the Tidio Lyro data sources. Once completed, query all Lyro data sources and delete the old entry titled 'Legacy Refund Rules'."
Execution Steps:
tidio_lyro_data_sources_upsert_website- Pushes the new markdown text to Lyro as a training source.list_all_tidio_lyro_data_sources- Retrieves the directory of existing AI knowledge documents.delete_a_tidio_product_by_id- Removes the legacy data source to prevent AI contradictions.
flowchart TD
A["Read Markdown<br>Refund Policy"] --> B["tidio_lyro_data_sources_upsert_website"]
B --> C["list_all_tidio_lyro_data_sources"]
C --> D["Identify Stale Data Source<br>'Legacy Refund Rules'"]
D --> E["delete_a_tidio_product_by_id"]Security and Access Control
Exposing an integrated CRM or helpdesk to an LLM requires strict boundary setting. Truto provides four native mechanisms to restrict what an MCP server can execute:
- Method Filtering: You can restrict an MCP server to only perform specific HTTP verbs. Setting
methods: ["read"]ensures the LLM can only executegetandlistoperations, physically preventing it from creating or deleting tickets. - Tag Filtering: Tidio endpoints are grouped by resource tags. You can configure a server to only expose tools tagged with
["tickets"], completely hiding contacts, Lyro data sources, and operator directories from the LLM. - API Token Authentication: By setting
require_api_token_auth: true, possession of the MCP URL is no longer sufficient. The connecting client must also supply a valid Truto API token in the Authorization header, preventing lateral access if the URL leaks. - Automatic Expiration: The
expires_atconfiguration creates a time-bound server. Once the timestamp is reached, the underlying Cloudflare KV storage enforces automatic deletion, and a durable object alarm scrubs the database record.
Strategic Wrap-up
Building AI-driven support operations is an architectural challenge, not just a prompt engineering exercise. The difference between a prototype and a production AI agent lies in how you handle API constraints, authentication states, and schema normalization.
By leveraging Truto to generate a managed MCP server, you remove the burden of writing custom boilerplate, updating JSON schemas when Tidio changes its endpoints, and wrestling with OAuth lifecycles. Truto handles the translation layer, allowing your engineers to focus entirely on building better agentic workflows.
FAQ
- How do I handle Tidio API rate limits with the Truto MCP server?
- Truto passes HTTP 429 rate limit errors directly back to the caller. It standardizes the upstream limits into IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). Your client orchestration layer is responsible for implementing retry and exponential backoff logic.
- Can I prevent ChatGPT from deleting Tidio contacts or tickets?
- Yes. When generating the MCP server URL, you can configure method filtering. By explicitly setting the configuration to methods: ['read'], Truto ensures the LLM only has access to get and list operations, physically blocking any DELETE or POST requests.
- Why does the Tidio Lyro tool take so long to respond?
- Tidio's Lyro answering endpoint is a heavily synchronous operation that processes AI generation on the fly. It can take up to 40 seconds to return an answer. Ensure your client's HTTP timeout settings are configured to accommodate long-polling.
- How do I secure the MCP server URL if I am running headless agents?
- You can enable require_api_token_auth when provisioning the server. This forces any connecting client to supply a valid Truto API token in the Authorization header, adding a strict secondary authentication layer beyond just the URL.