HubSpot
When you finish this page, people in your workspace can connect their HubSpot user, and your agents and flows can call the tools of HubSpot's own MCP server as them: reading and changing the records their HubSpot user may, such as contacts, companies, deals and tickets. A tenant admin can connect the company's HubSpot user too, for runs that act for nobody, such as a shared schedule's. They connect through an MCP connector in your HubSpot account, which you register with Kindgi once. The tools come from HubSpot's server, which Kindgi registers as an MCP endpoint (Sign in as a connection).
Before you start
Section titled “Before you start”- You're an admin of the workspace.
- The runtime's public address is set (
KINDGI_PUBLIC_URL), and people reach the console there. This page writes it ashttps://kindgi.acme.com. - Kindgi 0.8.0 or later, the runtime and the CLI.
- A HubSpot account, and someone in it with the developer platform: HubSpot gives it to super admins by default, and anyone else needs a Developer seat, or the Developer tools access permission (HubSpot: Developer seats).
- The
kindgiCLI reaches your runtime as you, with the runtime's address exported asKINDGI_API_URLand your API key asKINDGI_API_TOKEN(People and keys). This page runs it in your pack's directory, aspnpm exec kindgi(Install).
1. Create the MCP connector at HubSpot
Section titled “1. Create the MCP connector at HubSpot”In your HubSpot account (HubSpot: Integrate AI tools with the HubSpot MCP server):
-
Development → MCP Connectors → Create MCP connector. HubSpot's earlier pages call it an MCP auth app.
-
Fill in:
-
Name: one people recognize when they connect.
-
Redirect URL: the console's connect page:
https://kindgi.acme.com/console/connect/callbackA runtime on your own machine at
http://localhost:18096sends people back tohttp://localhost:18096/console/connect/callback: HubSpot takeshttponlocalhost. A connector takes more than one redirect URL, and the first is its default. -
Description and Icon are optional.
Then choose Create.
-
-
Keep the Client ID and the Client secret from the connector's details page, where HubSpot takes you next.
There are no scopes to pick, and Kindgi's sign-in asks for none: HubSpot sets them from the tools its MCP server has when someone connects, and what they allow then. Whatever a tool does, it does as the HubSpot user who connected, with that user's permissions in HubSpot.
2. Store the client secret
Section titled “2. Store the client secret”The secret goes into Kindgi's secret store under a name, never into a registration or a chat:
pnpm exec kindgi secrets set ACME_HUBSPOT_CONNECT_SECRET --env=prod --scope=tenantACME_HUBSPOT_CONNECT_SECRETis the secret's name. The registration keeps only this name.--envis the env your runtime serves, itsKINDGI_ENV:prodhere, as on Kindgi Cloud.kindgi auth whoamiprints yours, in itsservedEnvfield (Three things called env).--scope=tenantstores the secret for the whole workspace.
The command asks for the value twice, and doesn't show what you type.
3. Register the connector with Kindgi
Section titled “3. Register the connector with Kindgi”In the console, open your workspace's App registrations page, choose Register an app, and pick HubSpot as the App:
- Client id: the connector's Client ID.
- Client secret: its name in Kindgi's secrets: the environment and name
you stored it under,
prod/ACME_HUBSPOT_CONNECT_SECRET. - Which projects' runs may use it: leave it empty for all of them.
Then choose Register. Kindgi shows the Redirect URI you entered in step 1.
Or register it from the command line:
pnpm exec kindgi connection-apps add hubspot --client-id=<client-id> --client-secret-ref=prod/ACME_HUBSPOT_CONNECT_SECRETThe command prints the registration as JSON, with the Redirect URI as its
redirectUrl. --projects=<project-id>,… lets only those projects' runs
use it.
4. Connect
Section titled “4. Connect”Each person connects their own HubSpot user. In a project, open Connections, choose Connect an app, pick HubSpot, and sign in to HubSpot. HubSpot asks which of their HubSpot accounts to connect, and what to allow, from what their HubSpot user may do. Or, from a terminal:
pnpm exec kindgi connections connect hubspot --permissions=mcp.toolsHubSpot has one permission, mcp.tools, and every connection holds it:
"Use HubSpot's tools as you: read and change the records your HubSpot user
may, as far as the connector allows".
Kindgi doesn't learn which HubSpot user or account connected. So the
connection is named HubSpot, unless the connect gives it a name
(--label), and each person has one HubSpot connection: connecting again
renews it, whichever HubSpot user signs in.
The company's connection is a tenant admin's to make. In a project,
open Connections, choose Connect an app, pick HubSpot, and under
For choose The company, or add --for-company to the command. Then
sign in to HubSpot as the user the company's runs act as: everything they
do in HubSpot shows as that user's. The company has one HubSpot connection
too.
HubSpot lets super admins require their approval before others connect an app, and see who has connected it, in HubSpot's settings under Integrations → Connected Apps (HubSpot: Manage access to apps).
5. Register HubSpot's MCP server
Section titled “5. Register HubSpot's MCP server”Once you've connected, register HubSpot's server at the runtime, so your agents and flows get its tools:
pnpm exec kindgi mcp add hubspot Registered "hubspot" (preset hubspot) at the runtime: it signs in as each person's own HubSpot connection. Its tools are listed with yours (3c7e1f90-…).Each call of its tools then uses the connection of the person the run acts for. An agent's call in a run they started waits for them to connect, if they haven't.
For the company's connection instead, which a shared schedule's or a
webhook's run can use too, a tenant admin connects it first (step 4), then
registers the server with --as=company:
pnpm exec kindgi mcp add hubspot --as=companyIts tools are named after the endpoint's id, such as
hubspot.get_user_details. To have both, give the second one an id of its
own, such as --server-name=hubspot-company. --scope=project:<project-id>
gives the tools to one project only
(Sign in as a connection).
Which tools HubSpot's server lists, and to whom, is HubSpot's to set: it
depends on the account's subscription, the user's permissions and the
account's settings.
Disconnecting
Section titled “Disconnecting”Connections → Disconnect destroys the stored token in your secret store (How connections work). Kindgi withdraws nothing at HubSpot, since HubSpot's MCP server has no way to give a token back: what the person allowed stays allowed until it's removed at HubSpot.
HubSpot's docs say a connected app is uninstalled in HubSpot's settings, under Integrations → Connected Apps, with Actions → Uninstall (HubSpot: Connect apps to HubSpot). A super admin can uninstall one person's from the app's Manage access page, or take back the app's approval, which uninstalls it for everyone who installed it (HubSpot: Manage access to apps).
When HubSpot ends access
Section titled “When HubSpot ends access”HubSpot sends Kindgi no notice, so Kindgi finds out the next time it renews
the token. The connection then needs reconnecting. A run its owner started
waits for them to connect again. In any other run, the call fails with
connection-missing, and the Connections page shows it. While the
connection the tools are listed with needs reconnecting, the endpoint keeps
the tools it last listed.
HubSpot's changelog says that when its server reaches new kinds of records, a connector may need connecting again before its tools reach them (HubSpot changelog). Connecting HubSpot again in Kindgi renews the connection with what the person allows then.