Skip to content

Connect Tawk.to to ChatGPT: Manage Support Tickets and Knowledge Base

Learn how to connect Tawk.to to ChatGPT using a managed MCP server. Automate support ticket triage, live chat analysis, and knowledge base article creation.

Sidharth Verma Sidharth Verma · · 9 min read

If you need to automate your customer support operations, connecting Tawk.to to ChatGPT gives your AI agents read and write access to your helpdesk, live chats, and knowledge base. If your team prefers Anthropic's models, check out our guide on connecting Tawk.to to Claude, or explore our broader architectural overview on connecting Tawk.to to AI Agents.

Giving a Large Language Model (LLM) the ability to parse live chat transcripts, triage offline tickets, and draft knowledge base articles requires a Model Context Protocol (MCP) server. This server translates an LLM's tool calls into standard REST API requests. You can either spend weeks building, hosting, and maintaining a custom MCP server, or you can use a managed integration layer to dynamically generate a secure, authenticated MCP server URL.

This guide breaks down the engineering reality of the Tawk.to API, explains how to use Truto to generate a managed MCP server for Tawk.to, connects it natively to ChatGPT, and demonstrates complex support workflows using natural language.

The Engineering Reality of the Tawk.to API

A custom MCP server is a self-hosted API gateway that handles authentication, schema mapping, and tool execution. While the MCP standard dictates how the LLM interacts with your server, you are still entirely responsible for how your server interacts with the downstream vendor API.

Integrating the Tawk.to API presents several specific architectural challenges that break standard CRUD assumptions. If you build this in-house, your engineering team must solve these problems before your AI agent can successfully execute a single prompt.

The propertyId Multitenancy Maze

Unlike many helpdesks where an agent is simply part of an account, Tawk.to architecture heavily relies on properties (sites or widgets). Nearly every endpoint in the Tawk.to API requires a propertyId as a mandatory parameter. If your organization operates multiple sites, your custom MCP server has to maintain a directory of these IDs and ensure the LLM injects the correct propertyId into every tool call. If the LLM omits it, or hallucinates an ID, the request fails entirely.

The Bifurcation of Live Chats and Tickets

Tawk.to treats real-time live chats and offline emails or form submissions as two distinct data models. A live chat is a conversation, while an async message is a ticket. They do not share the same endpoint or schema. If an LLM needs to summarize a specific customer's interaction history, your MCP server must expose separate tools for list_all_tawk_to_conversations and list_all_tawk_to_tickets. The LLM then has to stitch the distinct schemas together in context to provide a unified timeline.

Complex Knowledge Base Translations

Writing a knowledge base article via the Tawk.to API is not a flat POST request. Articles are bound to a specific siteId and require nested translation payloads. If an LLM attempts to create a KB article, the custom MCP server must correctly format the translation objects (handling the primary site or the specific language translation variant). Failing to map this nested schema correctly results in rejected API calls.

Factual Note on API Rate Limits

Tawk.to enforces strict rate limits on API requests to protect their infrastructure. It is critical to understand how Truto handles these limits. Truto does not retry, throttle, or apply exponential backoff on rate limit errors. When the upstream Tawk.to API returns an HTTP 429 Too Many Requests, Truto passes that exact error back to the caller.

Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification. The caller - whether that is a custom script, an orchestration framework, or the LLM client itself - is entirely responsible for implementing retry and backoff logic. Do not expect Truto to absorb or automatically bypass Tawk.to rate limits.

Step 1: Create the Tawk.to MCP Server

To bridge ChatGPT and Tawk.to, we need to generate an MCP server. Truto handles the OAuth token lifecycles, schema generation, and JSON-RPC 2.0 protocol handling automatically.

There are two ways to generate this server: through the Truto user interface, or programmatically via the Truto API.

Method A: Via the Truto UI

If you prefer a visual setup, you can generate the server directly from your dashboard.

  1. Log into your Truto account and connect a Tawk.to instance (this creates an Integrated Account).
  2. Navigate to the Integrated Accounts page and select your Tawk.to connection.
  3. Click on the MCP Servers tab.
  4. Click Create MCP Server.
  5. Select your desired configuration (e.g., restrict methods to read-only, or filter by specific tags).
  6. Copy the generated MCP server URL (it will look like https://api.truto.one/mcp/a1b2c3...).

Method B: Via the Truto API

For teams building automated onboarding flows, you can dynamically provision MCP servers via a POST request. This is ideal when provisioning unique servers for different tenants or specific internal agents.

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": "Tawk.to Support Agent",
    "config": {
      "methods": ["read", "write", "custom"]
    },
    "expires_at": "2026-12-31T23:59:59Z"
  }'

The API responds with a secure, hash-backed URL that you will use to connect ChatGPT.

