Hubspot Email MCP

MCP办公协作

提供方 bcousin93

办公协作 stdio · 本地进程 无需鉴权 社区 / 第三方 Claude DesktopClaude
查看接入方式

一个MCP服务器,能够从Markdown和Word文档自动生成HubSpot营销邮件草稿,支持图片上传、品牌风格应用和邮件结构优化。

一句话选型结论

按资料字段整理

Hubspot Email MCP 属于办公协作类 MCP 服务器,stdio · 本地进程,无需鉴权,可直接接入 Claude Desktop、Claude,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类办公协作 传输方式stdio · 本地进程 鉴权无需鉴权 部署方式本地部署
GitHub 星标 1 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

办公协作
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

邮件营销Python本地部署文档转换自动化工具HubSpot集成品牌管理

安装与配置

stdio · 本地进程 无需鉴权
客户端在本机拉起子进程,数据不出本机
pip install -e .

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Node.js 等运行时,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
日程与消息

查日程、发消息、约会议。

表单与审批

填表单、走审批流。

团队协作

同步任务、汇总进展。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude Desktop、Claude,换客户端不用重新研究配置。
  • 资料标注无需鉴权,装好就能连。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在办公协作场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Hubspot Email MCP当前 未标注 stdio · 本地进程 本地部署 有 2026-05-17
CowAgent 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Karakeep MCP 未标注 未标注 未标注 无 2026-05-17
agentscope 未标注 stdio · 本地进程 本地部署 有 2026-04-11
note-gen 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Everywhere 未标注 stdio · 本地进程 本地部署 有 2026-04-12

服务器档案

办公协作
字段来自项目仓库与公开索引,中文说明由本站标注
提供方bcousin93上游标注的维护方 bcousin93
分类办公协作本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式无需鉴权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

13.6 KB
来自项目仓库与上游目录的原文,未做删改

HubSpot Email MCP Server

An MCP (Model Context Protocol) server that enables Claude Code to create HubSpot marketing email drafts directly from document files (.md and .docx).

Features

  • 📄 Parse Markdown (.md) and Word (.docx) documents
  • 🖼️ Automatic image extraction and upload to HubSpot File Manager
  • ✉️ Create marketing email drafts in HubSpot using default modules
  • 🔄 Interleave text and images in the correct order from your document
  • ⚡ Optimized section structure to prevent Gmail clipping
  • 🎯 Uses HubSpot's default modules (@hubspot/rich_text, @hubspot/email_linked_image)
  • 🎨 Brand guidelines support for consistent styling (colors, typography, spacing, images)
  • 🛡️ Comprehensive error handling and logging

How It Works

The MCP server intelligently parses your document and creates a properly structured HubSpot email:

  1. Content Extraction: Parses your document in order, tracking both text and images
  2. Image Upload: Uploads all images to HubSpot File Manager and gets CDN URLs
  3. Module Creation: Creates HubSpot modules for each content block:
    - Text blocks → @hubspot/rich_text modules
    - Images → @hubspot/email_linked_image modules
  4. Brand Styling: Applies your brand guidelines (if configured) to modules and sections
  5. Section Optimization: Places all modules in a single section to minimize HTML bloat and prevent Gmail clipping
  6. Email Structure:
    - Section 0: All content (text + images in order) in one column
    - Section 1: Footer module

This approach avoids creating excessive sections, which can cause Gmail to clip emails over 102KB.

Installation

Prerequisites

  • Python 3.10 or higher
  • HubSpot account with Private App access
  • uv package manager (recommended) or pip

Install Dependencies

Using uv (recommended):```bash
cd hubspot-email-mcp
uv sync


Using `pip`:```bash
cd hubspot-email-mcp
pip install -e .

HubSpot Setup

1. Create a Private App

  1. Go to your HubSpot account
  2. Navigate to Settings → Integrations → Private Apps
  3. Click Create a private app
  4. Give it a name (e.g., "Email Creator MCP")

