communitystdio

HubSpot MCP Server

Read CRM records and log activities in HubSpot from Claude Code or Cursor with a single private app token.

Updated: April 15, 2026

Install

npx hubspot-mcp
~/.claude/settings.json
{
  "mcpServers": {
    "hubspot-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "hubspot-mcp"
      ],
      "env": {
        "HUBSPOT_ACCESS_TOKEN": "pat-na1-xxx"
      }
    }
  }
}

Capabilities

  • + Manage contacts and companies including create, read, and update operations
  • + Create and update deals with pipeline and stage assignments
  • + Log activities, calls, and notes against any CRM record
  • + Search across contacts, companies, deals, and tickets with filter groups
  • + Read deal pipeline stages and probability settings
  • + Read meeting data including attendees and outcome disposition

Limitations

  • - Requires a HubSpot Private App token; OAuth and API keys are not supported by the server
  • - Complex workflows and automation rules are not exposed as MCP tools
  • - Email send functionality is missing; you can log emails but not dispatch them
  • - Marketing campaigns and email templates are read-only, even with the right scopes

HubSpot MCP server setup for Claude Code and Cursor

Quick answer: The HubSpot MCP server wraps the HubSpot API as MCP tools for Claude Code and Cursor. Drop in the env vars, run one npx command, and the editor can reach the service directly. Setup takes about 5 minutes, tested on hubspot-mcp@0.4.2 on April 15, 2026.

HubSpot is the CRM and marketing hub many B2B teams run on. Contacts, deals, tickets, and email logs all live inside a single schema. Without an MCP connection, working with HubSpot means flipping between the editor and the web UI - copying IDs, pasting results, losing context. The MCP server removes that loop. Claude can fetch the data itself, reason about it, and write changes back without you switching tabs.

This guide covers install, config for both editors, prompt patterns that actually work, and the places where the API will bite back.

What this server does

The server speaks MCP over stdio and wraps the standard HubSpot SDK. The tool surface is grouped into these sets:

  • Contacts: list_contacts, get_contact, create_contact, update_contact, search_contacts
  • Companies: list_companies, get_company, create_company, update_company
  • Deals: list_deals, get_deal, create_deal, update_deal, list_pipelines
  • Engagements: log_note, log_call, log_email, log_meeting
  • Tickets: list_tickets, create_ticket, update_ticket

Authentication uses HUBSPOT_ACCESS_TOKEN. The server holds credentials in process memory for the life of the subprocess. Nothing is written to disk by the server itself. If you rotate the credential, restart the MCP server and the new value takes effect immediately.

The server does not implement a local cache. Every tool call is a fresh round trip. For most workflows this is fine - round trip times are 100-400 ms - but it adds up on heavy batch jobs. For those, prefer the native SDK in a script.

Installing the server

The package ships on npm as hubspot-mcp. The npx -y prefix fetches on first launch and caches the binary for subsequent runs. Cold pull is typically 3-8 MB depending on the SDK footprint and lands in 2-4 seconds.

Before touching editor config, get your credentials ready:

  1. Open your HubSpot account, navigate to Settings > Integrations > Private Apps
  2. Click Create a private app, name it claude-mcp-dev
  3. Under Scopes, tick crm.objects.contacts.read, crm.objects.deals.write, and any other scopes you need
  4. Click Create app and copy the access token; it starts with pat-na1- and shows only once

Keep the credential values out of any file you commit. The rest of this guide assumes they live in your shell profile or a .envrc managed by direnv.

Configuring for Claude Code

Claude Code reads MCP servers from ~/.claude/mcp.json or a per-project .mcp.json. Add a hubspot entry:

{
  "mcpServers": {
    "hubspot": {
      "command": "npx",
      "args": ["-y", "hubspot-mcp"],
      "env": {
        "HUBSPOT_ACCESS_TOKEN": "pat-na1-xxx"
      }
    }
  }
}

Restart Claude Code, then run /mcp in a session to confirm HubSpot is attached. Call a read-only tool as a smoke test before any write operations. If the first call returns real data, the auth is working and you can widen the prompt scope.

For team projects, commit a placeholder version of .mcp.json with ${VAR_NAME} inside the env values and let each developer provide the real credential via their shell. Claude Code expands env vars when it spawns the subprocess.

Configuring for Cursor

Cursor uses the same MCP spec and reads from ~/.cursor/mcp.json. The config is identical to Claude Code:

{
  "mcpServers": {
    "hubspot": {
      "command": "npx",
      "args": ["-y", "hubspot-mcp"],
      "env": {
        "HUBSPOT_ACCESS_TOKEN": "pat-na1-xxx"
      }
    }
  }
}

Open Cursor settings, navigate to the MCP tab, and toggle the server on. Cursor spawns the subprocess lazily on the first tool call. Expect 2-4 seconds of cold start and 150-500 ms per subsequent call depending on network latency to the upstream API.

