Skip to content

Connect Intercom to ChatGPT: Resolve Conversations and Tickets

Learn how to connect Intercom to ChatGPT using an MCP server. Automate support ticket creation, search conversations, and manage helpdesk replies with AI.

Uday Gajavalli Uday Gajavalli · · 9 min read
Connect Intercom to ChatGPT: Resolve Conversations and Tickets

You want to connect Intercom to ChatGPT so your AI agents can read support queues, reply to users, and escalate complex issues into internal tickets. If your team uses Claude instead, check out our guide on connecting Intercom to Claude or explore our broader architectural overview on connecting Intercom to AI Agents. Here is exactly how to do it using a Model Context Protocol (MCP) server.

Giving a Large Language Model (LLM) read and write access to a live customer messaging platform like Intercom is a serious engineering challenge. You either spend weeks building, hosting, and maintaining a custom MCP server, or you use a managed infrastructure layer that dynamically generates tools from the vendor's API. This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Intercom, connect it natively to ChatGPT, and execute complex support workflows using natural language.

The Engineering Reality of the Intercom API

A custom MCP server is a self-hosted integration layer that translates an LLM's tool calls into REST API requests. While Anthropic's open standard provides a predictable way for models to discover tools, the reality of implementing it against vendor APIs is painful. If you decide to build a custom Intercom MCP server, you are responsible for the entire API lifecycle.

When writing an Intercom ChatGPT integration, you must address several Intercom-specific API quirks that standard CRUD abstractions fail to handle:

The Nested Conversation Parts Model An Intercom conversation is not a simple string of text. The data model begins with a source message, followed by a nested array of conversation_parts that represent replies, notes, state changes, and bot assignments. If you want an LLM to read a conversation and draft a reply, your MCP server must parse this temporal sequence, flatten it, and present it to the model in a way that preserves chronological context. Otherwise, the model will hallucinate the timeline.

Scroll API Pagination Constraints When an LLM needs to ingest a large directory of companies or contacts, standard offset pagination fails at scale. Intercom requires the use of their Scroll API for bulk extraction. However, the Scroll API ties a specific scroll parameter to a 1-minute expiration window. If your LLM pauses for too long to process data or "think" between tool calls, the cursor expires. Your server must instruct the LLM to pass the cursor back immediately or handle the cursor state externally.

Admin Verification and State Transitions Intercom strictly isolates admin actions from user actions. When closing a conversation, snoozing a ticket, or assigning a team member, the payload requires an exact admin_id. Furthermore, the API enforces strict security checks - it will outright reject operations performed on behalf of admins with unverified email addresses. If your MCP server does not expose these constraints in the tool schemas, the LLM will generate malformed requests that fail silently.

Rate Limits and 429 Errors Intercom enforces strict rate limits on their endpoints. Truto does not retry, throttle, or apply backoff on rate limit errors natively. When the upstream Intercom API returns an HTTP 429 Too Many Requests error, Truto passes that error directly 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 - in this case, the LLM agent framework - is entirely responsible for reading the reset header and implementing exponential backoff.

Generating the Intercom MCP Server

Instead of building a proxy server from scratch to handle OAuth, schemas, and routing, you can use Truto to generate a secure Intercom MCP server dynamically. The server translates Intercom's REST resources into JSON-RPC 2.0 tool definitions automatically.

You can generate the MCP server via the Truto dashboard or the management API.

Method 1: Via the Truto UI

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

  1. Log into your Truto environment and navigate to the integrated account page for your connected Intercom instance.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Select your desired configuration. You can optionally restrict the server to specific HTTP methods (like read-only operations) or specific tool tags.
  5. Click Save and copy the generated MCP server URL (e.g., https://api.truto.one/mcp/abc123def456...). Keep this URL safe; it contains a cryptographic token that authenticates the server connection.

Method 2: Via the API

For platform engineers building multi-tenant AI products, you can generate MCP servers programmatically for your customers' connected accounts. Send a POST request to the /integrated-account/:id/mcp endpoint.

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": "Intercom Support Agent MCP",
    "config": {
      "methods": ["read", "write", "custom"]
    }
  }'

