Skip to main content
Back to the Intercom MCP server

MCP Gateway · OpenCode

Intercom icon

Connect Intercom to OpenCode

Support engineers who work in a terminal can look up Intercom conversations, contacts and companies without opening the inbox. OpenCode connects to it as a remote server in its config, with sign-in on first use. Speakeasy's OpenCode plugin checks prompts and tool calls before they run, and tool output can be blocked at the gateway.

Category
Communication
Tools
13
Authentication
OAuth
OpenCode
Terminal

Behind the MCP Gateway

Run Intercom MCP behind the MCP Gateway

One URL for every agent, sign-in through your IdP, RBAC down to the tool, and every Intercom call inspected and logged.

Deploy on MCP Gateway

Before you start

What Intercom needs first

A user who can create and configure an OAuth app in the Intercom Developer Hub does the Intercom side of the setup.

  • The workspace must be hosted in the US or EU. Australian-hosted workspaces are not supported.
  • You need permission to create and configure an OAuth app for the workspace.
  • Intercom does not name a required plan or administrator role.

In Intercom

  1. Identify the workspace region from its hostname.
  2. Create an app in the Developer Hub.
  3. Enable OAuth, add the Speakeasy redirect URL, and select read permissions.
  4. Copy the Client ID and Client secret.
Full Intercom setup guide in the docs

Set up

Add Intercom to OpenCode in 4 steps

  1. 01

    Add Intercom from the catalog

    An admin finds Intercom in the MCP Catalog (MCP Gateway > MCP > Catalog) and clicks Add. Speakeasy registers the vendor's server as a remote MCP server and proxies sessions to it. Nothing is copied or re-hosted.

    Intercom uses OAuth. Servers that support dynamic client registration get their OAuth configuration applied automatically.

    Where MCP-scoped policies are enabled, the install offers a recommended risk policy for the new server that detects secrets and PII and inspects tool requests and responses.

  2. 02

    Choose who can use Intercom

    Give teams the mcp:connect scope on the Intercom server through team access or a role. OpenCode connects to the Intercom server's own URL, and the server's authorization decides who can connect and which tools they can call.

  3. 03

    Connect OpenCode

    Add the server to OpenCode's own mcp config block as a remote server.

    Copy the server's URL from its hosted install page in Speakeasy.

    Add it to the mcp block of your OpenCode config with type set to remote.

    Restart OpenCode and sign in when prompted.

    {
      "mcp": {
        "<server slug>": {
          "type": "remote",
          "url": "<URL from the hosted install page>"
        }
      }
    }
  4. 04

    Sign in and use Intercom from OpenCode

    The first time OpenCode connects, it opens a browser so the person can sign in to Speakeasy through your identity provider.

    Intercom needs its own OAuth grant, so each person connects it once. Until they do, Intercom calls fail while the rest of the gateway keeps working.

    From then on, Intercom's tools appear in OpenCode, limited to what the person's access allows, and every call lands in the gateway's tool logs.

OpenCode doesn't receive MCP servers from plugins. The observability package is installed separately, from a ZIP or with speakeasy-hooks install --provider=opencode, and the device agent can maintain it.

Use cases

What OpenCode users do with Intercom

Search the inbox from the terminal

Run one search across conversations or contacts, then fetch the full record for the result you need by its prefixed ID or Intercom URL.

searchfetch

List companies in a segment

Before running a data migration, list the Intercom companies in a segment or with a given tag to confirm which accounts the script will touch.

list_companies

Check a contact's last activity

When a customer says they never received access, OpenCode pulls their contact record to check role, signup information and when they were last seen.

get_contact

Tools

13 tools

Each Intercom tool can be allowed or denied per team and role at the MCP Gateway before OpenCode sees it.

search_conversations

Search for Intercom conversations using multiple filter criteria.

get_conversation

Retrieve complete details for a specific Intercom conversation.

search_contacts

Search for Intercom contacts using multiple filter criteria.

get_contact

Retrieve complete details for a specific Intercom contact.

list_companies

List Intercom companies with optional filters.

get_company

Retrieve complete details for a specific Intercom company.

See all 13 tools

Control

What Speakeasy can see and stop in OpenCode

The gateway covers every client the same way. The rest depends on what OpenCode exposes to Speakeasy.

Tool logs

Gateway

Every Intercom call is logged with the person and the client that made it.

Access by role

Gateway

People reach only the Intercom tools their team or role allows.

Request and response blocking

Gateway

A risk policy scoped to Intercom can reject a tool request before it reaches the server, or withhold a result from OpenCode. MCP-scoped policies are enabled per organization.

Prompt and tool-call blocking

OpenCode

The OpenCode plugin sends each prompt and tool call to Speakeasy, which allows or denies it before it runs.

Usage telemetry

OpenCode

Token and cost totals flow through the plugin, reported per turn.

Device agent

OpenCode

The device agent installs and maintains the observability package.

  • OpenCode has no OpenTelemetry exporter, so session data comes through the plugin.
  • Tool output is blocked at the gateway rather than in OpenCode's hooks.

Questions

Frequently asked questions

How is OpenCode's Intercom usage recorded?
OpenCode has no OpenTelemetry exporter, so session data comes through the plugin. Token and cost totals flow through it, reported per turn.
Which Intercom region does the workspace need to be in?
The workspace must be hosted in the US or EU, which you can tell from its hostname. Australian-hosted workspaces are not supported.
How do OpenCode users get Intercom?
An admin adds Intercom from the Speakeasy MCP Catalog and grants access by team or role. Add the server to OpenCode's own mcp config block as a remote server. Each person then sees only the Intercom tools their access allows.
Are Intercom calls from OpenCode logged?
Yes. Intercom calls go through the MCP Gateway, which logs each tool call and attributes it to the person and the client that made it.

Connect more

Intercom in other clients

AI everywhere.

Control here.