The HubSpot connector exposes a HubSpot portal through the HubSpot REST API to Agent Factory agents (through MCP) and to Builder automations (through the Hubspot.op: App instructions), covering the CRM (contacts, companies, deals, tickets, engagements, associations, pipelines, properties, owners, lists) and the Marketing layer (forms, marketing emails, workflows, files). The ~120 HubSpot operations are grouped into 18 entity tools, each driven by an action argument. The MCP server runs in the tenant app-instance context: it resolves the installing workspace’s own credentials and authorizes the calling agent against that workspace’s allowlist. Authentication supports several modes:
- Per-user OAuth2, central client (
oauthCentral, recommended): one HubSpot OAuth application is registered once by the platform maintainer; every end user signs in with their own HubSpot portal. Nothing to register per workspace: each one just installs the app and clicks Connect. - Per-user OAuth2, tenant client (
oauth): paste your own HubSpot OAuth client ID/secret in the connector config app. Each user signs in with their own account against your client (authorization-code + PKCE flow). - Private App token (
accessToken): a caller-managed HubSpot Private App access token (PAT), used as-is with no exchange. Best for service-account / non-interactive automations where a single identity is preferable.
CRM Records
Engagements & Marketing
Per-user auth
Who is this for?
This connector is used by three different roles. Jump to the section that matches yours; each one is self-contained.Agent builder
Platform admin
Workspace builder
Prerequisites
- A HubSpot account with access to the portal you want to expose.
- For the OAuth modes: a HubSpot OAuth application. HubSpot’s Developer Platform 2025.2 retired the legacy Public Apps UI: the OAuth app is now declared as code in a HubSpot project and deployed via the HubSpot CLI (from a free HubSpot developer account at developers.hubspot.com, separate from any CRM account). The platform maintainer registers one app for the central mode; a workspace can also register its own for the tenant mode. Copy the Client ID and Client Secret from the deployed app’s Auth tab.
- For the Private App token mode: a Private App access token created at HubSpot Settings → Integrations → Private Apps (
https://app.hubspot.com/private-apps/<portal-id>), with the scopes covering the operations you intend to call. - OAuth scopes: the connector requests the free-tier essentials by default (
oauth,crm.objects.contacts.*,crm.objects.companies.*,crm.objects.deals.*,crm.objects.owners.read,tickets). Paid-tier features (lists, content, automation, forms, files) require their own scopes and a matching HubSpot subscription; every requested scope must be declared in the deployed app’srequiredScopes/optionalScopes. - Base URL:
https://api.hubapi.com(single host).
Platform admin (Governance): one-time platform setup
Platform admin (Governance): one-time platform setup
<api-url> is your environment’s API URL (https://api.studio.prisme.ai/v2 on production).1. Configure the connector
Register the OAuth application at HubSpot
npm install -g @hubspot/cli@latest), then deploy the OAuth app project. The hubspot workspace ships ready-to-deploy projects under workspaces/hubspot/project/ (one per environment); each app-hsmeta.json declares the redirect URI, required and optional scopes. Set the single Authorized redirect URI to the core workspace callback:https://api.studio.prisme.ai/v2/workspaces/slug:hubspot/webhooks/oauthCallback on production). Deploy with hs project upload && hs project deploy, allowlist the portals (numeric Hub IDs) that may install the app, then copy the Client ID and Client Secret from the app’s Auth tab (the secret is shown only once).Enter the credentials through the configuration app
hubspot workspace and launch its Configuration app: <studio>/apps/hubspot (e.g. https://studio.prisme.ai/apps/hubspot). Loaded from the core workspace, the app shows the maintainer view (org owner / editor / admin only); paste the Client ID and Client Secret there and Save; the app stores them in the core workspace’s secrets for you. Do not edit Studio’s raw Secrets by hand. These credentials stay in the hubspot workspace and are never exposed to tenants or end users; token exchange is proxied through the core centralTokenExchange webhook so the client secret never leaves the core workspace.Tell workspaces to use the central client
oauthCentral in the connector configuration app (no client id/secret to enter on their side). Their users then just click Connect.(Optional) Publish to the Capabilities catalog
2. Declare the capability in AI Governance
As an alternative to (or in addition to) the catalog button, you can declare HubSpot as a named capability in AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint.Open AI Governance > Capabilities
Point it at the MCP endpoint
agent_id in the scope is what lets the connector identify and authorize the calling agent.Make it available to agent builders
Smoke-test
oauthCentral, trigger any tool (e.g. contacts with action: "list"). The user is prompted to connect once (HubSpot sign-in, pick a portal); subsequent calls reuse the stored token transparently and refresh it automatically.scope= and optional scopes in optional_scope=, and every requested scope must already be declared in the HubSpot app’s requiredScopes or optionalScopes. Putting an optional-tier scope (Marketing Hub Pro+, CMS Hub, etc.) into scope= triggers a “domain mismatch” rejection. The shipped app-hsmeta.json keeps requiredScopes to the free-tier essentials; paid-tier scopes sit in optionalScopes. To add a scope, edit app-hsmeta.json for each environment and re-run hs project upload && hs project deploy.- Agent builder (Agent Factory)
- Workspace builder (DSUL)
Agent builder
Goal: let an agent you build in Agent Factory use HubSpot through MCP tools.agent_id that Agent Factory injects through the capability Scope, and that agent must appear in the connector’s authorized-agents allowlist (managed in the configuration app). The HubSpot access token itself is resolved server-side from the configured auth mode.There are two ways to wire it up. Pick based on how much isolation you need.Option A: Enable the shared capability from the catalog
The fastest path: a Platform admin has already published a HubSpot capability to the Capabilities catalog (see the Platform admin setup accordion above: the Add to catalog button, or §2), so you just pick it from the catalog.Open your agent in Agent Factory
Add the HubSpot capability
context_id,agent_id,user_id) are already wired by the admin; nothing to paste, and the shared instance accepts every agent, so there is no allowlist step on your side.Connect a HubSpot account
connect_url to HubSpot’s authorization page, where the user picks the portal to authorize (from the allowlisted set) and reviews the requested scopes. After sign-in the per-user token is stored and reused on subsequent calls.Option B: Run it from your own workspace (recommended)
For production agents, install the connector in your own workspace and point the agent at that workspace’s MCP endpoint.Install and configure the connector in your workspace
Allowlist your agent
Add the MCP capability to your agent
agent_id is what lets the connector identify and authorize your agent; without it, every call is rejected with an explicit “agent could not be identified” message. This Scope is separate from the HubSpot OAuth scopes.Connect a HubSpot account
Brief the agent in its system prompt
Whichever option you pick, wiring the capability is not enough: the agent must know the connector exists and when to reach for it. Add a short paragraph to the agent’s system prompt. Copy-pasteable starter:agent_id.*.write scope, e.g.:oauthCentral) you do not create your own HubSpot app; keep oauthCentral and enter the read scopes; your tenant scope overrides the platform default (the central app must list these read scopes). Write calls are then rejected by HubSpot with 403. The scope is set at the workspace level (a workspace editor can widen it again).Available Tools
The MCP server exposes 18 entity-level tools, each with anaction argument to select the operation. Every tool accepts an outputFormat parameter (see Output Formats).contacts / companies / deals
These three CRM tools share the same set of actions.tickets
Same actions as the CRM trio above, minus merge.associations
notes / tasks / calls / engagementEmails / meetings
All five engagement tools share the same actions.pipelines
properties
owners
lists
forms
marketingEmails
workflows
files
Output Formats
Every tool accepts anoutputFormat parameter that controls the MCP response shape:verbose(default): human-readable text for LLM consumptionstructured: machine-readable JSON instructuredContentboth: both text and structured content
Tool Details
contacts (action: search)
deals (action: create)
lists (action: addMembers)
marketingEmails (action: sendTransactional)
workflows (action: enrollContact)
Error Handling
Common Issues
“This agent is not authorized to use this connector”: The calling agent is not in the allowlist. Open the configuration app → Authorized agents → tick this agent (id is shown in the error) or enable Allow all agents, and Save. The Install capability button does this for you. “The calling agent could not be identified”: The MCP capability Scope does not declareagent_id, so Agent Factory never injects the agent identity. Set the Scope to context_id,agent_id,user_id on the capability (this is separate from the HubSpot OAuth scopes), then allow the agent in the config app.
“HubSpot is not connected for this user”: No per-user OAuth token is stored for the caller. Open the configuration app (OAuth mode) and click Connect, or use the agent’s connect flow.
“HubSpot token refresh failed … must reconnect”: The stored refresh token was rejected by HubSpot (revoked, or expired after ~6 months idle). The connection is dropped automatically; the user must reconnect from the config app.
“HubSpot OAuth is not configured”: Neither a tenant OAuth client nor the central platform client is available. Set the OAuth client ID/secret in the config app (tenant mode), or ask the platform maintainer to provision the central OAuth client from the core workspace’s config app.
invalid_scope / “domain mismatch” during the OAuth dance: The OAuth URL requests a scope the deployed HubSpot app does not declare. Every requested scope must appear in requiredScopes or optionalScopes of app-hsmeta.json; re-run hs project upload && hs project deploy after editing.
OBJECT_ALREADY_EXISTS on contact create: A contact with the same email already exists. Either update the existing contact (use email as idProperty) or query first with search.
Lists API: cannot add members to a dynamic list: Only static / MANUAL lists accept addMembers and removeMembers. Dynamic lists are driven by their filter criteria.
No token revocation: HubSpot exposes no RFC 7009 revocation endpoint, so disconnecting deletes the platform-stored tokens rather than revoking them at HubSpot; refresh tokens may stay valid until they naturally expire (typically 6 months idle).