The Truto infrastructure validates that the account is active, derives the JSON schemas from the integration's documentation records, stores a secure hashed token, and returns the live MCP server URL in the response payload.

Connecting the MCP Server to ChatGPT

Once you have your Truto MCP server URL, you must register it with your LLM client. All communication between the client and the Truto server happens over HTTP POST with JSON-RPC 2.0 messages.

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

If you are using ChatGPT Pro, Plus, Enterprise, or Education tiers, you can add the server directly as a custom connector.

  1. Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
  2. Toggle on Developer mode (MCP support requires this feature flag).
  3. Under the "MCP servers / Custom connectors" section, click to add a new server.
  4. Give the connector a descriptive name, like "Intercom Helpdesk System".
  5. Paste the Truto MCP URL into the Server URL field.
  6. Save the configuration.

ChatGPT will immediately execute the initialize and tools/list JSON-RPC handshakes, parsing the JSON Schemas returned by Truto to understand exactly which Intercom operations are available.

Method B: Via Manual Config File (for Headless Agents)

If you are building custom agents using LangChain, CrewAI, or local development environments, you can configure your framework to connect to the remote Truto MCP URL using Server-Sent Events (SSE).

Here is an example configuration file instructing an MCP client host to use the SSE transport:

{
  "mcpServers": {
    "intercom_production": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/<YOUR_TRUTO_TOKEN>"
      ]
    }
  }
}

Because Truto dynamically builds a flat input namespace, query parameters and body parameters are presented to the LLM as a single object. Truto's proxy routing layer automatically separates the arguments based on the Intercom target schema before executing the request.

Hero Tools for Intercom Automation

Truto automatically generates tools for every documented resource on the Intercom integration. Here are the highest-leverage tools an LLM needs to operate effectively as a support agent.

list_all_intercom_search_conversations

This tool allows the LLM to search for active, snoozed, or closed conversations using Intercom's query object syntax. It supports nested filters, making it highly effective for finding conversations assigned to specific teams or matching specific tag criteria.

"Find all open conversations assigned to my admin ID where the user has mentioned 'billing error' in the past 24 hours."

get_single_intercom_conversation_by_id

This is the critical context-gathering tool. It fetches a specific conversation by ID and returns the full history, including the initial source message, contact details, tags, priority state, and the array of conversation_parts. The LLM must call this to understand the back-and-forth thread before replying.

"Retrieve conversation ID 10934855 and summarize the customer's primary complaint, noting what troubleshooting steps the previous agent took."

intercom_conversations_reply

This tool appends a new message to an existing conversation thread. The LLM can draft and send a reply as an admin. The tool requires the conversation ID and the payload containing the body of the message and the acting admin's identifier.

"Draft a polite response to conversation 10934855 acknowledging the delay, confirming their refund has been processed, and send the reply."

intercom_conversations_manage

Instead of just talking to the customer, agents must manage state. This tool handles the operational lifecycle of a conversation. The LLM can use it to close resolved issues, open new threads, snooze conversations awaiting customer response, or reassign tickets to a different admin tier.

"The customer confirmed the workaround fixed the issue. Close conversation ID 10934855 and tag it with 'resolved-workaround'."

create_a_intercom_ticket

When a standard conversation exceeds tier-one support, it must be escalated to a structured ticket. This tool creates a ticket tied to specific ticket_type_id and attaches the required contact models. It allows the LLM to hand off technical bugs to engineering queues.

"This user is experiencing a reproducible crash on iOS. Create an Intercom ticket of type 'Engineering Bug', title it 'iOS Crash on Login', and attach the current contact."

get_single_intercom_visitor_by_id

Support agents need user context to provide accurate answers. This tool retrieves a deep profile of the visitor or user, including custom attributes, company associations, recent location data, session counts, and UTM parameters. It prevents the LLM from asking the user for information the system already has.

"Before I answer this user, pull their visitor profile and check what pricing plan their associated company is currently on."

To view the complete schema definitions and the full inventory of available Intercom tools - including operations for managing Help Centers, Articles, Tags, and Newsfeeds - visit the Truto Intercom integration page.

Workflows in Action

