MCP对讲机服务器
符合MCP标准的服务器,使AI助手能够访问和分析来自Intercom的客户支持数据。
特性
- 使用高级过滤功能搜索对话和门票
- 按客户、状态、日期范围和关键字筛选
- 即使没有联系人,也可以通过电子邮件内容进行搜索
- 通过Intercom的搜索API进行高效的服务器端过滤
- 与符合MCP标准的AI助手无缝集成
安装
先决条件
- Node.js 18.0.0或更高版本
- 具有API访问权限的内部通信帐户
- 您的内部通信API令牌(可在内部通信帐户设置中使用)
快速设置
使用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(日/月/年)-开始日期(必填)endDate(日/月/年)-结束日期(必填)keyword(string)–筛选以包含与此文本的对话exclude(string)–筛选以排除包含此文本的对话
笔记:
- 日期范围不得超过7天
- 通过Intercom的搜索API使用高效的服务器端过滤
例子:
{
"startDate": "15/01/2025",
"endDate": "21/01/2025",
"keyword": "billing"
}2. search_conversations_by_customer
查找特定客户的对话。
参数:
customerIdentifier(string)-客户电子邮件或对讲机ID(必填)startDate(日/月/年)-可选开始日期endDate(日/月/年)-可选结束日期keywords(array)–按内容筛选的可选关键字
笔记:
- 即使没有联系人,也可以通过电子邮件内容查找对话
- 将电子邮件解析为联系人ID,以实现高效搜索
例子:
{
"customerIdentifier": "customer@example.com",
"startDate": "15/01/2025",
"endDate": "21/01/2025",
"keywords": ["billing", "refund"]
}3. search_tickets_by_status
按状态检索门票。
参数:
status(string)-“打开”、“待定”或“已解决”(必填)startDate(日/月/年)-可选开始日期endDate(日/月/年)-可选结束日期
例子:
{
"status": "open",
"startDate": "15/01/2025",
"endDate": "21/01/2025"
}4. search_tickets_by_customer
查找与特定客户关联的门票。
参数:
customerIdentifier(string)-客户电子邮件或对讲机ID(必填)startDate(日/月/年)-可选开始日期endDate(日/月/年)-可选结束日期
例子:
{
"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本文档为开发人员解释了我们的参数映射、内部通信端点使用和实现细节。
发展
# 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股份有限公司、与之正式关联或由其背书。“Intercom”是Intercom股份有限公司的注册商标。
许可证
此项目在Apache License 2.0下获得许可-有关详细信息,请参阅License文件。
