> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

---
id: bd7fcc23-835e-43d1-aa9f-89e45509f0bb
---

# Create a custom MCP connector

> Create an MCP connector in your HubSpot account to authenticate your own agent or MCP client with the HubSpot MCP server.

An MCP connector provides the OAuth credentials your own agent or MCP client uses to connect to the [remote HubSpot MCP server](https://developers.hubspot.com/docs/apps/developer-platform/build-apps/integrate-with-the-remote-hubspot-mcp-server.md) at `https://mcp.hubspot.com`.

> [!NOTE]
>
> You only need to create a connector if you're building your own agent or MCP client. To use the HubSpot MCP server with Claude, ChatGPT, Gemini, or Microsoft Copilot, use the [built-in HubSpot AI connectors](https://www.hubspot.com/ai-tools) instead.

## Prerequisites

* An MCP client that supports OAuth with [PKCE](https://datatracker.ietf.org/doc/html/rfc7636) (Proof Key for Code Exchange). PKCE is required for authenticating with HubSpot's MCP server.
* It's recommended to build and test with a [test account](https://developers.hubspot.com/docs/developer-tooling/local-development/configurable-test-accounts.md) before connecting to a production account. Learn more about [HubSpot account types](https://developers.hubspot.com/docs/getting-started/account-types.md).

> [!WARNING]
>
> **Please note:** there is a combined limit of 100 project-based apps, service keys, and MCP connectors per HubSpot account.

> [!NOTE]
>
> Some MCP clients, like the [MCP Inspector](https://github.com/modelcontextprotocol/inspector), handle PKCE automatically. If you're building a custom integration, ensure your OAuth implementation includes PKCE support. Learn more about [OAuth 2.1 authorization in the MCP specification](https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization).

## Permissions and scopes

When creating an MCP connector, it's important to note that you don't explicitly define the connector's scopes. Instead, available scopes are automatically determined by two factors:

* The tools available in the MCP server at the time of installation.
* The permissions that the user chooses to grant during installation.

As the MCP server's tools are updated, the available scopes may change. In the event of scope updates, users who have already installed the connector will need to re-install to grant any new scopes.

## Create an MCP connector

Create an MCP connector [in your HubSpot account](https://app.hubspot.com/l/mcp-auth-apps/).

* In the main navigation bar of your HubSpot account, navigate to **Development**.
* In the left sidebar menu, navigate to **MCP Connectors**.
* In the upper right, click **Create MCP connector**.
* In the dialog box, enter your connector details, which you can update later as needed:
  * **Name:** the name of your connector.
  * **Description:** an optional description of your connector.
  * **Redirect URL:** the URL to use for OAuth authentication. If you'll be testing with the MCP inspector, you'll need to include `http://localhost:6274/oauth/callback/debug` as a redirect URL.
  * **Icon:** an optional icon for your connector.
* Click **Create**.

HubSpot will then generate a connector configured with OAuth authentication using the details you provided. You'll then be redirected to the connector's details page, where you can view its client credentials, redirect URLs, and more. To edit your connector details, you can click **Edit info** in the upper right.

> [!NOTE]
>
> If you're including multiple redirect URLs, the first redirect URL will be used as the default redirect.

![Screenshot of the MCP connector details page in HubSpot](https://developers.hubspot.com/hubfs/Knowledge_Base_2023-24-25/developer/hubspot-mcp-connector-details-page.png)

You can then proceed to connect your MCP client to the HubSpot MCP server, using your connector to authenticate requests.

For quick testing, you can use the MCP inspector tool, as described in the next section. Otherwise, you can continue to the [general MCP client connection](#general-mcp-client-connection-instructions) section for general instructions.

## Test with the MCP inspector

The [MCP Inspector](https://github.com/modelcontextprotocol/inspector) is a debugging tool that handles OAuth with PKCE automatically, making it a quick way to test your connection to HubSpot's MCP server without building a full integration.

> [!NOTE]
>
> The MCP Inspector is a third-party tool maintained by the MCP community. Consult the [MCP Inspector documentation](https://github.com/modelcontextprotocol/inspector) for the most up-to-date setup instructions, as its interface is subject to change.

To connect using MCP Inspector:

1. Run the [MCP Inspector](https://github.com/modelcontextprotocol/inspector) tool locally.
2. Configure the connection using the **Streamable HTTP** transport type, with the URL set to `https://mcp.hubspot.com/`, and enter your connector's client ID and client secret.
3. Open the OAuth settings and complete the guided OAuth flow, which will direct you to authorize your HubSpot account.
4. Once authentication is complete, connect to the server and use the **List Tools** option to view available tools.

To verify your connection, run the `get_user_details` tool. A successful response will return information about your user and account. To see which object types you can read and write, run the `discover_hubspot_schema` tool.

## General MCP client connection instructions

After creating your MCP connector, you can connect your MCP client to `https://mcp.hubspot.com` using your connector's credentials. Your MCP client will need to handle the OAuth flow, including PKCE, to authenticate with HubSpot.

To configure your MCP client, you'll need the following from your connector's details page:

* Client ID
* Client secret
* Redirect URL (must match what's configured in your MCP client)

During the OAuth flow, you will:

1. Select the HubSpot account to connect.
2. Grant permissions to the connector. These permissions are based on the user's permissions in HubSpot and determine what data the connector can access.
3. Authorize the connection.

Once authorized, your MCP client can make requests to the HubSpot MCP server on behalf of the authenticated user. Learn more about [authentication and identity](https://developers.hubspot.com/docs/apps/developer-platform/build-apps/integrate-with-the-remote-hubspot-mcp-server.md#authentication-and-identity).

> [!TIP]
>
> Not sure where to start with MCP clients? Check out [this list](https://modelcontextprotocol.io/docs/2026-07-28/getting-started/intro) of applications that support MCP integrations.

## Revoke access to a connector

A user can uninstall the connector from their account, and a Super Admin can uninstall it for specific users. Learn more about [managing access to apps](https://knowledge.hubspot.com/integrations/manage-access-to-apps).

## Troubleshooting

### PKCE-related authentication failures

HubSpot's MCP server requires [PKCE](https://datatracker.ietf.org/doc/html/rfc7636) (Proof Key for Code Exchange) for all OAuth authentication flows. If your MCP client doesn't handle PKCE automatically, you'll need to implement it yourself:

* Generate a random `code_verifier` (43-128 characters).
* Derive the `code_challenge` from the verifier using the S256 method.
* Include the `code_challenge` and `code_challenge_method=S256` in the authorization request.
* Include the `code_verifier` in the token exchange request.

If you see authentication errors during the OAuth flow, verify that your client is correctly generating and sending the PKCE parameters. Some MCP clients, like the [MCP Inspector](https://github.com/modelcontextprotocol/inspector), handle PKCE automatically.

### Token refresh failures

OAuth access tokens expire after a set period. If your MCP client stops working after a period of inactivity:

* Ensure your client is using the `refresh_token` returned during the initial OAuth flow to request a new access token.
* Always store the `refresh_token` returned in the most recent token response, and use it for the next refresh.
* If the refresh token has also expired or been invalidated, you'll need to re-run the full OAuth authorization flow.
* Check that your redirect URL in the MCP client matches the redirect URL configured in your MCP connector in HubSpot.

## Next steps

* Learn which [data and permissions](https://developers.hubspot.com/docs/apps/developer-platform/build-apps/integrate-with-the-remote-hubspot-mcp-server.md#supported-data-and-permissions) the HubSpot MCP server supports.
* Browse the [tools](https://developers.hubspot.com/docs/apps/developer-platform/build-apps/remote-mcp-server-tools.md) the HubSpot MCP server provides.
