HubSpot connector for Claude Code

Use Porter’s HubSpot connector for Claude Code to pull contacts, sources and deals into your terminal, then turn them into files, scripts and scheduled reports in your own project.

  • Save contacts by source as CSV in your repo
  • See which sources turn into customers
  • Run a weekly HubSpot report from a script
  • Join HubSpot with your ad spend
G2★★★★★Rated 4.6/5 from 288 G2 reviews (October 2026) · Used by 1,600+ marketing teams and agencies

By · Last updated November 26, 2026

Claude Codeporter connected
Show contacts created in the last 6 months by Month and year and Contact original source, and save it to reports/hs-sources.csv
porter / HubSpot / Trailgear Demo✓ 4 rows
Saved reports/hs-sources.csv. Organic search brings the most contacts; Paid social grew fastest.
SourceContactsChange
Organic search2,840+12%
Paid search1,960+8%
Paid social1,210+31%
Email marketing860-4%
Demo data, Trailgear Demo account
500+ HubSpot fields
01Setup

How to connect HubSpot to Claude Code

Connecting HubSpot to Claude Code takes 3 steps and no API keys: connect your HubSpot portals in Porter with HubSpot, add Porter’s MCP server to Claude Code with one command, then sign in from /mcp and ask. The same server also works in Cursor, VS Code and Codex, as Porter’s HubSpot MCP server page shows. Using the Claude app instead? See the HubSpot connector for Claude.

Before you start

  • You need Claude Code installed (Anthropic’s Claude Code overview), a free Porter account and a HubSpot user who can approve app installs for the portal.
  • Works with any Claude model in Claude Code, from Opus to Sonnet and Haiku.
  1. Step 1: Connect HubSpot in Porter

    Sign up free at Porter, pick HubSpot as the source and sign in with HubSpot. Tick every portal you want Claude Code to read.

  2. Step 2: Add Porter to Claude Code

    In your terminal, run this command. It adds Porter for every project on your machine; drop --scope user to add it to the current project only.

    Terminal
    claude mcp add --transport http --scope user porter https://mcp.portermetrics.com/mcp

    Or, inside Claude Code, install Porter’s plugin, which adds the server and Porter’s skill together: /plugin marketplace add portermetrics/porter, then /plugin install porter-metrics@portermetrics.

  3. Step 3: Sign in and ask

    Start claude, type /mcp, pick porter and sign in with the Google account you use in Porter. When porter shows as connected, paste this prompt:

    Prompt
    Which HubSpot portals can you see? Show contacts created in the last 6 months by Month and year and Contact original source, and save it to reports/hs-sources.csv.

Guides and videos

app.portermetrics.com / create
Porter's Select accounts window for HubSpot with a demo account and the Connect button
First, in Porter, open HubSpot and select Connect.
HubSpot screen for connecting your Porter Metrics Hub account to HubSpot
Then, sign in to your HubSpot account and approve access.
$ claude mcp add --transport http --scope user porter https://mcp.portermetrics.com/mcp

$ claude mcp list
porter: https://mcp.portermetrics.com/mcp (HTTP)
Then, add Porter's MCP server from your terminal.
> /mcp
porter · needs authentication → Authenticate

> Which HubSpot accounts can you see?
● porter - list_accounts (MCP)
Trailgear Demo
After you sign in from /mcp, Claude Code lists your HubSpot accounts.
02Use cases and prompts

What you can do in Claude Code

Claude Code works inside your project, so HubSpot answers can become files, scripts and dashboards instead of chat replies. Each use case has a prompt to copy and uses the HubSpot fields Porter reads.

Can Claude Code export HubSpot contacts by source?

The problemSource reports in HubSpot need rebuilding for every new question.

What Claude Code doesClaude Code pulls Total contacts by Month and year and Contact original source through Porter and writes them to a CSV.

What you getA clean source file in your repo, ready for your own analysis.

Prompt
For HubSpot contacts created in the last 6 months, show Total contacts by Month and year and Contact original source and save it as data/hubspot-sources.csv.

Which sources turn into customers?

The problemLead volume by source hides which ones actually buy.

What Claude Code doesClaude Code lists contacts whose Contact became a customer date falls in the period, grouped by Contact original source.

What you getCustomers by source, not only leads.

Prompt
List HubSpot contacts created in the last 24 months whose Contact became a customer date is in the last quarter, count them by Contact original source and save it to reports/hs-customers.csv.

Can I schedule a HubSpot report with Claude Code?

The problemHubSpot dashboards show contacts, but not which sources turned into customers last week.

What Claude Code doesA weekly claude -p job compares new contacts by Contact original source and contacts that became customers.

What you getreports/hs-weekly.md showing which sources brought contacts that became customers.

Prompt
claude -p "Compare last week with the week before in HubSpot: new contacts by Contact original source and contacts that became customers. Write it to reports/hs-weekly.md" --allowedTools "mcp__porter" "Write"

