IN

Intercom MCP Server for Support Ticket Access

Enable AI assistants to access and analyze Intercom support tickets with an MCP server for secure ticket retrieval and streamlined customer support workflows.

Quick Install
npx -y @raoulbia-ai/mcp-server-for-intercom

Overview

This MCP (Model Context Protocol) server exposes Intercom support ticket data in a controlled, GPT/assistant-friendly format so external AI assistants can request ticket content and related metadata as model context. By acting as a bridge between your Intercom workspace and AI models, the server lets assistants fetch only the data they need (entire conversations, single messages, attachments, or metadata) without giving direct Intercom credentials to third-party models.

Using an MCP server keeps data access auditable and scoped: the server authenticates and rate-limits requests, resolves Intercom API tokens on your backend, and returns responses formatted for consumption by LLMs or orchestration layers. This is useful for automated reply generation, ticket summarization, triage, and any workflow that needs accurate conversation history as context.

Features

  • Implements an MCP-style HTTP API for exposing ticket content and metadata to AI assistants
  • Secure retrieval of Intercom conversations via a server-side Intercom access token
  • Support for fetching full conversations, specific messages, and attachments
  • Optional search/lookup endpoints to find tickets by user email, external_id, or subject
  • Configurable authorization for AI requester (API key / JWT)
  • Docker-ready and configurable via environment variables
  • Simple JSON responses optimized for LLM context ingestion

Installation / Configuration

Clone the repository and install dependencies (example uses Node.js):

git clone https://github.com/raoulbia-ai/mcp-server-for-intercom.git
cd mcp-server-for-intercom
npm install

Environment variables (example .env):

# Intercom API token with read access to conversations
INTERCOM_ACCESS_TOKEN=your_intercom_bearer_token_here

# Secret used to sign or validate incoming MCP requests (JWT or HMAC)
MCP_SIGNING_KEY=long_random_secret

# Port to run the server on
PORT=3000

# Optional CORS origin(s) allowed for incoming MCP requests
ALLOWED_ORIGINS=https://your-assistant-host.example.com

Start the server locally:

# via npm
npm start

# or with Node for development
NODE_ENV=development node src/index.js

Docker:

docker build -t mcp-intercom .
docker run -e INTERCOM_ACCESS_TOKEN="$INTERCOM_ACCESS_TOKEN" \
  -e MCP_SIGNING_KEY="$MCP_SIGNING_KEY" \
  -p 3000:3000 mcp-intercom

Available Resources

The server exposes a small set of HTTP endpoints that AI assistants or orchestration layers can call to retrieve ticket context. Example routes (paths may vary by implementation):

  • GET /mcp/tickets/{ticket_id}
    • Returns the full conversation thread, messages, and basic metadata (assignee, status, tags)
  • GET /mcp/tickets/{ticket_id}/messages
    • Returns ordered message list suitable for context windows
  • GET /mcp/tickets/{ticket_id}/attachments/{attachment_id}
    • Redirects or proxies attachment content (image, file) with appropriate headers
  • GET /mcp/search?email={email}&query={q}
    • Search tickets by user email, external_id, or subject for quick lookup
  • POST /mcp/validate
    • (Optional) Validate a signed request or exchange a token

Sample curl to fetch a ticket (replace host/token):

curl -H "Authorization: Bearer <MCP_CLIENT_TOKEN>" \
     https://mcp-server.example.com/mcp/tickets/12345

Responses are JSON formatted for LLM consumption, with fields like id, subject, participants, messages [{author, role, timestamp, body}], and metadata.

Use Cases

  • Assistants that draft replies: fetch the latest conversation and generate a suggested response with the correct context, customer name, and recent messages.
  • Automated triage: run an LLM to classify new tickets (bug, billing, feature request) using the conversation and metadata returned by the MCP server.
  • Summarization and agent briefing: pull ticket history to create short summaries or “what happened” bullets for human agents before they take over.
  • Embedding and search: fetch ticket text to create embeddings for semantic search or to enrich knowledge bases without exposing raw Intercom tokens.
  • Audit and compliance: centralize logging of AI accesses to customer conversations by funneling all requests through this server.

Security & Best Practices

  • Store INTERCOM_ACCESS_TOKEN securely (secrets manager) and don’t embed in client-side code.
  • Use TLS for all traffic and restrict ALLOWED_ORIGINS for the MCP endpoints.
  • Scope Intercom tokens to read-only where possible and rotate credentials regularly.
  • Enforce smallest-possible exposure: return only the fields required by your assistant.
  • Rate-limit and log requests to detect anomalous access patterns.

Troubleshooting

  • 401 Unauthorized: Check MCP_SIGNING_KEY and the Authorization header provided by the client.
  • 403 Forbidden: Ensure ALLOWED_ORIGINS and CORS settings allow your assistant host.
  • 502/504 errors: Validate INTERCOM_ACCESS_TOKEN and network connectivity to Intercom API.
  • Missing messages: Confirm the Intercom token has permissions to read conversation content and related attachments.

If you need to extend behavior (e.g., additional filters, custom sanitization), the server is intended to be a small, modifiable bridge—add middleware to transform or redact fields before returning them to AI clients.