Receber por email
← Voltar para o catálogo

HubSpot API Patterns

Use this skill when working with the HubSpot MCP tools - available tools, OAuth 2.0 + PKCE authentication, scopes, Streamable HTTP transport, rate limiting, error handling, and best practices. Covers the official remote MCP server connection and all HubSpot CRM MCP tools.

31estrelas
Atualizado há 4 meses

Ver no GitHub ↗ Licença: Apache-2.0

Como adicionar

/plugin marketplace add wyre-technology/msp-claude-plugins

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/hubspot-api-patterns/svg)](https://www.skillteca.com.br/skills/hubspot-api-patterns)

Skills relacionadas

Ver todas de Documentos →

Alerta por categoria

Receba novas skills de Documentos toda segunda

1 email curto, só com as skills novas de Documentos. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

HubSpot MCP Tools & API Patterns

Overview

HubSpot provides a first-party remote MCP server at https://mcp.hubspot.com/ for AI tool integration. The MCP server uses OAuth 2.0 with PKCE for authentication and Streamable HTTP as its transport protocol. Tools are backed by the HubSpot CRM Search API and cover contacts, companies, deals, tickets, tasks, notes, and associations. This skill covers MCP server connection, the complete tool reference, search patterns, error handling, and best practices.

Connection & Authentication

MCP Server

HubSpot hosts an official remote MCP server. Authentication uses OAuth 2.0 with PKCE, handled by the mcp-remote bridge:

  1. Go to developers.hubspot.com
  2. Navigate to Development > MCP Auth Apps
  3. Create a new MCP Auth App
  4. Copy the Client ID and Client Secret

MCP Server URL: https://mcp.hubspot.com/

Transport: Streamable HTTP

Authentication: OAuth 2.0 + PKCE (handled automatically by mcp-remote)

Environment Variables

export HUBSPOT_CLIENT_ID="your-client-id"
export HUBSPOT_CLIENT_SECRET="your-client-secret"

Claude Desktop Configuration

{
  "mcpServers": {
    "hubspot": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote",
        "https://mcp.hubspot.com/"
      ],
      "env": {
        "HUBSPOT_CLIENT_ID": "YOUR_CLIENT_ID",
        "HUBSPOT_CLIENT_SECRET": "YOUR_CLIENT_SECRET"
      }
    }
  }
}

Scopes

HubSpot MCP automatically derives required OAuth scopes from the tools you use. You do not need to manually configure scopes. For example:

  • Using contact tools automatically requests crm.objects.contacts.read and crm.objects.contacts.write
  • Using deal tools automatically requests crm.objects.deals.read and crm.objects.deals.write
  • Using association tools automatically requests the appropriate association scopes

Sensitive Data

HubSpot MCP excludes sensitive data properties (PHI -- Protected Health Information) from tool responses by default. Properties marked as sensitive in HubSpot settings will not appear in MCP tool results.

Complete MCP Tool Reference

Contact Tools

| Tool | Description | Key Parameters | |------|-------------|----------------| | hubspot_retrieve_contact | Get a single contact by ID | contactId (required) | | hubspot_create_contact | Create a new contact | email (required), firstname, lastname, phone, company | | hubspot_update_contact | Update an existing contact | contactId (required), property fields to update | | hubspot_list_contacts | List contacts with pagination | limit, after (cursor) | | hubspot_list_contact_properties | List all contact properties | None | | hubspot_search_contacts | Search contacts by criteria | filterGroups, sorts, limit, after |

Company Tools

| Tool | Description | Key Parameters | |------|-------------|----------------| | hubspot_retrieve_company | Get a single company by ID | companyId (required) | | hubspot_create_company | Create a new company | name (required), domain, industry, phone | | hubspot_update_company | Update an existing company | companyId (required), property fields to update | | hubspot_list_company_properties | List all company properties | None | | hubspot_search_companies | Search companies by criteria | filterGroups, sorts, limit, after |

Deal Tools

