Set up HubSpot (New setup)
Connect HubSpot's Model Context Protocol (MCP) server for live fetch and tools, then configure a separate private app to index CRM records for search.
This guide follows Connect, Set up indexing, and Review setup. The two connections use different credentials:
| Connection | Credentials | Purpose |
|---|---|---|
| MCP tools | MCP connector client ID and client secret | Let each user authorize live access with their own HubSpot account |
| Indexing | HubSpot account ID, private app access token, and private app client secret | Crawl CRM records and permission data, and validate webhook payloads |
Prerequisites
Before you begin:
- Have an active HubSpot account.
- Have access to the Glean Admin console with permission to configure connectors and tools.
- Have HubSpot super admin access to create the private app for indexing. See the HubSpot user permissions guide.
Create the MCP connector and private app during the steps below. You need the callback and webhook URLs that Glean provides during setup.
Connect HubSpot's MCP server
The Connect step configures live fetch and tools. It does not provide the credentials Glean needs for indexing.
Copy the callback URL from Glean
- In the Glean Admin console, go to Connectors, click Add connector, and select HubSpot.
- On Connect, enter a name for the connector.
- Under MCP connector setup, copy the Callback URL.
Create an MCP connector in HubSpot
- In HubSpot's main navigation, click Development.
- In the left sidebar, click MCP Connectors.
- Click Create MCP connector.
- Enter a name, such as
Glean HubSpot MCP, and an optional description. - In Redirect URL, paste the exact Callback URL from Glean.
- Click Create.
- On the connector details page, copy the Client ID and Client secret.
You do not select scopes when creating the MCP connector. HubSpot determines available access from its MCP tools, the permissions the user grants during authorization, and that user's HubSpot permissions. See HubSpot's MCP documentation.
Authorize the connection
- Return to Glean and enter the MCP connector's Client ID and Client secret.
- Click Connect and complete HubSpot authorization.
- Continue to Set up indexing.
Set up indexing
Glean requires a separate private app for indexing. Do not use the MCP connector's client secret for this step.
On Set up indexing in Glean, copy the Webhook URL. You will use it when configuring the private app.
Create a private app
- In HubSpot, click the settings icon in the main navigation bar.
- Go to Integrations → Legacy Apps.
- Click Create, then select Private App.
- On Basic Info, enter a name, such as
Glean. You can also add a logo and description.
Grant read scopes
- Click Scopes, then Add new scope.
- Select these scopes:
crm.objects.users.readcrm.objects.owners.readcrm.objects.contacts.readcrm.objects.deals.readcrm.objects.companies.readcrm.objects.tickets.readcrm.schemas.tickets.read
- Click Update.
Existing private apps can keep the legacy tickets scope instead of the two granular ticket read scopes. Glean accepts either form. You do not need both. The other scopes listed above are still required.
Configure webhooks
- In the private app, click Webhooks.
- In Target URL, paste the Webhook URL from Glean's Set up indexing step.
- Click Create subscription.
- Under Which object types, select Contact, Company, Deal, and Ticket.
- Under Listen for which events, select Created, Deleted, Restored, and Association changed.
- Click Subscribe, then Create app.
Enter indexing credentials in Glean
- In HubSpot, click the profile icon and copy the Account ID shown under the account name.
- On the private app's Auth tab, copy its Access token and Client secret.
- In Glean's Set up indexing step, enter the matching values in Account ID, Access token, and Client secret.
- Click Continue.
The private app's client secret is separate from the MCP connector's client secret. Glean uses the private app's secret to validate webhook payloads.
Review setup and begin indexing
- On Review setup, review the connection. If User access appears, choose All users, Test group only, or None for access to indexed HubSpot content in Glean. This setting does not grant additional HubSpot permissions.
- Click Begin indexing to start the crawl.
If Skip for now appears, you can defer the crawl and start it later from the connector. This does not skip the private-app configuration or make indexing setup optional.
Review tool access
Open the connector's Tools tab to review available tools and their access settings. Enable only the tools your users need. Each user must authorize their own HubSpot account to use MCP tools. This authorization is separate from indexed search.
HubSpot limits tool access according to the user's permissions, account configuration, and subscription. The tools available through MCP can differ from the objects Glean indexes. See HubSpot overview.
Verify the connection
Check indexing and MCP separately:
- After indexing completes, search for a HubSpot contact, company, deal, or ticket that the test user can access.
- Confirm that indexed results reflect the user's HubSpot permissions.
- Authorize a user's HubSpot account and run an enabled read tool. Check the tool result to confirm that a live MCP call succeeded. An answer based on indexed content does not prove that MCP worked.
- Confirm that the private app's webhook target matches the URL shown in Glean and that the required subscriptions are active.
Troubleshooting
- If MCP authorization fails, confirm that you entered the MCP connector's credentials, not the private app's credentials. Check that its Redirect URL exactly matches the Callback URL in Glean.
- If indexing authentication fails, check the HubSpot account ID, private app access token, and required read scopes.
- If webhook updates fail, check the target URL, subscriptions, and private app client secret.
For connector validation errors, see HubSpot error codes.