Connector guide5-minute read14 MCP tools7 languages

How to Connect HubSpot to Gemini via MCP

Let your AI work in HubSpot CRM: search and update contacts, companies, deals and tickets, see who is linked to what, check pipelines and owners, and log notes and tasks. One account, through a service key you create yourself.

HCBy HelpCode teamUpdated 5 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

HubSpot

HubSpot

Let your AI work in HubSpot CRM: search and update contacts, companies, deals and tickets, see who is linked to what, check pipelines and owners, and log notes and tasks. One account, through a service key you create yourself.

tools

14

Region

INTL

Category

CRM

Authentication

Bearer Token

Required env vars

HUBSPOT_ACCESS_TOKEN
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the HubSpot in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

Summary

Let your AI work in HubSpot CRM: search and update contacts, companies, deals and tickets, see who is linked to what, check pipelines and owners, and log notes and tasks. One account, through a service key you create yourself.

Try asking

Example prompts for HubSpot

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

HubSpot · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → HubSpot, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

HubSpot + Gemini

Let your AI work in HubSpot CRM: search and update contacts, companies, deals and tickets, see who is linked to what, check pipelines and owners, and log notes and tasks. One account, through a service key you create yourself.

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

HUBSPOT_ACCESS_TOKEN

Step 1 — Get credentials

  1. In HubSpot, open Development in the left sidebar, then Keys → Service keys, and click Create service key. You need to be a super admin or a user with Developer tools access.
  2. Name the key (for example "AnythingMCP"), click Add new scope, tick the scopes listed below, then click Update and Create.
  3. Open the key, click Show, then Copy. Service keys start with pat- (for example pat-eu1-...).
  4. Paste the key into HUBSPOT_ACCESS_TOKEN, without the word Bearer, then install the connector.
  5. Start with hubspot_get_account: it shows which HubSpot account (Hub ID) the key belongs to, its time zone and its currency.

Legacy private apps: older accounts may still have a private app (Development → Legacy apps, previously Settings → Integrations → Private Apps). Its access token works the same way: paste it into HUBSPOT_ACCESS_TOKEN.

Scopes:

  • Read: crm.objects.contacts.read (also covers notes and tasks), crm.objects.companies.read, crm.objects.deals.read, crm.objects.tickets.read, crm.objects.owners.read.
  • Write: crm.objects.contacts.write (also needed for notes and tasks), crm.objects.companies.write, crm.objects.deals.write, crm.objects.tickets.write.

Read-only setup: give the key only the read scopes and disable hubspot_create_object, hubspot_update_object, hubspot_associate_records, hubspot_create_note and hubspot_create_task.

Switched off at install: hubspot_archive_object. Turn it on only if the AI should delete records. Archived records go to HubSpot's recycling bin and can be restored there for 90 days.

Data privacy settings: if data privacy (GDPR) is turned on in your HubSpot account, HubSpot requires a legal basis for processing, the property hs_legal_basis, on every new contact. Tell the AI which legal basis to use when it creates contacts; without it HubSpot answers "The following required properties were missing".

Limits: HubSpot allows 100 requests per 10 seconds per key on Free and Starter (more on Professional and Enterprise), 250,000 requests a day per account and 5 searches per second. Over a limit HubSpot answers 429: wait a few seconds and try again.

Common errors: 401 means the key is wrong, expired or was rotated: copy it again. 403 names the missing scope: add it to the key under Edit. 404 means a wrong id or object type. 400 VALIDATION_ERROR names the property or filter that is wrong, for example an unknown property name or a dropdown value that is not one of its options.

The connector does not handle marketing emails, forms, lists, workflows, files, quotes and line item pricing, merges or batch writes.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in Gemini

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

Gemini CLI reads MCP servers from ~/.gemini/settings.json (on Windows %USERPROFILE%\.gemini\settings.json). Add:

{
  "mcpServers": {
    "anythingmcp": {
      "httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of YOUR_MCP_API_KEY.
  2. Save the file and restart gemini.
  3. Run /mcp inside Gemini CLI (or gemini mcp list in your shell): anythingmcp should show as connected.
  4. Start prompting: Gemini CLI can now call the HubSpot tools.

Available tools

ToolWhat it does
hubspot_list_ownersList the HubSpot users who can own records (owners): owner id, user id, email, first and last name, teams and whether archived
hubspot_get_accountGet the HubSpot account the token belongs to: portal id (Hub ID), account type, time zone and UTC offset, company currency and additional…
hubspot_search_objectsSearch CRM records of one object type (contacts, companies, deals, tickets, notes, tasks, ...) by free text and/or property filters, with…
hubspot_list_objectsList CRM records of one object type page by page, oldest id first, with the chosen properties and optionally the ids of associated records
hubspot_get_objectGet one CRM record by id (or by a unique property such as a contact's email with id_property), with the chosen properties, optional…
hubspot_create_objectCreate a CRM record (contact, company, deal, ticket, ...) with property values, optionally associated with existing records
hubspot_update_objectChange property values of one CRM record; only the given properties change, and an empty string clears a value
hubspot_archive_objectArchive (delete) one CRM record: it moves to the recycling bin, where it can be restored for 90 days
hubspot_get_associationsList the records of one type associated with a record, with their association types and labels, e.g. all deals of a company or all contacts…
hubspot_associate_recordsLink two existing records with HubSpot's default (unlabeled) association, e.g. a contact to a company or a deal to a contact
hubspot_list_pipelinesList the pipelines of deals or tickets with their stages: pipeline id and label, and per stage its id, label, display order and metadata…
hubspot_list_propertiesList the properties of an object type, default and custom: internal name, label, type, field type, group, description, whether read-only…
hubspot_create_noteAdd a note to the CRM timeline, associated with contacts, companies, deals or tickets
hubspot_create_taskCreate a task (to-do, call or email reminder) with a due date, optionally assigned to an owner and associated with records

Example prompts

  • "Which deals in the sales pipeline are expected to close this month, and who owns them?"
  • "Find the contact [email protected] and show me her company and her open deals."
  • "Move the Acme Corp deal to the next stage and add a note with a summary of today's call."
  • "Create a follow-up task for me on the Globex deal, due next Friday."

FAQ

Where does Gemini CLI look for MCP servers? In ~/.gemini/settings.json for your user, or in .gemini/settings.json inside a project. gemini mcp list shows each server and whether it connects.

Next steps

Was this guide helpful?

Your HubSpot agent is one click away.

Install the connector, paste the key, prompt Gemini. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect HubSpot to ChatGPT via MCP

Let your AI work in HubSpot CRM: search and update contacts, companies, deals and tickets, see who is linked to what, check pipelines and owners, and log notes and tasks. One account, through a service key you create yourself.

Connectors

How to Connect HubSpot to Claude via MCP

Let your AI work in HubSpot CRM: search and update contacts, companies, deals and tickets, see who is linked to what, check pipelines and owners, and log notes and tasks. One account, through a service key you create yourself.

Connectors

How to Connect HubSpot to Cursor via MCP

Let your AI work in HubSpot CRM: search and update contacts, companies, deals and tickets, see who is linked to what, check pipelines and owners, and log notes and tasks. One account, through a service key you create yourself.

Connectors

How to Connect HubSpot to Meta Muse via MCP

Let your AI work in HubSpot CRM: search and update contacts, companies, deals and tickets, see who is linked to what, check pipelines and owners, and log notes and tasks. One account, through a service key you create yourself.

Connectors

HubSpot to MCP: Drive HubSpot from any AI Agent

Let your AI work in HubSpot CRM: search and update contacts, companies, deals and tickets, see who is linked to what, check pipelines and owners, and log notes and tasks. One account, through a service key you create yourself.

Connectors

How to Connect Kommo to Gemini via MCP

Let your AI work in Kommo CRM: find and update leads across pipelines, look up contacts and companies, follow tasks and notes, and log new tasks and notes. One account, with a long-lived token from a private integration.