2. Configure Scopes

The app needs the following scopes:

  • Content:
  • content (Read and write access to marketing emails)
  • Files:
  • files (Read and write access to File Manager)

3. Get API Token

  1. After creating the app, click Show token
  2. Copy the token (starts with pat-...)
  3. Save this token securely - you'll need it for configuration

Configuration

1. Create Config File

Copy the example configuration:```bash
cp config.example.json config.json


### 2. Edit Configuration

Edit `config.json` with your settings:```json
{
  "hubspot_api_key": "pat-na1-xxxx-xxxx-xxxx",
  "file_folder_path": "/email-images",
  "brand_guidelines_path": "brand-guidelines.json"
}

Configuration Fields:

  • hubspot_api_key: Your HubSpot Private App token
  • file_folder_path: Folder path in HubSpot File Manager where images will be uploaded
  • brand_guidelines_path: (Optional) Path to brand guidelines JSON file for consistent styling

3. No Template Required!

This MCP server creates emails using HubSpot's default modules, so you don't need a custom template. The server automatically:
- Creates drag-and-drop email structure
- Uses standard HubSpot modules from Design Manager
- Builds optimized sections to prevent Gmail clipping

The template_path configuration field has been removed as it's not needed.

4. Brand Guidelines (Optional)

The server supports brand guidelines for consistent styling across all emails. Create a brand-guidelines.json file to define your brand's colors, typography, spacing, and image styles.

📖 See BRAND-GUIDELINES-REFERENCE.md for complete documentation of all available fields.

Create Brand Guidelines File

Copy the example:```bash
cp brand-guidelines.example.json brand-guidelines.json


Edit the file and customize for your brand. The example includes all available fields with explanations.

#### Brand Guidelines Structure```json
{
  "colors": {
    "primary": "#197FC4",
    "secondary": "#00a4bd",
    "text": "#23496d",
    "background": "#ffffff",
    "border": "#000000"
  },
  "typography": {
    "primaryFont": "Arial, sans-serif",
    "secondaryFont": "Arial, sans-serif",
    "headingOneSize": 28,
    "headingTwoSize": 22,
    "bodySize": 15,
    "linkColor": "#00a4bd",
    "linkUnderline": true
  },
  "spacing": {
    "sectionPaddingTop": "40px",
    "sectionPaddingBottom": "40px",
    "modulePaddingTop": "20px",
    "modulePaddingBottom": "20px"
  },
  "images": {
    "defaultWidth": 600,
    "maxWidth": "100%",
    "alignment": "center",
    "cornerRadius": 0,
    "addBorder": false,
    "borderWidth": 1,
    "borderColor": "#000000"
  },
  "buttons": {
    "backgroundColor": "#197FC4",
    "textColor": "#ffffff",
    "cornerRadius": 8,
    "fontSize": 16
  }
}

What Gets Styled

When brand guidelines are configured, the server automatically applies:

Text Modules:
- Font family and size
- Text color
- Module padding (top/bottom)

Image Modules:
- Default image width
- Image alignment (left/center/right)
- Border radius for rounded corners
- Optional borders with color and width
- Module padding (top/bottom)

Sections:
- Section padding (top/bottom)
- Background color

Path Configuration:
- Use absolute paths: "brand_guidelines_path": "/absolute/path/to/brand-guidelines.json"
- Or relative paths (relative to config.json): "brand_guidelines_path": "brand-guidelines.json"

Working with Multiple Brands/Portals (Recommended)

If you work with multiple HubSpot portals or brands, the best approach is to configure multiple MCP servers in Claude Desktop. This gives you:
- Separate API keys for each portal
- Separate brand guidelines for each brand
- No need to restart when switching
- Clear isolation between portals

Example Setup:

