Claude Code HubSpot Integration: Connect Your Marketing Stack in 2026
By Kushal Magar · April 26, 2026 · 14 min read
Key Takeaway
Claude Code connects to HubSpot through three paths — the official connector, community MCP servers, or direct API calls. MCP servers give the most flexibility for GTM automation: bi-directional CRM sync, automated lead routing, and workflow triggers that run from your terminal.
HubSpot is the CRM for over 228,000 companies. Claude Code is the fastest-growing AI agent for GTM teams. Connecting them means your AI agent can read live CRM data, create contacts, update deals, and trigger marketing workflows — without you copying a single field between tabs.
This guide walks through every integration path: the official HubSpot connector for Claude, community MCP servers, and direct API access. You will know which method fits your stack, how to configure it, and what you can automate once the connection is live.
How do you integrate Claude Code with HubSpot?
You integrate Claude Code with HubSpot through three methods: (1) the official HubSpot connector in Claude settings, which handles OAuth automatically and supports CRM read/write operations; (2) an MCP server — either HubSpot's developer server or a community package like mcp-hubspot — that gives Claude Code programmatic API access from your terminal; or (3) direct HubSpot API calls using a private app access token, where Claude Code makes REST requests to HubSpot endpoints. MCP servers offer the most flexibility for building automated GTM workflows.
TL;DR
- Three integration paths: Official HubSpot connector (easiest), MCP server (most flexible), or direct API calls (most control).
- MCP is the power move. It lets Claude Code read contacts, create deals, log activities, and trigger workflows from your terminal — no browser required.
- Setup takes 10–30 minutes depending on the method. The connector is a 5-click process. MCP servers need a private app token and a Docker or npx command.
- Bi-directional sync works. Claude Code reads HubSpot data to inform decisions and writes back — creating contacts, updating properties, and logging engagement.
- Pair with SyncGTM for enrichment. Claude Code orchestrates. SyncGTM provides waterfall enrichment, signals, and verified contact data that feeds directly into your HubSpot workflows.
- Limitations exist. No delete operations via connector. Max 10 records per bulk operation. Custom objects not supported through the connector (use API for those).
What This Guide Covers
This post is for marketing ops, sales ops, and GTM engineers who want Claude Code talking to HubSpot. You will learn the three integration methods, step-by-step MCP configuration, what data flows in each direction, and practical automation workflows.
If you have never used Claude Code, start with our Claude Code for Sales guide first. It covers installation, basic commands, and five sales workflows. This post assumes you have Claude Code running and a HubSpot account with admin access.
Why Connect Claude Code to HubSpot?
Claude Code executes, not just advises. Connected to HubSpot, it reads your pipeline, enriches contacts, and updates your CRM — from a single prompt.
Here is what that unlocks:
- Automated lead enrichment. Claude Code pulls a new contact from HubSpot, enriches it through enrichment APIs, and writes the firmographic data back to HubSpot properties — no manual research.
- Smart lead routing. Read incoming leads, score them against your ICP criteria using live data, and assign them to the right rep or sequence.
- CRM hygiene on autopilot. Detect duplicate contacts, fill in missing fields, normalize job titles, and flag stale deals — tasks that ops teams spend hours on weekly.
- Personalized outreach at scale. Pull deal context and contact history from HubSpot, then draft hyper-personalized emails that reference real engagement data.
- Marketing workflow triggers. Update a contact property that enrolls them in a HubSpot workflow — list segmentation, nurture sequences, or internal notifications.
Teams using task-specific AI agents for lead nurturing report a 23% lift in conversion rates over 12 months, per Stormy AI research. The key is connecting the agent to live data — not feeding it exported CSVs.
Three Ways to Integrate Claude Code With HubSpot
Not every team needs the same depth. Here are the three paths, ranked from simplest to most powerful.
| Method | Setup Time | Best For | Limitations |
|---|---|---|---|
| HubSpot Connector | 5 minutes | Quick CRM lookups, one-off updates | No custom objects, no delete, max 10 bulk records |
| MCP Server | 15–30 minutes | Automated workflows, multi-step pipelines | Requires Docker or npx, private app token |
| Direct API | 30–60 minutes | Custom objects, complex queries, full control | Manual auth handling, rate limit management |
Method 1: HubSpot Connector for Claude (Easiest)
The official HubSpot connector is a first-party integration. It handles OAuth automatically and surfaces HubSpot data inside Claude's interface.
Setup steps:
- Open Claude → Settings → Connectors
- Browse the Web tab, find HubSpot, click “Add to your team”
- Return to Connectors, click Connect
- Authenticate with your HubSpot account and approve permissions
- Start prompting — Claude now has live CRM context
What you can do:
- Read and create contacts, companies, deals, tickets, and line items
- Log calls, meetings, notes, tasks, and emails
- Read-only access to quotes, invoices, campaigns, landing pages, and blog posts
- Search across all accessible objects
What you cannot do: Delete records, access custom objects, or run operations on more than 10 records at once. If you need any of those, move to Method 2 or 3.
Requires a paid Anthropic plan
The connector needs Claude Pro ($20/mo), Max ($100–$200/mo), Team, or Enterprise. Free Claude accounts cannot use connectors. On the HubSpot side, the connector works with all tiers including the free CRM.
Method 2: HubSpot MCP Server (Developer Route)
MCP (Model Context Protocol) is Anthropic's open standard for connecting AI agents to external data sources. An MCP server runs locally on your machine and gives Claude Code structured access to HubSpot's API.
There are two solid MCP server options for HubSpot:
Option A: HubSpot Developer MCP Server
HubSpot ships its own MCP server through the HubSpot CLI. It requires CLI version 8.2.0+ and supports Claude Code natively.
- Install or update the HubSpot CLI:
npm install -g @hubspot/cli@latest - Run
hs mcp setupand select Claude Code as your client - Choose standalone or global mode
- Restart Claude Code to load the configuration
- In Claude Code, run
/mcpand select HubSpotDev to verify
Option B: Community mcp-hubspot Server
The open-source mcp-hubspot package adds vector search with FAISS and caching on top of HubSpot's API. It runs in Docker.
- Create a private app in HubSpot with scopes:
crm.objects.contacts(read/write),crm.objects.companies(read/write),sales-email-read - Copy the access token
- Install via Smithery:
npx -y @smithery/cli@latest install mcp-hubspot --client claude - Or run directly with Docker:
docker run -e HUBSPOT_ACCESS_TOKEN=your_token buryhuang/mcp-hubspot:latest
Available MCP tools:
| Tool | What It Does |
|---|---|
| hubspot_create_contact | Create contacts with duplicate prevention |
| hubspot_create_company | Create companies with duplicate prevention |
| hubspot_get_company_activity | Pull recent activity for a company |
| hubspot_get_active_contacts | Fetch recently active contacts |
| hubspot_get_recent_conversations | Retrieve conversation threads with messages |
| hubspot_search_data | Semantic search across CRM data via FAISS |
Method 3: HubSpot API Direct Access (Full Control)
If you need custom objects, complex CRM queries, or workflow engine access, Claude Code can call HubSpot's REST API directly. This requires a private app access token and manual HTTP requests — but gives you access to every endpoint HubSpot exposes.
Setup:
- In HubSpot, go to Settings → Integrations → Private Apps → Create a private app
- Assign the scopes you need (contacts, companies, deals, custom objects, etc.)
- Copy the access token
- Store it in a
.envfile that Claude Code can access - Prompt Claude Code to make authenticated requests:
curl -H "Authorization: Bearer $HUBSPOT_TOKEN" https://api.hubapi.com/crm/v3/objects/contacts
Claude Code handles the HTTP calls, parses the JSON responses, and acts on the results. You get full access to custom objects, pipeline stages, and association APIs — everything the connector and basic MCP servers cannot reach.
MCP Setup: Step-by-Step Configuration
MCP is the best path for automated, repeatable workflows. Below is the full Composio-hosted setup, which handles OAuth and token refresh for you.
Step 1: Get Your Composio API Key
Sign up at Composio and grab your API key from the dashboard. Create a .env file:
COMPOSIO_API_KEY=your_key_here USER_ID=your_user_id
Step 2: Generate the MCP URL
Install the Composio library and generate your session URL:
pip install composio-core python-dotenv
# generate_mcp_url.py
import os
from composio import Composio
from dotenv import load_dotenv
load_dotenv()
client = Composio(api_key=os.getenv("COMPOSIO_API_KEY"))
session = client.create(
user_id=os.getenv("USER_ID"),
toolkits=["hubspot"],
)
print(session.mcp.url)Step 3: Register the MCP Server With Claude Code
Run the following command in your terminal:
claude mcp add --transport http hubspot-composio \ "YOUR_MCP_URL" \ --headers "X-API-Key:YOUR_COMPOSIO_API_KEY"
Step 4: Authenticate HubSpot
The first time you use a HubSpot tool in Claude Code, Composio opens a browser OAuth flow. Approve the connection and you are set. Token refresh is handled automatically — no manual re-authentication.
Step 5: Verify the Connection
Restart Claude Code, then prompt it:
> List 5 recent contacts from HubSpot
If it returns real CRM data, the connection is live. If not, check that your MCP URL is correct and that you completed the OAuth flow.
Workflow Triggers: What You Can Automate
Once Claude Code connects to HubSpot, you can build workflows that trigger automatically — or fire them manually from a prompt. Here are the highest-impact patterns GTM teams are running right now.
1. Inbound Lead Enrichment
A new contact hits HubSpot through a form submission. Claude Code picks it up, runs the email through waterfall enrichment, and writes firmographic data (company size, industry, tech stack) back to the contact record. No manual research required.
2. Lead Scoring and Routing
Claude Code reads new contacts, scores them against your ICP definition using enriched data, and updates a custom HubSpot property with the score. Contacts above threshold get assigned to the right rep and enrolled in a high-touch sequence.
3. Deal Stage Automation
When a deal moves to “Proposal Sent,” Claude Code pulls the company's latest news and org chart data, generates a personalized follow-up email, and logs it as a note on the deal. The rep gets context without lifting a finger.
4. CRM Data Hygiene
Schedule a weekly prompt: “Find contacts in HubSpot with missing phone numbers, enrich them, and update the records.” Claude Code fetches active contacts with empty fields, runs enrichment, and patches the records. Your CRM stays clean without ops team hours.
5. Marketing Campaign Feedback Loop
Claude Code pulls campaign performance data from HubSpot (open rates, click rates, conversion by segment), analyzes what is working, and drafts recommendations or updates to email copy — all in one session.
Bi-Directional Data Sync Between Claude Code and HubSpot
The integration is not one-way. Claude Code reads from HubSpot to inform its decisions and writes back to keep your CRM current.
| Direction | Data Type | Example |
|---|---|---|
| HubSpot → Claude Code | Contact records | Pull new leads to enrich and score |
| HubSpot → Claude Code | Deal pipeline | Analyze stalled deals for coaching prep |
| HubSpot → Claude Code | Campaign metrics | Evaluate email performance by segment |
| Claude Code → HubSpot | Enriched properties | Write firmographic data to contact fields |
| Claude Code → HubSpot | Activity logs | Log calls, notes, tasks, and emails |
| Claude Code → HubSpot | New records | Create contacts and companies from enriched lists |
SyncGTM fits into this loop as the enrichment layer. Claude Code reads a contact from HubSpot, sends it to SyncGTM's MCP for waterfall enrichment across 50+ providers, and writes the verified data back to HubSpot. One prompt. Three systems. Zero manual steps.
Real-World Use Cases
Use Case 1: Automated Inbound Lead Qualification
A B2B SaaS company receives 200+ inbound leads per week through HubSpot forms. Before: a BDR manually researched each lead on LinkedIn and ZoomInfo, taking 4–6 minutes per contact. After: Claude Code monitors new contacts via MCP, enriches each through SyncGTM (pulling verified email, company size, tech stack, and funding data), scores against ICP, and routes qualified leads to reps with full context in the HubSpot notes field. Time per lead: 0 minutes manual.
Use Case 2: Weekly Pipeline Review Prep
A sales manager runs a weekly prompt: “Pull all deals in Negotiation stage from HubSpot. For each, summarize recent activity, flag deals with no engagement in 7+ days, and draft a follow-up email for stalled ones.” Claude Code exports the report as a CSV and pushes follow-up drafts to the deal notes. The Monday pipeline meeting is prepped before the manager opens their laptop.
Use Case 3: Marketing Campaign Optimization
A marketing ops team wants to know which nurture sequences convert best. Claude Code pulls campaign data from HubSpot, cross-references with deal stage progression, and generates a breakdown showing which email sequences led to the most SQLs. The analysis runs in 90 seconds — replacing what used to be a 3-hour spreadsheet exercise.
Limitations and Gotchas
Know these constraints before committing to a workflow.
- No delete operations via connector. The official HubSpot connector cannot delete records. Use the API directly if you need to clean up duplicates or remove test data.
- 10-record bulk limit. The connector caps bulk create/update at 10 records per operation. For larger imports, use the HubSpot Batch API through Method 3.
- Custom objects not supported by connector. If your HubSpot instance uses custom objects (common in enterprise setups), you need direct API access. MCP servers and the connector only handle standard objects.
- Rate limits. HubSpot enforces 100 requests/10 seconds for private apps and 200/10 seconds for OAuth apps. Claude Code can hit these quickly if running batch operations. Build in delays or batch your requests.
- Sensitive Data settings block engagement access. If your HubSpot account has Sensitive Data turned on, the connector cannot access engagement data (emails, calls, meetings). Check your settings before troubleshooting missing data.
- Custom validation rules are bypassed. When creating records through the connector, HubSpot's custom validation rules do not apply. Verify data quality in your prompts or add validation logic to your Claude Code workflow.
Conclusion
This integration turns HubSpot from a passive database into an active operations layer. Connector for speed. MCP for power. Direct API for full control.
For most GTM engineering teams, the MCP route hits the sweet spot: fast setup, bi-directional data flow, and enough flexibility to build automated enrichment, scoring, and routing workflows.
Pair it with SyncGTM for the enrichment layer — waterfall contact data from 50+ providers, job change signals, tech stack detection — and you have a complete pipeline from raw lead to fully enriched, scored, and routed HubSpot record. No manual work. No tab-switching. One prompt.
Ready to connect your stack?
Start with SyncGTM free — connect Claude Code to HubSpot and 50+ enrichment sources in under 10 minutes. No credit card required.
