Configure the HubSpot MCP Server
Connect HubSpot's official hosted MCP server to a Dtwo gateway via OAuth.
On this page
Overview
HubSpot operates an official hosted MCP server at mcp.hubspot.com. Access is authorized through OAuth 2.0.
1. Configure HubSpot
- Log in to HubSpot with a super admin account.
- Click Development in the top navigation bar, then select MCP Auth Apps in the left sidebar. Click Create MCP auth app in the upper right, enter an app name and description, and set the Redirect URL to your Dtwo gateway’s OAuth callback endpoint — you can find it in the Overview tab of your gateway in the Dtwo UI. Click Create.
2. Add the MCP server to your gateway config
Go to your gateway in the Dtwo UI and open Configuration → Advanced. In the mcp_servers section add the following entry:
- name: hubspot
description: "HubSpot's official hosted MCP server for CRM objects."
url: https://mcp.hubspot.com/
transport_type: streamablehttp
authentication:
type: oauth
grant_type: authorization_code
scopes:
- oauth
client_id: "<CLIENT_ID>"
client_secret: "<CLIENT_SECRET>"
authorization_url: "https://app.hubspot.com/oauth/authorize"
token_url: "https://api.hubspot.com/oauth/v3/token"
redirect_uri: <CALLBACK_URL>
Replace the placeholder values:
<CLIENT_ID>and<CLIENT_SECRET>— come from the application you created in step 1.<CALLBACK_URL>— found in the Overview tab for the gateway in the Dtwo UI.
3. Deploy and verify
Save the configuration and deploy the gateway.
Then, in your AI client, ask it to authorize HubSpot via the gateway. This opens the HubSpot login screen — sign in as the admin whose permissions the agent should inherit, and approve the consent prompt. Once authorized, confirm the server’s tools appear and run a quick call to make sure the connection works.
If the tools don’t appear after you authorize, refresh the tool list in your AI client — some clients don’t pick it up automatically.