Once connected, ChatGPT stops acting as a basic text generator and becomes an active participant in your support operations. Here is how an AI agent strings these tools together to execute real work.

Scenario 1: Triaging and Resolving a Billing Dispute

Customer service queues are often clogged with repetitive billing inquiries. Instead of a human agent context-switching, an AI agent can handle the entire lifecycle of a standard dispute.

Prompt: "Check the support queue for any new open conversations containing the word 'refund'. Read the latest one, check the user's plan tier, and draft a reply letting them know we will process it within 3-5 business days. Once sent, snooze the conversation for 3 days."

  1. list_all_intercom_search_conversations: The LLM constructs a query object filtering for state: open and keyword "refund", retrieving a list of matching conversation IDs.
  2. get_single_intercom_conversation_by_id: The model selects the most recent ID and pulls the full conversation_parts array to read the thread history.
  3. get_single_intercom_visitor_by_id: The model looks up the contact attached to the conversation to verify their account tier.
  4. intercom_conversations_reply: Satisfied with the context, the LLM constructs an RFC-compliant JSON payload to append a reassuring response to the thread.
  5. intercom_conversations_manage: The LLM immediately follows up by setting the conversation state to snoozed with a timestamp 72 hours in the future.

Scenario 2: Escalating a Technical Bug to Engineering

When a customer reports an issue that requires code changes, support agents must collect diagnostic data and create an engineering ticket. An LLM can automate this escalation.

Prompt: "Read conversation 5099231. The user is reporting a 500 error on the checkout page. If they provided steps to reproduce, escalate this by creating a new Engineering ticket, attach the user's contact record, and close the original conversation."

  1. get_single_intercom_conversation_by_id: The LLM reads the thread and identifies the steps the user provided to trigger the 500 error.
  2. list_all_intercom_ticket_types: (If the LLM doesn't have the ticket ID cached), it queries the workspace to find the exact id for the "Engineering" ticket type.
  3. create_a_intercom_ticket: The LLM formats a new ticket payload, populating the description with the steps to reproduce, and linking the user's contact ID.
  4. intercom_conversations_reply: The model drafts a quick note to the user: "I have escalated this to our engineering team under ticket #X."
  5. intercom_conversations_manage: The model sets the original conversation state to closed to keep the support inbox clean.

Security and Access Control

Exposing your live Intercom workspace to an autonomous agent requires strict governance. Truto's MCP architecture provides multiple layers of access control built directly into the server token configuration.

  • Method Filtering: You can enforce immutability by restricting an MCP server to methods: ["read"]. If an LLM attempts to call a create or update tool, the server drops the request. This allows you to build safe, read-only analytics agents.
  • Tag Filtering: You can scope server access by integration tags. For example, passing tags: ["support"] during server creation ensures the LLM only sees tools related to tickets and conversations, completely blocking access to billing or CRM endpoints.
  • Secondary Authentication (require_api_token_auth): By default, possessing the MCP URL grants access. By setting this flag to true, Truto forces the client to also pass a valid Truto API token in the Authorization header. This guarantees that even if a server URL is exposed in logs, the tools cannot be executed without secondary credentials.
  • Automatic Expiration (expires_at): You can assign a strict time-to-live using an ISO datetime. Cloudflare KV automatically revokes the token, and a Durable Object alarm purges the database record, ensuring zero stale access remains for temporary contractors or ephemeral agent testing.

FAQ

Does Truto automatically handle Intercom rate limit retries?
No. Truto passes 429 Too Many Requests errors directly to the caller. However, Truto normalizes the upstream rate limit information into standard headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) so your LLM client can accurately calculate exponential backoff.
How does the MCP server handle Intercom's nested conversation parts?
The MCP server flattens Intercom's response schemas. When you query a conversation, the tool returns the source message along with the array of conversation_parts, allowing the LLM to read the chronological thread before replying.
How do I secure the Intercom MCP server?
Truto allows you to secure the MCP server using Method Filtering (e.g., read-only access), Tag Filtering to limit endpoints, automatic expiration timestamps, and a require_api_token_auth flag that forces secondary credential validation.

More from our Blog