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

# Set up HubSpot MCP Server

> Create a HubSpot MCP auth app and connect HubSpot's remote MCP server to TrueFoundry with per-user OAuth.

HubSpot's remote MCP server provides read access to CRM objects such as contacts, companies, deals, tickets, invoices, and quotes. Connect it to TrueFoundry with per-user OAuth so HubSpot permissions stay tied to each user.

## Prerequisites

* A TrueFoundry account with permission to add MCP servers.
* A HubSpot account with access to the **Development** section.
* Your TrueFoundry control plane base URL.

## Create a HubSpot MCP Auth App

<Steps>
  <Step title="Open MCP Auth Apps">
    In HubSpot, open **Development** from the left sidebar and choose **MCP Auth Apps**.
  </Step>

  <Step title="Create the app">
    Click **Create MCP auth app**, enter a recognizable name such as `TrueFoundry`, and set the redirect URL to:

    ```txt theme={"dark"}
    https://<tfy-control-plane-base-url>/api/svc/v1/llm-gateway/mcp-servers/oauth2/callback
    ```
  </Step>

  <Step title="Copy credentials">
    Copy the **Client ID** and **Client Secret** from the app details page.
  </Step>
</Steps>

## Register in TrueFoundry

In **MCP Gateway**, click **Add MCP Server**, select **Connect any Remote MCP Server**, and configure:

| Field              | Value                              |
| ------------------ | ---------------------------------- |
| **Name**           | `hubspot`                          |
| **URL**            | `https://mcp.hubspot.com`          |
| **Authentication** | `OAuth2`                           |
| **Grant Type**     | `Authorization Code`               |
| **Client ID**      | HubSpot MCP auth app Client ID     |
| **Client Secret**  | HubSpot MCP auth app Client Secret |
| **JWT Source**     | `Access Token`                     |

Add collaborators and save the server. Users should open the server's **Tools** section and click **Connect Now**; after OAuth succeeds, HubSpot tools appear and can be tried from the **Agent Playground**.

## Security Notes

HubSpot determines available access from the user's HubSpot permissions and the tools requested by the MCP server. Store the client secret securely, prefer per-user OAuth, and start with read-only workflows when rolling this out to sales or support teams.
