DEV Community

HIDE
HIDE

Posted on

I Built an MCP Server to Create HubSpot Marketing Emails with Claude

Creating newsletters regularly is surprisingly time-consuming.

Log into HubSpot, pick a template, think of a subject line, write the body... I wanted to offload this repetitive work to AI.

So I built an MCP server that lets Claude directly interact with HubSpot's marketing email features, and I've open-sourced it on GitHub.

GitHub logo hdmt / hubspot-email-mcp

MCP server for HubSpot Marketing Email API

HubSpot Email MCP Server

A Model Context Protocol (MCP) server for the HubSpot Marketing Email API. Manage HubSpot marketing emails from Claude Desktop.

日本語版 README

Features

  • List marketing emails
  • Get email details
  • Create email drafts
  • Update emails

Note: This server does not include email sending functionality to prevent accidental sends.

Setup

1. Install Dependencies

npm install
Enter fullscreen mode Exit fullscreen mode

2. Get HubSpot Access Token

  1. Log in to your HubSpot account
  2. Go to Development > Legacy Apps (開発 > 旧アプリ)
  3. Create a new app
  4. Set the required scopes: content (for Marketing Emails)
  5. Copy the Access Token (pat-na1-... format)

3. Build

npm run build
Enter fullscreen mode Exit fullscreen mode

4. Configure Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "hubspot-email": {
      "command": "npx",
      "args": ["-y", "/path/to/hubspot-email-mcp"],
      "env": {
        "HUBSPOT_ACCESS_TOKEN": "your-access-token"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

5. Restart Claude Desktop

Restart Claude…

What is MCP?

MCP (Model Context Protocol) is a standard protocol for connecting AI assistants with external tools. With this, Claude Desktop can directly access HubSpot's email functionality.

Features

This MCP server lets you do the following just by chatting with Claude:

  • List emails – View your existing marketing emails
  • Get email details – Check the content of a specific email
  • Create drafts – Write new newsletter content
  • Update emails – Edit existing emails

Note: I intentionally left out the send feature to prevent accidental sends. The workflow assumes you'll do the final review and send from HubSpot's dashboard.

Usage Examples

Just talk to Claude Desktop like this:

"Create a newsletter in HubSpot announcing our new product.
Subject: Introducing Product A
Body: We're excited to announce the release of Product A..."
Enter fullscreen mode Exit fullscreen mode
"Show me the emails I created last week"
Enter fullscreen mode Exit fullscreen mode
"Check the content of email ID 12345"
Enter fullscreen mode Exit fullscreen mode

Why I Built This

The main goal is automating routine tasks.

Newsletter creation is simple in concept, but it eats up time every single time. By letting AI handle the drafting, you can cut down significantly on both planning and writing time.

Humans just do the final check and hit send. The time saved can go to other work.

Setup

Here's how to get started:

  1. Get an access token from HubSpot (create via Legacy Apps, requires content scope)
  2. Add the MCP server to your Claude Desktop config file
  3. Restart Claude Desktop

Check the GitHub repo's README for detailed setup instructions.

What's Next

I'm planning to add WordPress integration next.

The goal is to automatically fetch content from published WordPress blog posts and create newsletters promoting those articles—a fully automated workflow.

"Publish a blog post, and a newsletter draft is already waiting for you."

If we can streamline newsletter creation with AI and MCP, the operational burden of content marketing drops significantly.


⭐ If this sounds useful, check out the repo and give it a star!

GitHub logo hdmt / hubspot-email-mcp

MCP server for HubSpot Marketing Email API

HubSpot Email MCP Server

A Model Context Protocol (MCP) server for the HubSpot Marketing Email API. Manage HubSpot marketing emails from Claude Desktop.

日本語版 README

Features

  • List marketing emails
  • Get email details
  • Create email drafts
  • Update emails

Note: This server does not include email sending functionality to prevent accidental sends.

Setup

1. Install Dependencies

npm install
Enter fullscreen mode Exit fullscreen mode

2. Get HubSpot Access Token

  1. Log in to your HubSpot account
  2. Go to Development > Legacy Apps (開発 > 旧アプリ)
  3. Create a new app
  4. Set the required scopes: content (for Marketing Emails)
  5. Copy the Access Token (pat-na1-... format)

3. Build

npm run build
Enter fullscreen mode Exit fullscreen mode

4. Configure Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "hubspot-email": {
      "command": "npx",
      "args": ["-y", "/path/to/hubspot-email-mcp"],
      "env": {
        "HUBSPOT_ACCESS_TOKEN": "your-access-token"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

5. Restart Claude Desktop

Restart Claude…




Top comments (0)