Prerequisites
To get started with MCP server components, you’ll need:- A HubSpot account. MCP server components are in public beta and don’t require separate enrollment. Once you’ve set up your account, you can also create a test account in HubSpot or with the CLI to test your server in a separate environment.
- The HubSpot CLI installed and authenticated with your HubSpot account.
- A HubSpot app that’s configured for private or Marketplace distribution. If you’re planning to distribute to the HubSpot Marketplace, the app must be a new standalone app, not an existing Marketplace-listed app.
- The project’s
hsproject.jsonfile must be configured to use the latest beta platform version (2027.03-betaor newer). - The app’s scopes must include
oauthat a minimum, even if your MCP server does not read HubSpot data.
- The project’s
- A functioning MCP server that’s deployed and accessible via a public URL. Note that HubSpot’s authorization flow does not support Dynamic Client Registration (DCR). You will need to generate a valid client ID for customers to connect to your MCP server, and this is a required field in the component schema.
Marketplace distribution
If you plan to distribute an MCP server through the HubSpot Marketplace, add the component to a new standalone app and submit the app with its own Marketplace listing. Do not add the component to an existing Marketplace-listed app. Marketplace-distributed apps with MCP server components must complete Ecosystem review and approval before installed customers can access the server. You can use feature flags to test the component with up to five installed accounts before approval. Learn more about distribution and feature flags.Integration overview
At a high level, integrating with MCP server components involves:- Updating your project to
2027.03-beta: update your app and project to the2027.03-betaplatform version before adding an MCP server component. - Defining the server: in your HubSpot project, add an MCP server component and configure it with your MCP server’s connection details.
- Implementing OAuth: ensure your server implements the OAuth endpoint requirements, including discovery, PKCE support, and the fixed redirect URI.
- Deploying to HubSpot: upload your project to your HubSpot account using the HubSpot CLI.
- Installing the app: install the app into a target HubSpot account.
- Testing the connection: test the connection to the MCP server from your HubSpot account.
- Distribution and feature flags: for marketplace-distributed apps, enable testing for selected installed accounts and complete Ecosystem review before broader release.
- Testing your server: verify your MCP tools in your app’s settings, then test them in the agent builder and Breeze Assistant.
Update your project to 2027.03-beta
Before adding an MCP server component, update your project’splatformVersion to 2027.03-beta. This setting is defined in the hsproject.json file in the project directory. The hsproject.json file is located at the project root.
project
hsproject.json
src
Define an MCP server component
To define an MCP server component, you must create a*-hsmeta.json file within the mcp-server directory within app/. This file will contain your MCP server configuration options.
project
src
app
app-hsmeta.json
mcp-server
main-server-hsmeta.json
*-hsmeta.json).
hs project upload command.
MCP server OAuth requirements
HubSpot connects to your MCP server using an OAuth 2.1 authorization code flow with PKCE. HubSpot’s backend initiates and coordinates this flow: it fetches OAuth metadata and exchanges the authorization code for tokens server-side. However, the authorization step where the user grants access happens through their browser, which is redirected to your MCP server’s authorization endpoint.Required endpoints
Your MCP server must implement the following endpoints, per the MCP authorization specification and RFC 8414.Authorization
HubSpot redirects to your server’s authorization endpoint using PKCE with the S256 challenge method. Your authorization endpoint must support the following:- Client ID: HubSpot passes the
mcpClientIdfrom your component schema as theclient_idparameter throughout the flow. Your server must recognize this value. - PKCE (S256): HubSpot includes
code_challengeandcode_challenge_method=S256parameters in the authorization request. - Fixed redirect URI: HubSpot always uses
https://oauth-redirect.hubspot.com/callback/mcp_serveras the redirect URI. Your OAuth server must be configured to accept this URI. - Scopes: if your configuration includes
requiredScopes, these scopes will be associated with the connection. Your authorization endpoint should grant the requested scopes and your token endpoint should include them in the access token response.
Token exchange
After the user authorizes, HubSpot’s backend exchanges the authorization code for tokens by sending aPOST request to your token endpoint. This request includes the PKCE code_verifier for validation. Because this exchange happens server-side, your token endpoint must be publicly reachable.
HubSpot currently requires the authorization code exchange to return both an access token and a refresh token. Your authorization server must also support the refresh_token grant so HubSpot can obtain a new access token after the current one expires.
Refresh tokens and offline_access
The refresh token requirement is specific to HubSpot’s MCP OAuth client. OAuth 2.1 allows the authorization server to decide whether to issue refresh tokens, and the MCP authorization specification states that clients must not assume they will receive one.
Some authorization servers use the optional OpenID Connect offline_access scope to request a refresh token. Other authorization servers issue refresh tokens without this scope or may reject or ignore it. HubSpot does not automatically add offline_access to the authorization request.
Add offline_access to requiredScopes only when your authorization provider requires or accepts it. For example:
offline_access in scopes_supported, you can use that as a signal that the server supports the scope. Its absence does not necessarily mean the scope is unsupported, so confirm the expected configuration in your provider’s documentation and verify that the token response includes a refresh token.
Example metadata response
Below is an example of the JSON your/.well-known/oauth-authorization-server endpoint should return:
Install the app
With your project deployed, you can install the app into a target HubSpot account. To do this, you’ll navigate into HubSpot to get the install URL, along with the app’s client ID and secret for your OAuth server. For private distribution, use the privately distributed OAuth app install flow. For Marketplace distribution, use the OAuth marketplace app install flow.- To open the project in HubSpot from the terminal, run
hs project openfrom within the project directory. - From the project page, navigate to the App in the left sidebar.
- Click the Distribution tab.
- Click Copy install link, then paste it into your browser to install the app into the desired target account.
- To get your app’s client ID and secret for your OAuth server, click the Auth tab, then copy the Client ID and Client secret values.
Test the connection in HubSpot
Once the app is installed, test the connection to the MCP server from your HubSpot account:- In the account where you uploaded the project, navigate to Development > Projects, then click the name of the project where the app is installed.
- In the left sidebar, navigate to the MCP server component.
- Click Test connection.