{
  "id": "mcp-7a8b9c",
  "name": "Tawk.to Support Agent",
  "url": "https://api.truto.one/mcp/xyz123securetoken"
}

Step 2: Connect the MCP Server to ChatGPT

Once you have the Truto MCP server URL, you must register it with your LLM client so the model can discover the available Tawk.to tools. You can do this visually in ChatGPT, or via a configuration file for local frameworks.

Method A: Via the ChatGPT UI

If you are using the ChatGPT web or desktop client on a supported tier (Pro, Team, Enterprise):

  1. Open ChatGPT and navigate to Settings.
  2. Click on Apps, then open Advanced settings.
  3. Toggle on Developer mode (MCP support requires this flag).
  4. Under the MCP servers or Custom connectors section, click Add a new server.
  5. Give it a recognizable name - like "Tawk.to Support".
  6. Paste the Truto MCP URL into the Server URL field and save.

ChatGPT will perform the MCP handshake, validate the tools, and expose them to the model.

Method B: Via a Configuration File (For Local/Custom Deployments)

If you are using a local agent framework, Claude Desktop, or a custom orchestration layer that relies on configuration files, you connect via Server-Sent Events (SSE).

Add the following JSON to your MCP configuration file (e.g., mcp-settings.json):

{
  "mcpServers": {
    "tawk-to": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "https://api.truto.one/mcp/xyz123securetoken"
      ]
    }
  }
}

When your agent boots, it routes traffic through the SSE transport layer to Truto, fetching the live, dynamically generated Tawk.to tools.

Hero Tools for Tawk.to

Truto automatically derives MCP tools from Tawk.to's actual endpoint documentation, meaning the tools perfectly map to the native API. Here are the highest-leverage tools available for your AI agents. We are highlighting just the core operations - see the link at the end of this section for the complete list.

list_all_tawk_to_tickets

Retrieves a paginated list of offline tickets for a specific Tawk.to property. It supports optional filters by date range, status, tags, and sort order. This tool is vital for agent triage and daily queue monitoring.

"Fetch all open tickets for property ID 987654321 that were created in the last 48 hours and sort them by priority."

list_all_tawk_to_conversations

Retrieves a list of live chats (conversations) for a property. Because live chats and tickets are handled differently in Tawk.to, this tool is required when analyzing real-time customer interactions or auditing chat support performance.

"Pull the most recent live conversations for property ID 987654321. Look through the chat logs and identify any recurring complaints about the checkout process."

Searches through all knowledge base articles based on a query. It scans the title, subtitle, and contents. AI agents use this tool to verify if a documented solution already exists before answering a customer or drafting a new guide.

"Search the knowledge base for 'API rate limits' to see if we already have documentation on how to handle 429 errors."

create_a_tawk_to_kb_article

Creates a new article in the knowledge base, alongside its base translation for a provided site. This allows an AI agent to autonomously write and publish help center content based on identified gaps in the documentation.

"Draft a comprehensive guide on updating billing details. Use the create_a_tawk_to_kb_article tool to publish it to site ID 112233 under the 'Account Management' category."

tawk_to_metrics_ticket_metrics_new

Retrieves granular statistics about new tickets for a property, grouped by date. This tool is essential for managerial AI agents responsible for generating daily operational reports and monitoring support volume spikes.

"Retrieve the new ticket metrics for the last 7 days. Give me a breakdown of the daily volume trends and highlight any unusual spikes."

To view the complete inventory of available Tawk.to tools, required parameters, and JSON schemas, visit the Tawk.to integration page.

Workflows in Action

Exposing individual endpoints to an LLM is useful, but the real power of the Model Context Protocol is orchestration. Because ChatGPT can string multiple tool calls together, you can automate complex, multi-step Tawk.to operations that usually require manual administrative work.

Here are two concrete examples of how an AI agent executes workflows using the Truto MCP server.

Workflow 1: Automated Knowledge Base Gap Analysis

Support teams often answer the same questions repeatedly because the knowledge base is missing crucial articles. A Support Operations Lead can ask ChatGPT to identify these gaps and draft the missing content automatically.

"Analyze the open tickets for property ID 555888. Find the most commonly asked technical question. Search the KB to see if we have an article answering it. If we don't, draft a step-by-step article and publish it to the KB."

How the agent executes this:

  1. Calls list_all_tawk_to_tickets (filtered by status 'open') to pull the latest customer inquiries.
  2. Ingests the ticket messages into its context window and identifies that 40% of the tickets are asking how to reset an admin password.
  3. Calls tawk_to_kb_articles_search with the query "admin password reset" to verify documentation status.
  4. Notes that the search returns zero relevant results.
  5. Calls create_a_tawk_to_kb_article passing a drafted markdown payload, the propertyId, and the siteId to publish the new documentation.

