Prerequisites
To get started with MCP server components, you’ll need:- A HubSpot account with access to the MCP server public beta.
- The HubSpot CLI installed and authenticated with your HubSpot account.
- A HubSpot app that’s configured for private or marketplace distribution.
- The project’s
hsproject.jsonfile must be configured to use the latest beta platform version (2026.09-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
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:- Update your project to 2026.09-beta: update your app and project to the
2026.09-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 agents with your MCP tools: test your MCP tools in the Breeze agent builder.
Update your project to 2026.09-beta
Before adding an MCP server component, update your project’splatformVersion to 2026.09-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 an access token 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.
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.
Distribution and feature flags
MCP server components are available in public beta for privately distributed apps and marketplace-distributed apps. For apps that are or will be distributed through the HubSpot Marketplace, 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 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 customer access.
The following limits apply to marketplace-distributed apps with MCP server components:
- Portal-level flag writes require the app to be installed in the target account.
- Apps that haven’t completed Ecosystem approval can set
ONportal overrides for up to five installed accounts. - After Ecosystem approval, you can set the app-level
defaultStatetoONfor broader release.
Testing agents with your MCP tools
To test your MCP tools in the agent builder:- In the account where your app is installed, navigate to Agent Hub > Agent Builder.
- Click the name of an existing agent, or create a new one. It’s recommended to start by testing with the Developer Tool Testing Agent.
- In the agent builder, click Configure.
- Click Add tool.
- In the left sidebar, locate the MCP Servers category tab, and locate your MCP server. Then, click Connect and add to add it to the agent.