Can Claude Code combine HubSpot with my ad platforms?

The problemSpend lives in each ad platform and customers live in HubSpot.

What Claude Code doesClaude Code pulls monthly customers by source from HubSpot and monthly spend from your connected ad platforms through the same server.

What you getCost per customer by channel in one file.

Prompt
For the last 6 months, pull contacts that became customers by Contact original source from HubSpot and monthly spend from Meta Ads and Google Ads, and write cost per customer by month to reports/hs-cac.csv.
03Why Porter

Why Porter for HubSpot in Claude Code

HubSpot’s own MCP server covers HubSpot alone. Porter connects HubSpot with one app approval and puts it next to your ad platforms, GA4 and 30+ other sources behind the same server.

✓

One server for all your sources

The same porter server answers about HubSpot, Meta Ads, Google Ads, GA4 and Shopify, so one script can pull every channel.

⊞

Changes only after you approve

Claude Code can make changes through Porter where the platform allows them, and each change waits for your yes.

⚙

No private app or token

You approve Porter in HubSpot and sign in with Google in Claude Code. There is no private app or access token to maintain.

↻

Hosted dashboards when a file isn’t enough

Ask for a Porter AI dashboard and it is published at its own link, synced automatically and ready to share with a client.

04Dashboard

Dashboard template

Claude can also build a live dashboard through Porter, with contacts, deals, pipeline and marketing email results in one view. Either ask for it in chat, or copy one of Porter’s free HubSpot dashboard templates for a shared report your team opens every week.

AI dashboards

Build a live HubSpot dashboard from your terminal

Describe the dashboard in one sentence and Porter builds it. A client-ready dashboard in minutes, with no chart dragging and no BI tool to learn. Ask Claude Code:

Prompt
Build a live HubSpot dashboard for my account with the last 30 days, the main KPIs and a weekly trend.
Live URLEach dashboard at its own link: no login, no app, no download
Auto-syncFresh HubSpot data, nobody re-exports each period
Scheduled deliveryEmail or PDF sends on a set day
White labelYour logo and branding for clients
Sharing permissionsView or edit access per person
HubSpot dashboard template by Porter
Template

The HubSpot AI dashboard template

Start from Porter’s official HubSpot dashboard template, or run the prompt above in Claude Code and Porter publishes the dashboard at its own link.

05Pricing

Pricing

You can start free, since Porter’s HubSpot connector for Claude comes with every plan. Use the calculator for your number of accounts, or see Porter pricing for every plan.

What you get

  • Free plan: never expires, with unlimited connected accounts and the last 15 days of data in Claude (30 days in Data Studio and Sheets)
  • Reporting: from $12.50 per account a month billed annually, or $15 month to month for one account
  • Billing: each HubSpot portal counts as one account, with volume discounts and no per-seat fee
  • Changes: record updates run only after you approve; AI credits as listed on Porter pricing
  • Trial: 14 days of full access, no card

Price calculator

$33.33/mo$6.67 per account

An account is one ad account, Stripe account, store, page or GA4 property. The Free plan never expires and has unlimited accounts, with the last 15 days of data in AI chats.

06Data and actions

HubSpot data and actions in Claude Code

The HubSpot connector gives Claude 500+ fields as well as your portal's custom properties. It also has 28 actions to search, create, update, link and delete records. Fields cover areas including contacts, lifecycle stages, original sources, companies, deals, pipelines, owners, marketing emails, forms and lists. The full list of HubSpot fields also has every label and ID.

The 12 HubSpot fields Claude uses most

FieldWhat it's for
Total contactshubspot_total_contactsContact volume by month, source or owner
Contact original source · Contact original source drill-down 1hubspot_contact_analytics_source · hubspot_contact_analytics_source_data_1Where each contact first came from
Contact lifecycle stagehubspot_contact_lifecycle_stageEach contact's stage today
Contact became a marketing qualified lead date · Contact became a customer datehubspot_contact_lifecycle_stage_marketing_qualified_lead_date · hubspot_contact_lifecycle_stage_customer_dateTime between lifecycle stages
Contact owner · Deal ownerhubspot_contact_owner · hubspot_deal_ownerResults and gaps by rep
Total dealshubspot_total_dealsDeal volume by pipeline, stage or week
Deal pipeline · Deal stagehubspot_deal_pipeline · hubspot_deal_stageWhere each deal sits
Deal amount · Deal amount wonhubspot_deal_amount · hubspot_deal_amount_closed_wonPipeline value and revenue won
Deal closed won · Deal closed losthubspot_deal_closed_won · hubspot_deal_closed_lostWin rate by owner or pipeline
Deal last activity datehubspot_deal_notes_last_updatedStalled-deal checks
Marketing email open ratio · Marketing email click ratiohubspot_mkt_email_openratio · hubspot_mkt_email_clickratioEmail performance by send
Total companies · Company industryhubspot_total_companies · hubspot_company_industryAccount counts and data gaps