The Support Operations Lead gets a summary confirming the gap was found and the new article is live, saving hours of manual drafting.

sequenceDiagram
    participant User as Operations Lead
    participant ChatGPT as ChatGPT
    participant TrutoMCP as Truto MCP
    participant TawkAPI as Tawk.to API

    User->>ChatGPT: "Analyze tickets and create missing KB docs"
    ChatGPT->>TrutoMCP: Call list_all_tawk_to_tickets
    TrutoMCP->>TawkAPI: GET /v1/tickets
    TawkAPI-->>TrutoMCP: Ticket payloads
    TrutoMCP-->>ChatGPT: Parsed ticket data
    ChatGPT->>TrutoMCP: Call tawk_to_kb_articles_search (query: password)
    TrutoMCP->>TawkAPI: GET /v1/kb/search
    TawkAPI-->>TrutoMCP: Empty results
    TrutoMCP-->>ChatGPT: No articles found
    ChatGPT->>TrutoMCP: Call create_a_tawk_to_kb_article
    TrutoMCP->>TawkAPI: POST /v1/kb/articles
    TawkAPI-->>TrutoMCP: 201 Created
    TrutoMCP-->>ChatGPT: Success
    ChatGPT-->>User: "Drafted and published password reset guide."

Workflow 2: Daily Shift Handoff Reporting

Customer support managers need quick summaries of ticket volume and staff availability before a shift handoff. Manually pulling these metrics from the Tawk.to dashboard is tedious.

"Pull the ticket volume metrics for the last 24 hours. Then pull the list of currently enabled agents. Give me a brief shift handoff summary mapping the volume to the available staff."

How the agent executes this:

  1. Calls tawk_to_metrics_ticket_metrics_new using dynamic date parameters for the last 24 hours.
  2. Calls list_all_tawk_to_agents to retrieve the roster of team members and their status.
  3. Correlates the volume spikes with the active roster to provide a natural language summary.

The manager receives a concise report stating exactly how many tickets arrived overnight and which agents are currently online to handle the backlog.

Security and Access Control

Giving an LLM access to your live support platform introduces operational risk. You do not want a hallucinating agent deleting tickets or revoking agent access. Truto provides strict, server-side access controls bound directly to the MCP token.

  • Method Filtering: When generating the MCP server, you can restrict it to specific HTTP methods. Passing config: { methods: ["read"] } ensures the server will only ever generate tools for GET and LIST endpoints. The LLM simply will not know that deletion or creation tools exist.
  • Tag Filtering: You can restrict the AI's access to specific integration domains. Passing config: { tags: ["knowledge_base"] } ensures the MCP server only exposes tools related to KB articles and sites, fully sandboxing the agent away from live tickets and agent directories.
  • Double Authentication: By setting require_api_token_auth: true, possession of the MCP URL is no longer sufficient to execute a tool. The calling client must also pass a valid Truto API token in the Authorization header, ensuring only verified internal systems can trigger workflows.
  • Time-to-Live (TTL): You can set an expires_at timestamp when creating the server. Once the timestamp passes, Truto automatically destroys the token and schedules a cleanup alarm, ensuring temporary agent sessions cannot be abused weeks later.

Moving Forward

Connecting Tawk.to to ChatGPT transforms your support workflows from manual clicking to natural language orchestration. Instead of forcing engineers to decipher Tawk.to's property ID requirements, nested knowledge base schemas, and disparate chat vs ticket endpoints, you can rely on Truto to handle the translation layer.

By leveraging a managed MCP server, you abstract away the API boilerplate. Your engineering team can focus on writing better prompts and designing smarter AI agents, while Truto ensures the underlying REST communication remains secure, strictly filtered, and highly reliable.

FAQ

How does Truto handle Tawk.to API rate limits?
Truto does not retry, throttle, or apply backoff on rate limit errors. When Tawk.to returns a 429 Too Many Requests error, Truto passes it directly to the caller, mapping the data into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). Your application or orchestration framework must handle the retry logic.
Why do I need a property ID for most Tawk.to tools?
Tawk.to uses a multi-tenant architecture where data is heavily scoped to specific properties (sites or widgets). The API requires a propertyId parameter for almost every endpoint to ensure you are fetching or creating data in the correct workspace.
Can I restrict ChatGPT from deleting tickets in Tawk.to?
Yes. When generating the MCP server in Truto, you can use method filtering (e.g., config: { methods: ["read"] }) to ensure the server only exposes GET and LIST operations. The LLM will not have access to any deletion or creation tools.
Does Tawk.to treat live chats and offline tickets the same way?
No. Live chats are classified as conversations, while offline messages are classified as tickets. They have different data schemas and separate API endpoints. Truto exposes distinct MCP tools for both so your AI agent can manage them appropriately.

More from our Blog