Claude Code + HubSpot: AI-Powered CRM Automation in 2026
By Kushal Magar · April 26, 2026 · 15 min read
Key Takeaway
Claude Code connects to HubSpot via MCP using a Private App token, enabling bi-directional CRM access from plain English prompts. Automate contact enrichment, deal stage updates, pipeline hygiene, and personalized email sequences — pair with SyncGTM to fill data gaps Claude Code cannot source on its own.
HubSpot is where your contacts, deals, and revenue history live. But keeping that data clean, routing leads to the right rep, and personalizing outreach at scale still demands too much manual work. The Claude Code HubSpot integration changes that.
By connecting Claude Code to HubSpot through the Model Context Protocol (MCP), you get live bi-directional access to your CRM from a terminal conversation. Create contacts, update deal stages, audit pipeline health, and generate personalized email sequences — all in plain English, no clicking through HubSpot’s interface required.
This guide covers the complete setup: HubSpot Private App configuration, MCP registration, contact enrichment workflows, deal tracking automation, AI email sequences, and how SyncGTM fits as an enrichment layer to fill the data gaps Claude Code cannot source on its own.
How does the Claude Code HubSpot integration work?
Create a HubSpot Private App with the required CRM and marketing email scopes, register the HubSpot MCP server in Claude Code (via Composio or self-hosted), and authenticate using your Private App token. Once connected, Claude Code has live bi-directional access to your HubSpot portal — read contacts, write deal updates, trigger workflows, and generate email sequences from natural language prompts.
TL;DR
- Private App token is the auth layer. Create a HubSpot Private App with CRM read/write and marketing email scopes before anything else.
- MCP enables live CRM access. Register the HubSpot MCP server once and Claude Code can interact with your portal in every subsequent session.
- Contact enrichment runs on demand. Claude Code queries contacts with missing data, exports the gap list, and writes enriched fields back after SyncGTM fills them.
- Deal tracking is conversation-driven. Update pipeline stages, flag stale deals, and generate forecast reports from plain English prompts.
- Email sequences get AI-personalized. Claude Code pulls contact context from HubSpot and writes tailored subject lines and body copy for every recipient.
- SyncGTM closes the data gap. Claude Code finds records with missing information; SyncGTM fills them from 20+ providers and syncs back to HubSpot.
What Is the Claude Code HubSpot Integration?
The Claude Code HubSpot integration is a live, bi-directional connection between Anthropic’s AI coding agent and the HubSpot CRM, established via the Model Context Protocol (MCP) and authenticated with a HubSpot Private App token — enabling plain-English CRM queries, contact updates, deal automation, and email generation from a terminal.
Claude Code is an AI coding agent from Anthropic that runs in your terminal. It reads files, executes commands, calls APIs, and connects to external data sources via the Model Context Protocol (MCP) — an open standard for live tool integrations.
When you register a HubSpot MCP server, Claude Code can make real-time API calls to your HubSpot portal. Not a one-time export — a live connection that persists across every conversation. You describe what you need, and Claude Code translates that into HubSpot API calls, executes them, and returns results directly in the terminal.
The result: a RevOps engineer or sales ops manager can query contacts, update deal stages, trigger workflow enrollments, and draft email sequences in plain English — without opening HubSpot, writing API code, or configuring workflow builders manually.
For a broader look at Claude Code’s GTM use cases beyond HubSpot, the How GTM Teams Use Claude Code guide covers six workflows that replace manual ops entirely.
Why Connect Claude Code to HubSpot in 2026
HubSpot is used by over 240,000 companies globally. Despite its depth as a CRM, three manual tasks drain time from every HubSpot team:
- Data entry and updates: Reps spend hours logging activities, updating deal stages, and maintaining contact records that could be automated
- Contact enrichment: New inbound leads arrive with incomplete data — missing phone numbers, wrong job titles, no company size — requiring manual research before outreach can start
- Email personalization: Scaling personalized outreach requires pulling context from multiple contact fields and writing copy that reflects each recipient’s situation
According to Salesforce’s State of Sales report, sales reps spend 28% of their week on manual data entry. The Claude Code HubSpot integration automates all three bottlenecks — and because it uses HubSpot’s official Private App API, it operates within your existing permission model.
Organizations using AI-driven CRM automation have seen 23% higher conversion rates on nurtured leads compared to manual processes. Connecting Claude Code to HubSpot is how your team captures that delta.
The CRM automation workflows guide covers the 12 most impactful automation patterns across any CRM — most of which apply directly to HubSpot.
Step 1: HubSpot MCP Setup — Connect Claude Code
Connecting Claude Code to HubSpot requires a HubSpot Private App for authentication and an MCP server to translate Claude Code’s tool calls into HubSpot API requests.
Create a HubSpot Private App
- Log into HubSpot and go to Settings → Integrations → Private Apps
- Click Create a private app and give it a name (e.g., Claude Code MCP)
- Under Scopes, select the following:
crm.objects.contacts.readandcrm.objects.contacts.writecrm.objects.deals.readandcrm.objects.deals.writecrm.objects.companies.readandcrm.objects.companies.writemarketing-email— read and send emailcrm.objects.owners.read— for lead routingautomation— workflow enrollment triggers
- Click Create app. HubSpot generates a Private App token — copy it immediately
Security note
- Store the Private App token in an environment variable, not in plain text files.
- Never commit the token to version control — add
.envto.gitignore. - Create a dedicated HubSpot user for integrations with minimum required permissions.
- Rotate the token every 90 days as a security baseline.
Register the HubSpot MCP server
The fastest path is Composio, which hosts a managed HubSpot MCP server with 60+ operations and handles token refresh automatically. Alternatively, use the official HubSpot connector for Claude, currently in beta.
- Install Claude Code if not already:
npm install -g @anthropic-ai/claude-code - Set your HubSpot token as an environment variable:
export HUBSPOT_ACCESS_TOKEN=your_private_app_token - Get your Composio MCP URL (requires a free Composio account), then register:
claude mcp add --transport http hubspot-composio "YOUR_COMPOSIO_MCP_URL" - Verify the connection:
claude mcp listshould showhubspot-composioas active - Test with a simple read query in Claude Code: “List the 5 most recently created contacts in HubSpot.”
Step 2: Automated Contact Enrichment
Automated contact enrichment with Claude Code and HubSpot works by querying all contacts with incomplete fields via MCP, exporting a gap list, running waterfall enrichment through SyncGTM, and writing verified data back to HubSpot — all without manual research.
Contact enrichment is the highest-ROI starting point for Claude Code inside HubSpot. Every inbound lead that arrives with missing data is a conversion opportunity at risk.
Claude Code identifies which contacts have incomplete records. It cannot source the missing data itself — that requires an external data layer. The workflow combines Claude Code’s CRM query capabilities with SyncGTM’s waterfall enrichment to produce clean, complete contact records.
What Claude Code queries for
- Contacts where
emailis empty or unverified - Contacts where
phoneis missing - Contacts where
jobtitleis blank or generic (“Owner”, “Manager”) - Contacts where
companyname is present but firmographic fields (industry, headcount, revenue) are missing - Contacts with
lifecyclestageof “Lead” but no activity in the last 14 days
Example prompt sequence
Prompt 1 — audit
“Find all HubSpot contacts created in the last 30 days where the email property is empty. Return their first name, last name, company, and contact ID.”
Prompt 2 — export gap list
“Save those results as a CSV with columns: contact_id, first_name, last_name, company_name, linkedin_url (if available).”
Prompt 3 — write back after SyncGTM enrichment
“I have a CSV of enriched contact data with contact_id, verified_email, direct_phone, and current_jobtitle. Update each HubSpot contact using these values.”
This three-prompt workflow replaces hours of manual contact research. Claude Code handles the CRM query and the write-back. SyncGTM handles the data sourcing in between.
For a detailed look at what SyncGTM enriches and how it integrates with HubSpot natively, see the 11 HubSpot enrichment tools comparison.
Step 3: Deal Tracking and Pipeline Automation
Claude Code automates HubSpot deal tracking by querying stale deals, overdue close dates, missing amounts, and stuck pipeline stages via MCP — then updating records, creating tasks, and generating pipeline reports from plain English prompts.
Deal tracking automation is where Claude Code delivers the clearest time savings inside HubSpot. Pipeline reviews that take a RevOps analyst 2–3 hours manually run in under 10 minutes with Claude Code.
Pipeline hygiene checks Claude Code runs
- Stale deals: Open deals with no activity (note, task, email, call) in the last 14 days
- Overdue close dates: Deals with a
closedatein the past that are not Closed Won or Closed Lost - Missing deal amounts: Deals in the pipeline with no
amountproperty set - Single-contact deals: Opportunities associated with only one contact (higher churn risk, lower close probability)
- Stage stuck: Deals that have been in the same pipeline stage for longer than your average sales cycle length
- No next activity: Deals with no scheduled task or meeting in HubSpot’s activity timeline
Automated deal updates Claude Code handles
Stage progression
“Move all deals in Proposal Sent stage where the last email was sent more than 5 days ago to Negotiation stage and create a follow-up task for the deal owner.”
Close date updates
“Find all deals with a close date before today that are still open. Push each close date forward by 30 days and add a note: 'Close date extended — needs rep review.'”
Pipeline report generation
“Pull all open deals grouped by pipeline stage with total value, count, and average days in stage. Format as a Markdown table for the Monday pipeline review.”
Lead routing
“Find all new leads created today where company size is over 500 employees. Assign them to the enterprise sales owner and set lifecycle stage to Marketing Qualified Lead.”
For teams managing complex HubSpot pipelines, the pipeline management tools guide covers complementary platforms for reporting and forecasting alongside Claude Code.
Step 4: AI-Powered Email Sequences
Claude Code generates personalized HubSpot email sequences by reading each contact’s CRM properties — job title, company, lifecycle stage, deal stage, last activity — and writing unique subject lines and body copy tailored to that specific recipient, not a template with variable placeholders.
AI-powered email sequences are the most visible output of connecting Claude Code to HubSpot. Every contact has context stored in HubSpot — job title, company, lifecycle stage, last activity, deal stage, recent notes. Claude Code reads all of it and writes emails that feel one-to-one, even at scale.
This is a fundamentally different approach to email personalization. Tools like Lemlist or Instantly use template variables. Claude Code reads the actual CRM record and writes a unique email for each contact.
What Claude Code pulls from each HubSpot contact
- Current job title and seniority level
- Company name, industry, and headcount
- Lifecycle stage and most recent deal stage
- Last engagement date and activity type (email opened, page visit, form submission)
- Associated deal name and amount (for follow-up sequences)
- Any custom properties (e.g., pain point noted by rep, trial status)
Email sequence workflow
- Query the segment. Ask Claude Code for contacts matching your target criteria (e.g., “CFOs at SaaS companies with 50–200 employees in Proposal Sent stage”)
- Pull contact context. For each contact, Claude Code reads all relevant HubSpot properties
- Generate personalized emails. Claude Code writes subject lines and body copy tailored to each recipient’s role and situation — not a template, a unique email per person
- Review and queue. Optionally review a sample before sending. Claude Code creates draft emails in HubSpot or exports to your sending tool
- Track responses. Ask Claude Code to pull reply rates and update lifecycle stages for contacts who responded
“We ran Claude Code on a segment of 180 stale deals in HubSpot and generated personalized re-engagement emails for each. 34 replied. Manual personalization for that list would have taken three reps a full day.”
— GTM Engineer, Series A SaaS company
For teams building larger email automation stacks on top of HubSpot, the cold email automation sequences guide covers the full infrastructure for sending, landing, and converting at scale.
Step 5: SyncGTM Integration for Waterfall Enrichment
SyncGTM integrates with Claude Code and HubSpot by receiving the gap list Claude Code exports, running waterfall enrichment across 20+ data providers to find verified emails and phone numbers, then writing enriched contact data back to HubSpot automatically via the native SyncGTM HubSpot integration.
Claude Code is exceptional at CRM logic, automation design, and personalization. It cannot source contact data it does not already have — verified emails, direct phone numbers, updated job titles, or company firmographics. SyncGTM fills that gap using waterfall enrichment across 20+ data providers.
The complete Claude Code + SyncGTM + HubSpot workflow
- Claude Code audits HubSpot. Queries identify all contacts and deals with missing or incomplete fields
- Export the gap list. Claude Code generates a CSV of records needing enrichment — name, company, LinkedIn URL, any available identifiers
- SyncGTM runs waterfall enrichment. The list runs through 20+ data providers in waterfall sequence — if provider 1 has no email, provider 2 is tried automatically, and so on until a verified result is found
- SyncGTM syncs enriched data back to HubSpot. Via the native SyncGTM HubSpot integration, enriched fields are written back automatically without a manual CSV import
- Claude Code picks up clean data. The next Claude Code session now has complete contact records to work with for email generation, lead routing, or reporting
What SyncGTM enriches into HubSpot
- Verified business email addresses — multi-waterfall, 85%+ hit rate
- Direct phone numbers and mobile numbers
- Current job title and seniority level
- LinkedIn profile URL
- Company headcount, industry, and technology stack
- Funding stage and total funding raised
- Recent company signals (hiring trends, funding rounds, product launches)
SyncGTM pricing
SyncGTM uses a usage-based model — pay per enrichment credit, not per seat. See syncgtm.com/pricing for current plans. Most teams recover the cost in the first week by reactivating leads that were stuck behind missing contact data.
Limitations to Know Before You Start
Claude Code is powerful inside HubSpot, but it has real constraints. Knowing them upfront saves wasted setup time.
| Task | Claude Code | Better alternative |
|---|---|---|
| On-demand CRM queries | Excellent | — |
| Bulk record updates | Good (with review step) | — |
| Email personalization at scale | Excellent | — |
| Event-driven real-time triggers | Not supported | HubSpot Workflows, n8n |
| Scheduled recurring automation | Manual prompting only | HubSpot Workflows, Zapier |
| Sourcing new contact data | Cannot source external data | SyncGTM waterfall enrichment |
| Visual workflow builder | Terminal only | HubSpot Workflow builder |
| HubSpot reporting dashboards | Text output only | HubSpot Reports |
Use Claude Code for on-demand CRM queries, bulk updates, contact enrichment orchestration, and email generation. Use HubSpot’s native Workflows for event-driven triggers that fire automatically without a human prompting Claude Code first.
See the top CRM automation tools guide for the broader automation stack that complements Claude Code inside HubSpot.
Conclusion
The Claude Code HubSpot integration gives RevOps and GTM teams live bi-directional CRM access through a single Private App token and MCP registration. Tasks that previously required manual clicking or developer support — contact audits, deal stage updates, lead routing, pipeline hygiene, personalized email drafting — now take minutes in plain English.
The setup is a one-time investment: create the Private App, configure scopes, register the MCP server, authenticate once. From that point, every Claude Code session has live access to your HubSpot portal.
Pair it with SyncGTM to close the data gap. Claude Code identifies every contact with missing information. SyncGTM fills it using waterfall enrichment across 20+ providers and writes it back to HubSpot automatically. Your CRM stays clean, complete, and ready for outreach — without anyone doing manual research.
If you are building a GTM engineering practice, the Claude Code + HubSpot + SyncGTM stack is one of the fastest paths to a fully automated CRM in 2026. Start with the Private App setup, register MCP, and run your first contact enrichment audit today.
