Skip to main content
Glama
raoulbia-ai

MCP Server for Intercom

对讲机的 MCP 服务器

符合 MCP 标准的服务器,使 AI 助手能够访问和分析来自 Intercom 的客户支持数据。

特征

  • 使用高级过滤功能搜索对话和工单

  • 按客户、状态、日期范围和关键字进行过滤

  • 即使没有联系人也可以通过电子邮件内容进行搜索

  • 通过 Intercom 的搜索 API 进行高效的服务器端过滤

  • 与符合 MCP 标准的 AI 助手无缝集成

Related MCP server: Claude AI Documentation Assistant

安装

先决条件

  • Node.js 18.0.0 或更高版本

  • 具有 API 访问权限的 Intercom 帐户

  • 您的 Intercom API 令牌(可在您的 Intercom 帐户设置中找到)

快速设置

使用 NPM

# Install the package globally
npm install -g mcp-server-for-intercom

# Set your Intercom API token
export INTERCOM_ACCESS_TOKEN="your_token_here"

# Run the server
intercom-mcp

使用 Docker

默认的 Docker 配置针对 Glama 兼容性进行了优化:

# Start Docker (if not already running)
# On Windows: Start Docker Desktop application
# On Linux: sudo systemctl start docker

# Build the image
docker build -t mcp-intercom .

# Run the container with your API token and port mappings
docker run --rm -it -p 3000:3000 -p 8080:8080 -e INTERCOM_ACCESS_TOKEN="your_token_here" mcp-intercom:latest

验证步骤:

# Test the server status
curl -v http://localhost:8080/.well-known/glama.json
# Test the MCP endpoint
curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"mcp.capabilities"}' http://localhost:3000
替代标准版本

如果您更喜欢没有 Glama 特定依赖项的轻量级版本:

# Build the standard image
docker build -t mcp-intercom-standard -f Dockerfile.standard .

# Run the standard container
docker run --rm -it -p 3000:3000 -p 8080:8080 -e INTERCOM_ACCESS_TOKEN="your_token_here" mcp-intercom-standard:latest

默认版本包含与 Glama 平台集成所需的特定依赖项和配置,而标准版本则更加轻量级。

可用的 MCP 工具

1. list_conversations

使用内容过滤检索某个日期范围内的所有对话。

参数:

  • startDate (DD/MM/YYYY) – 开始日期(必填)

  • endDate (DD/MM/YYYY) – 结束日期(必填)

  • keyword (字符串) – 筛选包含此文本的对话

  • exclude (字符串) – 过滤以排除包含此文本的对话

笔记:

  • 日期范围不得超过 7 天

  • 通过 Intercom 的搜索 API 使用高效的服务器端过滤

例子:

{
  "startDate": "15/01/2025",
  "endDate": "21/01/2025",
  "keyword": "billing"
}

2. search_conversations_by_customer

查找特定客户的对话。

参数:

  • customerIdentifier (字符串) – 客户电子邮件或 Intercom ID(必需)

  • startDate (DD/MM/YYYY) – 可选开始日期

  • endDate (DD/MM/YYYY) – 可选结束日期

  • keywords (数组) – 按内容过滤的可选关键字

笔记:

  • 即使没有联系人,也可以通过电子邮件内容查找对话

  • 将电子邮件解析为联系人 ID,以便高效搜索

例子:

{
  "customerIdentifier": "customer@example.com",
  "startDate": "15/01/2025",
  "endDate": "21/01/2025",
  "keywords": ["billing", "refund"]
}

3. 按状态search_tickets_by_status

根据票证状态检索票证。

参数:

  • status (字符串)——“打开”、“待定”或“已解决”(必需)

  • startDate (DD/MM/YYYY) – 可选开始日期

  • endDate (DD/MM/YYYY) – 可选结束日期

例子:

{
  "status": "open",
  "startDate": "15/01/2025",
  "endDate": "21/01/2025"
}

4. search_tickets_by_customer

查找与特定客户相关的票证。

参数:

  • customerIdentifier (字符串) – 客户电子邮件或 Intercom ID(必需)

  • startDate (DD/MM/YYYY) – 可选开始日期

  • endDate (DD/MM/YYYY) – 可选结束日期

例子:

{
  "customerIdentifier": "customer@example.com",
  "startDate": "15/01/2025",
  "endDate": "21/01/2025"
}

使用 Claude Desktop 进行配置

添加到您的claude_desktop_config.json

{
  "mcpServers": {
    "intercom-mcp": {
      "command": "intercom-mcp",
      "args": [],
      "env": {
        "INTERCOM_ACCESS_TOKEN": "your_intercom_api_token"
      }
    }
  }
}

实施说明

有关此服务器如何与 Intercom API 集成的详细技术信息,请参阅src/services/INTERCOM_API_NOTES.md 。本文档介绍了我们的参数映射、Intercom 端点使用方法以及面向开发者的实现细节。

发展

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

# Build and run for development
npm run build
npm run dev

# Run tests
npm test

免责声明

该项目是一个独立集成项目,与 Intercom Inc. 没有任何关联、官方联系或认可。“Intercom”是 Intercom Inc. 的注册商标。

执照

该项目根据 Apache License 2.0 获得许可 - 有关详细信息,请参阅 LICENSE 文件。

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/raoulbia-ai/mcp-server-for-intercom'

If you have feedback or need assistance with the MCP directory API, please join our Discord server