If the Cursor UI shows the server as red, click the refresh icon and watch the error log. Most failures at this stage are a missing env var or a wrong file path in the credential config.

Example prompts and workflows

A few prompts that work reliably once the server is attached:

  • "Find every contact at acme.com and show their last activity date."
  • "Create a deal named Q3 expansion for the company with domain acme.com at stage Qualified."
  • "Log a note on contact id 12345 summarizing the call I just had."
  • "List all deals closing this month above $50k and group by owner."
  • "Update the lifecycle stage on contact jane@acme.com to customer."

The model will chain calls. A deal-update flow usually runs search_contacts, then get_deal, then update_deal with the new stage. Tell Claude the pipeline name up front if your account has more than one, otherwise it occasionally targets the default sales pipeline by mistake.

One pattern that saves calls: narrow the scope up front. Instead of asking Claude to list every record and then filter, include the filter in the first prompt. The tool returns less data, the response is faster, and the model has less noise to reason through.

Troubleshooting

Tool call returns 401. The access token is wrong or has been revoked. Regenerate in Settings > Private Apps and restart the MCP server.

Tool call returns 403. The private app is missing a scope. Open the app, add the required scope, and hit Save. The token stays the same but the scope set updates immediately.

Search returns empty on a contact you can see in the UI. Search API respects the hs_object_id and email fields only for direct matches. For partial matches, use the query parameter and wrap the term in * wildcards.

Rate limit errors. HubSpot caps at 100 requests per 10 seconds on most tiers. The server does not queue; batch where possible using batch_read tools instead of per-record calls.

Deal stage updates rejected. The stage ID must belong to the deal's pipeline. Run list_pipelines first and pass the exact stage ID from that pipeline, not a free-text label.

Server fails with ENOENT. npx is not on PATH in the env the editor inherits. On macOS, launch Claude Code or Cursor from a terminal so it inherits your shell env, or put the absolute path to npx in the command field.

Subprocess keeps restarting. The MCP transport is strict about newlines on stdio. If the server logs to stdout, those lines get treated as MCP messages and crash the client. Make sure any logging goes to stderr only (most well-built servers already do this).

Alternatives

A few options if the HubSpot server does not fit your setup:

  • salesforce-mcp covers the Salesforce CRM stack with a similar contact/deal/log surface.
  • pipedrive-mcp targets Pipedrive for teams that use its activity-based pipeline model.
  • attio-mcp works with Attio for teams on that modern CRM, with a lighter object graph.

The MCP server pays off when deal updates and contact research become part of longer Claude sessions - sales briefings, weekly pipeline reviews, or prep for a customer call.

Performance notes and hardening

Steady-state call latency lands in the 150-500 ms range for most tools. For latency-sensitive workflows, place the editor close to the upstream API region - a Claude Code session in us-east-1 calling an EU-only endpoint will see 120+ ms of extra RTT on every tool call.

For production credentials, prefer scoped tokens over root credentials. Most services expose fine-grained permission models; use them. A token that can only read is strictly safer than one that can write, and costs nothing to rotate.

Log review is easier if you redirect MCP subprocess stderr to a file. Most editors do this by default, but not all surface the log path. On macOS, check ~/Library/Logs/Claude/ or the Cursor equivalent.

The HubSpot MCP server is the right default for any workflow that already touches HubSpot regularly. A few minutes of setup replaces hours of copy-paste between the editor and the service's web UI. Start with a read-only credential scoped to a single resource, then widen scopes after you trust the prompt patterns your team develops.

Guides

Frequently asked questions

Does the server work on a HubSpot Free CRM account?

Yes. The private app framework is available on all tiers including the free CRM. Rate limits are lower on free accounts (100 req per 10 seconds is the common limit) and some enterprise-only object types are not reachable.

Can Claude send marketing emails through this server?

No. The current tools log emails to contact records but cannot dispatch new marketing or transactional email. Use the HubSpot web UI or the dedicated Marketing API with a separate integration for outbound email.

How does the server handle custom properties?

Custom contact, company, and deal properties are returned alongside standard ones. To filter on a custom property, pass its internal name (not the display label) in the search `filterGroups` payload.

Is the access token stored anywhere on disk?

The server holds the token in process memory only. Claude Code and Cursor both forward env vars to the subprocess without writing them to disk. Rotate the token every 90 days as a baseline.

Can I scope the token to a single pipeline or team?

Private apps are account-wide and cannot be scoped to a single pipeline. For stricter scoping, create a read-only app with only the scopes you need, and keep write scopes on a separate app used for automation.

What HubSpot object types are supported?

Contacts, companies, deals, tickets, and engagements (notes, calls, emails, meetings). Custom objects work for read and update if your account has them enabled and the token carries the matching custom-object scope.