HubSpot MCP Server

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Provides integration with HubSpot CRM, enabling AI models to interact with HubSpot data including contacts, companies, and engagements. Offers tools for retrieving, creating, and managing HubSpot objects, as well as accessing recent engagement history.

HubSpot MCP 服务器

概述

模型上下文协议 (MCP) 服务器实现,提供与 HubSpot CRM 的集成。该服务器使 AI 模型能够通过标准化接口与 HubSpot 数据和操作进行交互。

有关模型上下文协议及其工作原理的更多信息,请参阅Anthropic 的 MCP 文档

成分

资源

没有资源投入。说到底,我们只需要工具。

示例提示

  • 通过从 LinkedIn 个人资料网页复制来创建 Hubspot 联系人:
    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
  • 获取贵公司的最新活动:
    What's happening latestly with my pipeline?

工具

该服务器提供了几种用于管理 HubSpot 对象的工具:

联系人管理工具

  • hubspot_create_contact
    • 在 HubSpot 中创建新联系人(创建前检查重复项)
    • 输入:
      • firstname (字符串):联系人的名字
      • lastname (字符串):联系人的姓氏
      • email (字符串,可选):联系人的电子邮件地址
      • properties (dict,可选):附加联系人属性
        • 例如: {"phone": "123456789", "company": "HubSpot"}
    • 行为:
      • 检查是否存在具有相同名字和姓氏的现有联系人
      • 如果属性中提供了company ,还会检查是否与同一家公司匹配
      • 如果找到匹配项,则返回现有联系人详细信息
      • 仅当未找到匹配项时才创建新联系人

公司管理工具

  • hubspot_create_company
    • 在 HubSpot 中创建新公司(创建前检查重复项)
    • 输入:
      • name (字符串):公司名称
      • properties (字典,可选):其他公司属性
        • 例如: {"domain": "example.com", "industry": "Technology"}
    • 行为:
      • 检查是否存在同名的公司
      • 如果找到匹配项,则返回现有公司详细信息
      • 仅当未找到匹配项时才创建新公司
  • hubspot_get_company_activity
    • 获取特定公司的活动历史记录
    • 输入:
      • company_id (字符串):HubSpot 公司 ID
    • 返回:活动对象数组

参与工具

  • hubspot_get_recent_engagements
    • 获取所有联系人和公司的近期参与活动
    • 输入:
      • days (整数,可选):回顾的天数(默认值:7)
      • limit (整数,可选):返回的最大参与次数(默认值:50)
    • 返回:具有完整元数据的参与对象数组
  • hubspot_get_recent_companies
    • 从 HubSpot 获取最近活跃的公司
    • 输入:
      • limit (整数,可选):返回的最大公司数量(默认值:10)
    • 返回:具有完整元数据的公司对象数组
  • hubspot_get_recent_contacts
    • 从 HubSpot 获取最近活跃的联系人
    • 输入:
      • limit (整数,可选):返回的最大联系人数量(默认值:10)
    • 返回:具有完整元数据的联系人对象数组

设置

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 buryhuang/mcp-hubspot:

npx -y @smithery/cli install buryhuang/mcp-hubspot --client claude

先决条件

您需要一个 HubSpot 访问令牌。您可以通过以下方式获取:

  1. 在您的 HubSpot 帐户中创建私人应用程序:按照HubSpot 私人应用程序指南操作
    • 转到您的 HubSpot 帐户设置
    • 导航至“集成”>“私有应用”
    • 点击“创建私人应用”
    • 填写基本信息:
      • 命名您的应用
      • 添加描述
      • 上传徽标(可选)
    • 定义所需范围:
      • 门票
      • crm.objects.contacts.write
      • crm.objects.contacts.sensitive.read
      • crm.objects.companies.sensitive.read
      • 销售电子邮件阅读
      • crm.objects.deals.sensitive.read
      • crm.objects.companies.write
      • crm.objects.companies.read
      • crm.objects.deals.读取
      • crm.objects.deals.write
      • crm.objects.contacts.读取
    • 查看并创建应用程序
    • 复制生成的访问令牌

注意:请确保您的访问令牌安全,切勿将其提交到版本控制中。

Docker 安装

您可以在本地构建镜像,也可以从 Docker Hub 拉取。该镜像是为 Linux 平台构建的。

支持的平台

  • Linux/amd64
  • Linux/arm64
  • Linux/arm/v7

选项 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 镜像,可以使用docker buildx命令。请按以下步骤操作:

  1. 创建一个新的构建器实例(如果还没有):
    docker buildx create --use
  2. 为多个平台构建并推送图像
    docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t buryhuang/mcp-hubspot:latest --push .
  3. 验证该图像是否适用于指定的平台
    docker buildx imagetools inspect buryhuang/mcp-hubspot:latest

与 Claude Desktop 一起使用

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 mcp-hubspot:

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 .

执照

该项目已获得 MIT 许可。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

使AI模型能够通过标准化界面与HubSpot CRM数据和操作进行交互,支持联系人和公司管理。

  1. Overview
    1. Components
      1. Resources
      2. Example Prompts
      3. Tools
    2. Setup
      1. Installing via Smithery
      2. Prerequisites
      3. Docker Installation
    3. Cross-Platform Publishing
      1. Usage with Claude Desktop
        1. Installing via Smithery
        2. Docker Usage
      2. Development
        1. License
          ID: vpoifk4jai