Create separate config files for each brand:```bash
hubspot-email-mcp/
├── config-brand-a.json # Brand A portal config
├── config-brand-b.json # Brand B portal config
├── brand-a-guidelines.json # Brand A styles
└── brand-b-guidelines.json # ACME brand styles


**config-brand-a.json:**```json
{
  "hubspot_api_key": "pat-na1-xxxx-xxxx-xxxx",
  "file_folder_path": "/email-images",
  "brand_guidelines_path": "brand-a-guidelines.json"
}

config-brand-b.json:```json
{
"hubspot_api_key": "pat-na1-yyyy-acme-key",
"file_folder_path": "/acme-email-images",
"brand_guidelines_path": "brand-b-guidelines.json"
}


Then configure multiple servers in Claude Desktop (see next section for details).

**Single Brand Setup (Alternative):**

If you only work in one portal but want to switch brand guidelines occasionally:```json
{
  "hubspot_api_key": "pat-na1-xxxx",
  "file_folder_path": "/email-images",
  "brand_guidelines_path": "brand-guidelines.json"
}

Update brand_guidelines_path to switch styles, then restart Claude Desktop.

Claude Desktop Integration

Single Server Setup

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS/Linux) or %APPDATA%\Claude\claude_desktop_config.json (Windows):```json
{
"mcpServers": {
"hubspot-email": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/hubspot-email-mcp",
"run",
"hubspot-email-mcp"
],
"env": {
"HUBSPOT_EMAIL_MCP_CONFIG": "/absolute/path/to/config.json"
}
}
}
}


### Multiple Portal/Brand Setup (Recommended)

If you work with multiple HubSpot portals or brands, configure one server per portal:```json
{
  "mcpServers": {
    "hubspot-email-brand-a": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/hubspot-email-mcp",
        "run",
        "hubspot-email-mcp"
      ],
      "env": {
        "HUBSPOT_EMAIL_MCP_CONFIG": "/absolute/path/to/config-brand-a.json"
      }
    },
    "hubspot-email-brand-b": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/hubspot-email-mcp",
        "run",
        "hubspot-email-mcp"
      ],
      "env": {
        "HUBSPOT_EMAIL_MCP_CONFIG": "/absolute/path/to/config-brand-b.json"
      }
    }
  }
}

How to Use:

When you ask Claude to create an email, it will know which brand/portal you're targeting based on context:```

For Brand A portal

Create a marketing email from newsletter.md for the Brand A portal

For Brand B portal

Create a marketing email from announcement.docx for the Brand B portal


Claude Code will automatically use the correct server based on your request.

**Benefits:**
- ✅ No need to restart when switching between portals
- ✅ Each portal has its own API key and brand guidelines
- ✅ Can work on multiple brands simultaneously
- ✅ Clear separation and isolation

### Important Notes

- Use **absolute paths** for both the directory and config file
- Restart Claude Desktop after modifying the config
- Check Claude Desktop logs if the server doesn't appear: `~/Library/Logs/Claude/` (macOS) or `%APPDATA%\Claude\logs\` (Windows)

## Usage

Once installed, you can use the tool from Claude Code:

### Basic Usage```
Create a marketing email from newsletter.md named "Monthly Newsletter"
with subject line "Your Monthly Update - January 2025"

With DOCX Files```

Create a marketing email from product-announcement.docx named
"New Product Launch" with subject "Introducing Our Latest Innovation"


### Example Workflow

1. **Prepare your document** (`.md` or `.docx`) with:
   - Email content (text, headings, paragraphs)
   - Images (embedded or referenced)

2. **Ask Claude Code** to create the email:```
   Create a HubSpot marketing email from /path/to/my-newsletter.md
   named "Newsletter Q1" with subject "Quarterly Update"
   ```

3. **Claude will**:
   - Parse the document
   - Extract and upload any images to HubSpot
   - Create the email draft
   - Provide you with the HubSpot email editor URL

4. **You can then**:
   - Open the URL in your browser
   - Review and edit the email in HubSpot
   - Schedule or send the email

## Document Format Guidelines

### Markdown Files (`.md`)```markdown
# Heading 1

