Connect Kayako to ChatGPT: Manage Cases, Users, and Help Center
A definitive engineering guide to connecting Kayako to ChatGPT using a managed MCP server. Automate ticket triage, user identities, and help center operations.
If you need to connect Kayako to ChatGPT to automate support triage, manage customer identities, or draft replies using help center context, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between ChatGPT's tool calls and Kayako's REST APIs. 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 Claude, check out our guide on connecting Kayako to Claude or explore our broader architectural overview on connecting Kayako to AI Agents.
Giving a Large Language Model (LLM) read and write access to a complex helpdesk like Kayako is a massive engineering challenge. You have to handle complex conversational data payloads, map dynamic custom fields to MCP tool definitions, and deal with strict pagination logic. Every time you want to expose a new endpoint, your custom server code must be updated, redeployed, and tested.
This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Kayako, connect it natively to ChatGPT, and execute complex support workflows using natural language.
Stop writing boilerplate API integration code. Let Truto generate secure, managed MCP servers for your AI agents in seconds. :::
The Engineering Reality of the Kayako 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, implementing it against Kayako's heavily nested API architecture is exceptionally painful.
If you decide to build a custom MCP server for Kayako, you own the entire API lifecycle. Here are the specific integration challenges that break standard CRUD assumptions when working with Kayako:
Cases vs. Posts and Shadow Posts
Unlike simpler ticketing systems where a ticket contains its description, Kayako separates the container from the content. A "Case" is merely a metadata container holding status, assignee, and SLA data. The actual conversation happens in "Posts". When an LLM asks "What is this ticket about?", a standard GET /api/v1/cases/:id will not contain the message body. Your MCP server must know to chain a secondary call to /api/v1/cases/:id/posts. Furthermore, Kayako uses "Shadow Posts" for drafted or internal system notes, meaning your parsing logic must differentiate between public replies, agent whispers, and system events to avoid leaking internal notes to a customer-facing AI agent.
Polymorphic Identity Management
Users in Kayako do not just have an email string. They possess "Identities" which are polymorphic sub-resources. A user might have an identity_email, an identity_phone, an identity_twitter, and an identity_facebook. If an AI agent needs to update a user's contact information, it must query the correct specific identity endpoint based on the channel type. Hardcoding these varied schemas into static MCP tool definitions requires massive, brittle JSON schemas that break whenever Kayako adds a new channel type.
Rate Limits and 429 Handling
Kayako enforces strict rate limits to protect its infrastructure. When your AI agent attempts to summarize 50 historical tickets for context, it will likely hit these ceilings. It is critical to note that Truto does not retry, throttle, or apply backoff on rate limit errors. When the upstream Kayako API returns an HTTP 429 Too Many Requests error, Truto passes that error directly to the caller.
Truto does, however, normalize the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification. The caller (your AI agent framework or custom script) is entirely responsible for reading these headers and implementing exponential backoff. If your custom server fails to handle the rejection gracefully, the LLM will assume the tool call succeeded and hallucinate a response.
How to Generate a Kayako MCP Server
Instead of building this translation layer from scratch, you can use Truto to dynamically generate an MCP server. Truto derives tool definitions directly from its internal integration documentation, meaning tools are generated dynamically on every request.
You can create this server in two ways: via the Truto UI or programmatically via the API.
Method 1: Via the Truto UI
For ad-hoc agent testing or internal workflows, the UI is the fastest path.
- Navigate to the Integrated Accounts page in your Truto dashboard.
- Select your connected Kayako account.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Select your desired configuration (e.g., restrict to
readmethods only, or filter by specific tags likesupport). - Copy the generated MCP server URL (e.g.,
https://api.truto.one/mcp/a1b2c3d4e5f6...).
Method 2: Via the API
For production workflows where you deploy AI agents programmatically, you can generate MCP servers via a simple REST call.
Make a POST request to /integrated-account/:id/mcp:
curl -X POST https://api.truto.one/admin/integrated-account/YOUR_ACCOUNT_ID/mcp \
-H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Kayako ChatGPT Agent",
"config": {
"methods": ["read", "write", "custom"],
"tags": ["cases", "users", "help_center"]
},
"expires_at": "2026-12-31T23:59:59Z"
}'The API validates that the integration is AI-ready, hashes a secure token stored in Cloudflare KV, and returns the ready-to-use endpoint:
{
"id": "mcp_8a9b0c1d2",
"name": "Kayako ChatGPT Agent",
"config": {
"methods": ["read", "write", "custom"],
"tags": ["cases", "users", "help_center"]
},
"expires_at": "2026-12-31T23:59:59.000Z",
"url": "https://api.truto.one/mcp/a1b2c3d4e5f67890"
}How to Connect the MCP Server to ChatGPT
Once you have the Truto MCP server URL, connecting it to ChatGPT takes seconds. Because the Truto MCP token embeds the integrated account context cryptographically, the URL is entirely self-contained.
Method A: Via the ChatGPT UI
If you are using ChatGPT Enterprise, Pro, or Plus with Developer Mode enabled:
- Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
- Toggle Developer mode on.
- Under the MCP servers / Custom connectors section, click Add new server.
- Enter a name (e.g., "Kayako Integration").
- Paste the Truto MCP URL into the Server URL field.
- Click Save.
ChatGPT will perform an initialization handshake (initialize), request the available tools (tools/list), and instantly make them available in your chat context.
Method B: Via Manual Config File (SSE Transport)
If you are running a local agent setup, a LangChain script, or utilizing the Claude Desktop app as a test harness for OpenAI models, you can define the connection using the standard JSON configuration approach. You use the Server-Sent Events (SSE) client to bridge the remote URL.
{
"mcpServers": {
"kayako-prod": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"--url",
"https://api.truto.one/mcp/a1b2c3d4e5f67890"
]
}
}
}Hero Tools for Kayako Automation
Truto exposes over a hundred Kayako endpoints as AI-ready tools. The MCP router handles flattening the input namespace, meaning the LLM simply passes arguments, and Truto intelligently routes them to query parameters or request bodies based on the underlying schema. Here are the highest-leverage tools for Kayako.
1. list_all_kayako_cases
This tool allows the LLM to pull a paginated list of conversations. It supports filtering by specific channels, statuses, and assignees. Crucially, the auto-injected schema explicitly tells the LLM to pass back the next_cursor unchanged to handle pagination properly.
"Find all open Kayako cases assigned to the billing team that were updated in the last 24 hours."
2. get_single_kayako_case_by_id
Retrieves the metadata shell of a specific conversation, including its priority, SLA metrics, and custom field values. This is almost always the prerequisite tool call before an agent dives into the actual conversation contents.
"Get the details for Kayako case #8492. Tell me what its current SLA status is and who it is assigned to."
3. kayako_cases_list_posts
Because Kayako separates case metadata from message content, this tool is required to actually read the emails, chats, and internal notes associated with a case. It returns the sequence of posts, attachments, and creator identities.
"Fetch the conversation history for case #8492. Summarize the back-and-forth between the customer and our support agent."
4. kayako_cases_create_reply
This custom method executes a POST request to add a new reply to a case. The LLM must specify the contents (the message body) and the channel (e.g., MAIL, HELPCENTER).
"Draft a polite response to case #8492 explaining that their refund has been processed, and send the reply via the MAIL channel."
5. kayako_articles_search
Connecting an AI agent directly to the Kayako Help Center turns it into a high-powered technical support rep. This tool allows the LLM to search published articles by query string, retrieving the HTML contents to formulate accurate replies.
"Search the Kayako help center for articles about 'SSO configuration' and use the steps provided to answer the customer's question in case #9001."
6. update_a_kayako_user_by_id
Updates a core user record. This is vital for identity and access management workflows, allowing an agent to modify roles, organization associations, and contact flags.
"Update user ID 4059 in Kayako. Change their role to 'Administrator' and ensure their account is marked as active."
To view the complete inventory of available tools, including detailed schemas for SLA rules, custom views, and webhooks, visit the Kayako integration page.
Workflows in Action
When you combine a reasoning model like ChatGPT with the deterministic execution of the Kayako MCP server, you can orchestrate complex, multi-step operations that used to require dedicated engineering time or messy Zapier workflows.
Scenario 1: Automated Triage and SLA Tagging
Support teams waste hours categorizing incoming tickets. An AI agent can continuously run in the background, analyzing intent and applying strict rules.
Prompt: "Check the latest 10 open Kayako cases. Read the conversation history for each. If the customer mentions 'server down' or 'data loss', update the case priority to 'URGENT' and add the tag 'escalated'."
Tool Execution Trace:
list_all_kayako_cases(Parameters: limit 10, status 'open')- The agent loops through the returned IDs, calling
kayako_cases_list_postsfor each. - It analyzes the
contentsof the posts. - For any matching criteria, it calls
update_a_kayako_case_by_idto adjust the priority. - It immediately follows up by calling
kayako_case_tags_addwith the new tag.
Outcome: Critical cases are immediately bubbled to the top of the queue without human intervention.
sequenceDiagram
participant LLM as ChatGPT
participant MCP as Truto MCP Server
participant API as Kayako API
LLM->>MCP: Call list_all_kayako_cases
MCP->>API: GET /api/v1/cases
API-->>MCP: Array of Case IDs
MCP-->>LLM: Return IDs
loop For each Case ID
LLM->>MCP: Call kayako_cases_list_posts
MCP->>API: GET /api/v1/cases/{id}/posts
API-->>MCP: Conversation threads
MCP-->>LLM: Return message content
opt Mentions "Data Loss"
LLM->>MCP: Call update_a_kayako_case_by_id
MCP->>API: PUT /api/v1/cases/{id}
API-->>MCP: Priority Updated
MCP-->>LLM: Success confirmation
end
endScenario 2: Autonomous Help Center Resolution
Instead of just routing tickets, ChatGPT can actively attempt to solve them by relying entirely on your approved documentation.
Prompt: "Read the latest message on case #15502. Search the help center to find a solution. If you find a matching article, draft a reply to the customer summarizing the steps and link the article. If you don't find a clear answer, leave an internal note for the human agent explaining what you searched for."
Tool Execution Trace:
kayako_cases_list_posts(Fetch the latest customer inquiry).kayako_articles_search(Query the help center based on extracted keywords).- Depending on the search results:
- Success path: Calls
kayako_cases_create_replyto send the email to the customer. - Fail path: Calls
kayako_user_notes_create_note(or creates a shadow post) to leave an internal briefing for the human assigned to the ticket.
- Success path: Calls
Outcome: Tier 1 support tickets are deflected asynchronously, maintaining high customer satisfaction while strictly adhering to company documentation.
Scenario 3: Bulk User Audit and Cleanup
Maintaining a clean CRM or Helpdesk directory is notoriously difficult. AI agents excel at tedious data reconciliation.
Prompt: "Retrieve all Kayako users belonging to organization ID 50. Check if they have an active Twitter identity. If their Twitter identity is not validated, delete that specific identity record."
Tool Execution Trace:
kayako_organizations_list_members(Parameters: organization_id 50).- The LLM iterates through the returned user array, calling
list_all_kayako_identity_twitterfor eachuser_id. - It inspects the
is_validatedflag in the JSON response. - For invalid records, it calls
delete_a_kayako_identity_twitter_by_id.
Outcome: Your database stays pristine, preventing marketing campaigns or support macros from failing due to stale or unverified social handles.
Security and Access Control
Exposing an enterprise helpdesk to an LLM requires strict boundaries. Truto provides several mechanisms to lock down your MCP servers at the configuration level, ensuring models cannot hallucinate destructive actions.
- Method Filtering: When creating the server, you can restrict
config.methodsto["read"]. This hard-blocks anycreate,update, ordeletetools from being generated, creating a strictly read-only AI agent. - Tag Filtering: You can use
config.tags(e.g.,["help_center"]) to restrict the LLM to only see tools related to articles and sections, completely hiding conversation and user data. - Expiration (
expires_at): You can set a strict TTL for the server. The underlying Cloudflare KV records will automatically expire, and a Durable Object alarm ensures the database entry is scrubbed, preventing stale credentials from lingering. - Extra Authentication (
require_api_token_auth): By default, possessing the MCP URL grants access. Enabling this flag adds a secondary authorization middleware, requiring the MCP client to pass a valid Truto API token in the headers. This ensures only authenticated internal infrastructure can execute tool calls.
Next Steps
Connecting ChatGPT to Kayako via MCP shifts your architecture from brittle, point-to-point integration scripts to deterministic, documentation-driven tool calling. By abstracting away the pagination nuances, nested schemas, and varied identity models of the Kayako API, your engineering team can focus on orchestrating agentic logic rather than maintaining API boilerplate.
With Truto handling the token generation, schema derivation, and protocol translation, you can deploy production-ready AI support agents in minutes.
Stop wrestling with Kayako's complex API schemas. Let Truto generate secure, managed MCP servers for your AI agents today. :::
FAQ
- How does Truto handle Kayako API rate limits?
- Truto does not absorb or retry on Kayako's rate limit errors. When the Kayako API returns an HTTP 429 error, Truto passes it directly to the caller, normalizing the response headers to the IETF standard (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller must implement their own exponential backoff.
- Can I prevent ChatGPT from modifying customer data in Kayako?
- Yes. When creating the MCP server via Truto, you can configure the methods array to include only "read". This ensures no create, update, or delete tools are generated, resulting in a strictly read-only integration.
- Why can't I see conversation messages when getting a case by ID?
- Kayako's architecture separates the case metadata from its content. To read the conversation, you must first call get_single_kayako_case_by_id and then use the kayako_cases_list_posts tool to fetch the actual messages (posts).
- Does Truto support custom fields in Kayako?
- Yes. Truto's dynamic tool generation derives schemas directly from the active API documentation, meaning custom fields configured in your Kayako instance are passed natively through the MCP tools without manual mapping.