# Intercom对话助手
## 基本信息
- Slug: `fabian1710-mcp-intercom`
- Source: modelscope
- Publisher: @fabian1710/mcp-intercom
- Categories: customer-support / communication
- Hosted: No
- License: Unknown
- Source URL: https://www.modelscope.cn/mcp/servers/@fabian1710/mcp-intercom
## 简介
通过模型上下文协议提供对Intercom对话和聊天的访问，允许大型语言模型使用各种过滤选项查询和分析Intercom对话。
## 安装提示

```bash
git clone https://github.com/fabian1710/mcp-intercom.git cd mcp-intercom
```

## MCP Server 详情

# MCP Intercom 服务器

这是一个模型上下文协议 (MCP) 服务器，提供对 Intercom 对话和聊天的访问。该服务器允许大型语言模型 (LLM) 通过各种过滤选项查询和分析您的 Intercom 对话。

## 功能

- 通过过滤选项查询 Intercom 对话：
  - 日期范围（开始和结束日期）
  - 客户 ID
  - 对话状态
- 使用您的 Intercom API 密钥进行安全访问
- 丰富的对话数据，包括：
  - 基本对话详情
  - 联系信息
  - 统计数据（回复、重新打开）
  - 状态和优先级信息

## 安装

1. 克隆仓库：
```bash
git clone https://github.com/fabian1710/mcp-intercom.git
cd mcp-intercom
```


2. 安装依赖项：
```bash
npm install
```


3. 设置环境：
```bash
cp .env.example .env
```


4. 将您的 Intercom API 密钥添加到 `.env` 文件中：
```
INTERCOM_API_KEY=your_api_key_here
```


5. 构建服务器：
```bash
npm run build
```


## 使用

### 运行服务器

启动服务器：
```bash
npm start
```


### 与 Claude for Desktop 一起使用

1. 将服务器添加到您的 Claude for Desktop 配置中（macOS 上为 `~/Library/Application Support/Claude/claude_desktop_config.json` 或 Windows 上为 `%AppData%\Claude\claude_desktop_config.json`）：

```json
{
  "mcpServers": {
    "intercom": {
      "command": "node",
      "args": ["/path/to/mcp-intercom/dist/index.js"],
      "env": {
        "INTERCOM_API_KEY": "your_api_key_here"
      }
    }
  }
}
```


2. 重启 Claude for Desktop

### 可用工具

#### search-conversations

使用可选过滤器搜索 Intercom 对话。

参数：
- `createdAt`（可选）：对象，包含 `operator`（例如 ">", "<", "="）和 `value`（UNIX 时间戳），用于按创建日期过滤。
- `updatedAt`（可选）：对象，包含 `operator`（例如 ">", "<", "="）和 `value`（UNIX 时间戳），用于按更新日期过滤。
- `sourceType`（可选）：对话的来源类型（例如 "email", "chat"）。
- `state`（可选）：要过滤的对话状态（例如 "open", "closed"）。
- `open`（可选）：布尔值，用于按打开状态过滤。
- `read`（可选）：布尔值，用于按已读状态过滤。

示例查询：
- “搜索 2024 年 1 月 1 日之后创建的所有对话”
- “查找上周之前更新的对话”
- “列出所有打开的电子邮件对话”
- “获取所有未读对话”

## 安全性

- 服务器需要 Intercom API 密钥才能运行
- API 密钥应安全地存储在环境变量中
- 服务器仅提供对对话的只读访问权限
- 所有 API 请求都带有适当的认证

## 开发

1. 启动自动重新编译的开发模式：
```bash
npm run dev
```


2. 运行代码检查：
```bash
npm run lint
```


## 贡献

1. 分叉仓库
2. 为您的功能创建一个新的分支
3. 进行更改
4. 提交拉取请求

## 许可证

MIT