Can Claude change or delete HubSpot records?

Yes. If you're weighing read-only vs write permissions, Porter covers both. Claude can search, list and open contacts, companies, deals and tickets, then create and update them. It can also log notes and link records (contact to company, deal to contact).

It can also delete contacts, companies, deals or tickets, which moves them to HubSpot's recycling bin for 90 days (HubSpot's guide to restoring deleted records). For calls, meetings, tasks, campaigns, marketing emails, pages, lists and workflows, Claude drafts what to set up and you add it in HubSpot.

How fresh is the data, and how far back?

Each answer shows when Porter last refreshed the portal. Records go back as far as your portal holds them (tested to 2021), while properties show today's values rather than past ones.

Paid plans read your full history, while the free plan covers 15 days in AI chats (30 days in Data Studio and Sheets). New or edited records can also take a few moments to show up in search (HubSpot's CRM search docs).

Product stats

WhatHubSpot connector
Fields500+ plus your portal's custom properties
Actions28 to search, create, update, link and delete records
FreshnessEach answer shows when Porter last refreshed the portal; new or edited records can take a few moments to show up
HistoryAs far back as your portal holds records on paid plans (tested to 2021); 30 days on the Free plan, 15 in AI chats
Objects per questionOne CRM object at a time (contacts, companies, deals or marketing emails); Claude combines the answers
Time zoneDate presets use UTC; ask with explicit dates to match your portal
AccessHubSpot sign-in with the read and write permissions Porter needs; changes only after you confirm

See all 500+ HubSpot fields

07Security

Is it safe?

Yes. Claude asks before every change Porter would make: each create, update or delete is shown first, and nothing changes until you confirm. Porter's HubSpot connector for Claude Code uses HubSpot's official API with the permissions you grant at sign-in, and you can also revoke access at any time.

How changes get approved

Reading data never changes HubSpot, because only a change you confirm does. Start with one record before you ask for bulk changes, and check lifecycle stage and deal stage changes before you confirm them.

HubSpot's own pipeline rules still apply to every change. If a record gets deleted by mistake, you can bring it back from the recycling bin (restore deleted HubSpot records).

What the connector needs from HubSpot

Porter needs both a HubSpot user in each portal and a sign-in to HubSpot from Porter. During sign-in, it asks only for the read and write permissions it needs.

If Claude can query a portal but hosted reports reject it, that portal needs a licence slot in Porter. To revoke access, either uninstall Porter in HubSpot's Connected Apps (HubSpot's steps to uninstall a connected app) or disconnect it in Porter.

08FAQ

FAQ

Answers on setup, scope, scripts and credits, plus fixes for the most common Claude Code errors with HubSpot. Setup questions every source shares, like where Claude Code saves the server and how to share it with your team, are in the Claude Code hub FAQ.

Can I put ad spend next to HubSpot contacts?

Yes. Connect your ad platforms in Porter and ask for spend next to new contacts by original source. Claude Code writes both to one file, so you can compare cost against the contacts each source brought.

Can I report on deals too?

Yes. Porter reads HubSpot deals as well as contacts, so Claude Code can report closed deals next to the sources that created them.

Do Claude Code questions use Porter credits?

Reading HubSpot data uses no AI credits. Each completed change, such as a contact update, uses 1 credit, and every Porter account gets 100 free credits a month.

Troubleshooting

Why does /mcp show porter as needing authentication?

Claude Code adds the server before you sign in. Pick porter in /mcp, choose Authenticate and sign in with the Google account you use in Porter.

Why does my claude -p script stop and ask for permission?

Scripts can’t answer permission prompts. Pass the tools the script may use, for example --allowedTools "mcp__porter" "Write", so Claude Code can read Porter and save files without stopping.

Why does Claude Code see my portal but return no data?

Usually the date range has no records, or the HubSpot user who approved Porter can’t see those objects. Check the user’s permissions in HubSpot, then ask again.

09Next

More Claude connectors

Most HubSpot teams also run an email platform or a data warehouse, and Porter connects those to Claude the same way. For example, add your email platform, push HubSpot into BigQuery for SQL work, or start a client report from a template.

Not only Claude. Send HubSpot data anywhere

The same Porter account and connection also send HubSpot data to these destinations, at no extra cost.

Try the connector in Claude Code

Porter’s HubSpot connector for Claude Code takes one command, so your first source report can land in your project today. Start with a CSV, then track customers by source or schedule a weekly script.

Free plan · 14-day trial · No card needed

CRM and lifecycle marketers: sources, customers and costs land in one file.

Marketing ops: HubSpot data joins your ad spend without an export.

Agencies: one script builds the weekly report for every client portal.