HubSpot AI连接器
启用AI模型通过标准化接口与HubSpot CRM数据和操作进行交互,同时为团队提供了一个集中的共享空间,以实时共享对话摘要。
服务介绍
HubSpot MCP 服务器
概述
此项目实现了一个模型上下文协议(MCP)服务器,该服务器与HubSpot CRM集成,并现在包括一个集中的共享空间功能。服务器通过标准化接口使AI模型能够与HubSpot数据和操作进行交互,同时允许团队实时共享关键对话摘要。
有关模型上下文协议及其工作原理的更多信息,请参阅Anthropic的MCP文档。
组件
资源
没有实现资源。最终,系统是由工具驱动的。
示例提示
从LinkedIn个人资料网页复制创建HubSpot联系人:
# Example YAML prompt
- Create HubSpot contacts and companies from following:
- John Doe
- Software Engineer at Tech Corp
- San Francisco Bay Area • 500+ connections
Experience:
- Tech Corp
- Software Engineer
- Jan 2020 - Present · 4 yrs
- San Francisco, California
- Previous Company Inc.
- Senior Developer
- 2018 - 2020 · 2 yrs
Education:
- University of California, Berkeley
- Computer Science, BS
- 2014 - 2018
获取您公司的最新活动:
# Example VB.NET prompt
- What's happening latestly with my pipeline?
共享空间示例:
会议后,AI命令框提示:
“您是否希望将此对话摘要分享到公司共享空间?(是/否)”
在确认后,对话摘要将被集中存储,并可供贵公司所有授权经理访问。
工具
除了新的共享空间工具外,该服务器还提供了几个用于管理HubSpot对象的工具:
联系人管理工具
hubspot_create_contact- 在HubSpot中创建新联系人(带有重复检查)。
- 输入:
- firstname (字符串)
- lastname (字符串)
- email (字符串, 可选)
- properties (字典, 可选; 例如, {"phone": "123456789", "company": "HubSpot"})
公司管理工具
-
hubspot_create_company- 在HubSpot中创建新公司(带有重复检查)。
- 输入:
- name (字符串)
- properties (字典, 可选)
-
hubspot_get_company_activity- 检索特定公司的活动历史记录。
- 输入:
- company_id (字符串)
互动工具
-
hubspot_get_recent_engagements- 检索最近的互动活动。
- 输入:
- days (整数, 默认7)
- limit (整数, 默认50)
-
hubspot_get_recent_companies- 检索最近最活跃的公司。
- 输入:
- limit (整数, 默认10)
-
hubspot_get_recent_contacts- 检索最近最活跃的联系人。
- 输入:
- limit (整数, 默认10)
共享空间工具
-
create_shared_summary- 在共享空间中创建新的对话摘要。
- 输入:
- user_id (字符串, 用户的邮箱/ID)
- company_id (字符串)
- summary (字符串)
-
get_shared_summaries- 检索给定公司的所有对话摘要。
- 输入:
- user_id (字符串)
- company_id (字符串)
这些共享空间工具允许授权经理分享会议摘要,从而实现团队之间的实时协作以及对关键见解的集中访问。
设置
通过Smithery安装
要通过 Smithery 自动为 Claude Desktop 安装 buryhuang/mcp-hubspot:
npx -y @smithery/cli install buryhuang/mcp-hubspot --client claude
前提条件
你需要一个 HubSpot 访问令牌。可以通过在你的 HubSpot 账户中创建一个私有应用来获取(参见 HubSpot 私有应用指南)。请妥善保管你的令牌。
Docker 安装
选项 1: 从 Docker Hub 拉取
docker pull buryhuang/mcp-hubspot:latest
选项 2: 本地构建
docker build -t mcp-hubspot .
运行容器:
docker run -e HUBSPOT_ACCESS_TOKEN=your_access_token_here buryhuang/mcp-hubspot:latest
或者将令牌作为参数传递:
docker run buryhuang/mcp-hubspot:latest --access-token your_access_token_here
跨平台发布
创建一个新的构建器实例:
docker buildx create --use
为多个平台构建并推送:
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t buryhuang/mcp-hubspot:latest --push .
验证镜像:
docker buildx imagetools inspect buryhuang/mcp-hubspot:latest
与 Claude Desktop 的使用
通过 Smithery 安装
npx -y @smithery/cli@latest install mcp-hubspot --client claude
Docker 使用
{
"mcpServers": {
"hubspot": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"HUBSPOT_ACCESS_TOKEN=your_access_token_here",
"buryhuang/mcp-hubspot:latest"
]
}
}
}
或使用命令行参数:
{
"mcpServers": {
"hubspot": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"buryhuang/mcp-hubspot:latest",
"--access-token",
"your_access_token_here"
]
}
}
}
开发
设置开发环境:
pip install -e .
共享空间集成
共享空间功能在一个独立的模块 (shared_space.py) 中实现。该模块:
- 加载动态用户角色(从外部 JSON 文件或数据库)。
- 实现了 CRUD 端点(
create_summary、get_summaries、update_summary和delete_summary)用于会话摘要。 - 触发实时通知占位符(你可以稍后将其与 SSE 或 WebSockets 集成)。
主文件 server.py 导入这些函数,并将它们注册为新的 MCP 工具(create_shared_summary 和 get_shared_summaries)。
许可证
本项目采用 MIT 许可证。
此更新后的 README 反映了使用 HubSpot MCP 集成的附加共享空间功能,并解释了系统的结构和使用方式。