| Tool | Description | Key Parameters | |------|-------------|----------------| | hubspot_retrieve_deal | Get a single deal by ID | dealId (required) | | hubspot_create_deal | Create a new deal | dealname (required), amount, dealstage, pipeline | | hubspot_update_deal | Update an existing deal | dealId (required), property fields to update | | hubspot_list_deal_properties | List all deal properties | None | | hubspot_search_deals | Search deals by criteria | filterGroups, sorts, limit, after |

Ticket Tools

| Tool | Description | Key Parameters | |------|-------------|----------------| | hubspot_retrieve_ticket | Get a single ticket by ID | ticketId (required) | | hubspot_create_ticket | Create a new ticket | subject (required), content, hs_pipeline, hs_pipeline_stage | | hubspot_update_ticket | Update an existing ticket | ticketId (required), property fields to update |

Activity Tools

| Tool | Description | Key Parameters | |------|-------------|----------------| | hubspot_create_task | Create a task | hs_task_subject (required), hs_task_body, hs_task_priority, hs_timestamp | | hubspot_create_note | Create a note | hs_note_body (required), hs_timestamp |

Utility Tools

| Tool | Description | Key Parameters | |------|-------------|----------------| | hubspot_open_hubspot_ui | Open HubSpot UI for an object | objectType, objectId | | hubspot_get_user_details | Get details of the current user | None |

Association Tools

| Tool | Description | Key Parameters | |------|-------------|----------------| | hubspot_create_association | Create an association between objects | fromObjectType, fromObjectId, toObjectType, toObjectId, associationType | | hubspot_access_associations | List associations for an object | objectType, objectId, toObjectType |

CRM Search API

Search Patterns

HubSpot MCP tools that search records use the CRM Search API under the hood. Search tools accept filterGroups for structured queries:

Filter Group Structure:

{
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "email",
          "operator": "CONTAINS_TOKEN",
          "value": "acme.com"
        }
      ]
    }
  ]
}

Available Operators

| Operator | Description | Example | |----------|-------------|---------| | EQ | Equals | {"propertyName": "lifecyclestage", "operator": "EQ", "value": "customer"} | | NEQ | Not equals | {"propertyName": "lifecyclestage", "operator": "NEQ", "value": "subscriber"} | | LT | Less than | {"propertyName": "amount", "operator": "LT", "value": "1000"} | | LTE | Less than or equal | {"propertyName": "amount", "operator": "LTE", "value": "5000"} | | GT | Greater than | {"propertyName": "amount", "operator": "GT", "value": "10000"} | | GTE | Greater than or equal | {"propertyName": "createdate", "operator": "GTE", "value": "2026-01-01"} | | CONTAINS_TOKEN | Contains token (word match) | {"propertyName": "email", "operator": "CONTAINS_TOKEN", "value": "acme"} | | NOT_CONTAINS_TOKEN | Does not contain token | {"propertyName": "email", "operator": "NOT_CONTAINS_TOKEN", "value": "test"} | | HAS_PROPERTY | Property has a value | {"propertyName": "phone", "operator": "HAS_PROPERTY"} | | NOT_HAS_PROPERTY | Property has no value | {"propertyName": "phone", "operator": "NOT_HAS_PROPERTY"} | | IN | Value in list | {"propertyName": "dealstage", "operator": "IN", "values": ["stage1", "stage2"]} | | NOT_IN | Value not in list | {"propertyName": "dealstage", "operator": "NOT_IN", "values": ["closedlost"]} | | BETWEEN | Between two values | {"propertyName": "amount", "operator": "BETWEEN", "value": "1000", "highValue": "5000"} |

Sorting

{
  "sorts": [
    {
      "propertyName": "createdate",
      "direction": "DESCENDING"
    }
  ]
}

Sort Directions: ASCENDING, DESCENDING

Pagination

Search results use cursor-based pagination:

| Parameter | Description | Default | Max | |-----------|-------------|---------|-----| | limit | Results per page | 10 | 100 | | after | Cursor for next page | None | - |

Iterating through all results:

  1. Call the search tool with limit=100
  2. Check the response for a paging.next.after value
  3. If present, call again with after set to that value
  4. Repeat until no paging.next.after is returned

Response Format

Single Resource:

{
  "id": "12345",
  "propertie
Compartilhar X LinkedIn