## Heading 2

Paragraph text with **bold** and *italic*.

![Alt text](./images/my-image.png)

- Bullet point 1
- Bullet point 2

Image References:
- Local images: - will be uploaded - External images: - will be skipped

DOCX Files (.docx)

  • Use standard Word formatting (headings, paragraphs, bold, italic)
  • Embedded images will be extracted automatically
  • Heading styles (Heading 1, 2, 3) will be converted to HTML headings

Technical Details

HubSpot Modules Used

The server uses HubSpot's default modules from Design Manager:

  • @hubspot/rich_text: For text content (paragraphs, headings)
  • @hubspot/email_linked_image: For images with optional links
  • @hubspot/email_footer: For the unsubscribe footer

These modules are available by default in all HubSpot accounts and don't require any custom development.

Section Optimization

Why This Matters:
- Gmail clips emails over 102KB
- Each section adds HTML bloat to the email
- Multiple sections can quickly push emails over the limit

Our Approach:
- Places all content modules (text + images) in a single section
- Only creates a new section when the column layout changes (e.g., 1-column → 2-column)
- For single-column emails, this means only 2 sections total: content + footer

Future Enhancement:
The server can be extended to support multi-column layouts by detecting layout changes and creating new sections only when necessary.

Troubleshooting

Server Not Appearing in Claude Desktop

  1. Check that paths are absolute (not relative)
  2. Verify uv is installed: uv --version
  3. Check Claude Desktop logs:
    - macOS: ~/Library/Logs/Claude/
    - Windows: %APPDATA%\Claude\logs\

API Errors

401 Unauthorized:
- Verify your API key is correct in config.json
- Ensure the Private App is not deactivated

403 Forbidden:
- Check that the Private App has the required scopes (content, files)

Image Upload Failures:
- Images will be skipped with a warning
- Check file size limits (HubSpot has a 50MB limit per file)
- Verify the file_folder_path exists in your File Manager

Content Not Appearing

Images not showing:
- Check that images were uploaded successfully (look for success messages in logs)
- Verify the CDN URLs are accessible
- Ensure the HubSpot account has the files scope enabled

Text formatting issues:
- The server converts Word styles to HTML (Heading 1 → , etc.)
- Verify your document has proper heading styles applied

Development

Running Tests```bash

Install dev dependencies

uv sync --dev

Run tests (when implemented)

pytest


### Testing the Server

Create a test document:

**test.md:**```markdown
# Test Email

This is a test email with an image.

![Test](./test-image.png)

Then use Claude Code to create an email from it.

API Rate Limits

HubSpot has rate limits on their APIs:
- Marketing Emails API: 250 requests per 10 seconds
- Files API: 100 requests per 10 seconds

The server includes basic error handling for rate limits (429 errors).

Security Notes

  • Never commit your config.json file with real API keys
  • Store API keys securely (use environment variables in production)
  • The config.example.json is safe to commit (contains no real keys)

License

MIT

Support

For issues or questions:
- Check the MCP Documentation
- Review HubSpot API Documentation
- Open an issue in this repository

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
Hubspot Email MCP 怎么安装?

在客户端按下面的安装命令接入:pip install -e .。装完在客户端配置里引用同一个包或端点。

Hubspot Email MCP 怎么在 Claude Desktop、Claude 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Hubspot Email MCP 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Hubspot Email MCP 需要 API Key 吗?

资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

Hubspot Email MCP 支持哪些客户端?

资料标注支持 Claude Desktop、Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Hubspot Email MCP 能提供哪些能力?

资料显示能力标签包括 Python、Claude、文档转换。具体工具清单以官方文档为准。

Hubspot Email MCP 需要什么运行环境?

属于本地进程,需要在本机装好运行环境。

Hubspot Email MCP 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。