- In the dialog box, click Connect.
- A pop-out window will appear as the OAuth handshake is attempted using the details defined in your MCP server component’s
*-hsmeta.jsonfile. If successful, you’ll see a message indicating the server is reachable and responding as expected.
- The initial token response includes a
refresh_token. - The authorization server supports the
refresh_tokengrant. - If the provider requires the
offline_accessscope, it is included in the component’srequiredScopesconfiguration.
Distribution and feature flags
For apps configured for Marketplace distribution, HubSpot automatically creates thehs-release-mcp-server feature flag in an OFF state when you add the mcp-server component. This keeps the server hidden from installed customers until your app completes Ecosystem review and approval. While the flag is OFF for an account, you can’t add the server to an agent in that account, and Breeze Assistant can’t use its tools.
While you develop and prepare for review, use the feature flags API to set the hs-release-mcp-server flag to ON for up to five installed accounts for testing. After approval, you can set the app-level defaultState to ON for broader release.
Learn more about the HubSpot Marketplace requirements for listing apps with MCP server components.
Testing your server
After you install your app and connect its MCP server, you can verify the server’s tools in your app’s settings, then test them in both the agent builder and Breeze Assistant. You don’t need to create separate MCP server components for each one. Before you test, make sure that:- The component’s
enabledfield is set totrue. Setting it tofalsedisables the server in HubSpot. - If your app is configured for Marketplace distribution, the
hs-release-mcp-serverfeature flag is set toONfor the account. Otherwise, your MCP server won’t be usable by agents or Breeze Assistant.
Verify and manage your tools
To view the tools that your MCP server exposes to HubSpot:- In your HubSpot account, click the settings icon in the top navigation bar.
- In the left sidebar, navigate to Integrations > Connected Apps.
- Click the name of your app, then click the Settings tab.
- In the Tool permissions section, review the list of tools.

readOnlyHint annotation that your MCP server sets for each tool. A tool that sets readOnlyHint to true is listed as read-only. A tool that doesn’t set it is treated as a write tool, and HubSpot asks for permission before running it by default.

Breeze Assistant loads MCP tool schemas when needed for a request rather than loading all connected servers’ tool schemas at the start of every conversation turn.
Test in the agent builder
To test your MCP tools in the agent builder:- In the account where your app is installed, navigate to Agent Hub.
- On the Agent Hub dashboard, click Edit next to an existing agent, or create a new one.
- In the agent editor, click Add action.

- In the sidebar, click the Connectors tab, then select your MCP server under Connected MCPs.

- At the top of the agent editor, click Test.
- In the Test agent section, fill in any fields as needed, then click Run agent.
- View the results in the Activity and Outputs tabs.
- At the top, you can also view high-level details about the run, including its success status, estimated credit usage, run time, and a score.
Test in Breeze Assistant
After you connect your MCP server, it appears in Breeze Assistant’s connectors. To test your MCP server in Breeze Assistant:- In the account where your app is installed, click Breeze Assistant in the top navigation bar.
- In the message box, click the + icon, then click Connectors.
- Confirm that your MCP server appears in the list, and that it’s enabled. If the server isn’t listed, click Add connector to connect it.

- Send a prompt that requires one of your MCP tools. Breeze Assistant runs read-only tools without asking. For other tools, it asks for permission first.