# mcp-hubspot

> MCP Server

This repository provides a Model Context Protocol (MCP) server for integrating AI models with HubSpot CRM, enabling interaction with HubSpot data through tools like contact management. It allows AI to

## Overview

- **Category:** Sales
- **Language:** Python
- **Stars:** 128
- **Forks:** 13
- **Owner:** baryhuang
- **GitHub:** https://github.com/baryhuang/mcp-hubspot
- **Created:** 2024-12-27T08:40:49+00:00
- **Updated:** 2025-03-28T05:50:30+00:00
- **Source:** https://model-context-protocol.com/servers/mcp-hubspot-ai-model-integration-crm

## Setup

## Setup

### Installing via Smithery

To install buryhuang/mcp-hubspot for Claude Desktop automatically via [Smithery](https://smithery.ai/server/buryhuang/mcp-hubspot):

```bash
npx -y @smithery/cli install buryhuang/mcp-hubspot --client claude
```

### Prerequisites

You'll need a HubSpot access token. You can obtain this by:
1. Creating a private app in your HubSpot account:
   Follow the [HubSpot Private Apps Guide](https://developers.hubspot.com/docs/guides/apps/private-apps/overview)
   - Go to your HubSpot account settings
   - Navigate to Integrations > Private Apps
   - Click "Create private app"
   - Fill in the basic information:
     - Name your app
     - Add description
     - Upload logo (optional)
   - Define required scopes:
     - tickets
     - crm.objects.contacts.write
     - crm.objects.contacts.sensitive.read
     - crm.objects.companies.sensitive.read
     - sales-email-read
     - crm.objects.deals.sensitive.read
     - crm.objects.companies.write
     - crm.objects.companies.read
     - crm.objects.deals.read
     - crm.objects.deals.write
     - crm.objects.contacts.read
   - Review and create the app
   - Copy the generated access token

Note: Keep your access token secure and never commit it to version control.

### Docker Installation

You can either build the image locally or pull it from Docker Hub. The image is built for the Linux platform.

#### Supported Platforms
- Linux/amd64
- Linux/arm64
- Linux/arm/v7

#### Option 1: Pull from Docker Hub
```bash
docker pull buryhuang/mcp-hubspot:latest
```

#### Option 2: Build Locally
```bash
docker build -t mcp-hubspot .
```

Run the container:
```bash
docker run \
  -e HUBSPOT_ACCESS_TOKEN=your_access_token_here \
  buryhuang/mcp-hubspot:latest
```

You can also pass the access token directly as a command-line argument:

```bash
docker run \
  buryhuang/mcp-hubspot:latest \
  --access-token your_access_token_here
```

## Cross-Platform Publishing

To publish the Docker image for multiple platforms, you can use the `docker buildx` command. Follow these steps:

1. **Create a new builder instance** (if you haven't already):
   ```bash
   docker buildx create --use
   ```

2. **Build and push the image for multiple platforms**:
   ```bash
   docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t buryhuang/mcp-hubspot:latest --push .
   ```

3. **Verify the image is available for the specified platforms**:
   ```bash
   docker buildx imagetools inspect buryhuang/mcp-hubspot:latest
   ```


## Usage with Claude Desktop

### Installing via Smithery

To install mcp-hubspot for Claude Desktop automatically via [Smithery](https://smithery.ai/server/mcp-hubspot/prod):

```bash
npx -y @smithery/cli@latest install mcp-hubspot --client claude
```

### Docker Usage
```json
{
  "mcpServers": {
    "hubspot": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "HUBSPOT_ACCESS_TOKEN=your_access_token_here",
        "buryhuang/mcp-hubspot:latest"
      ]
    }
  }
}
```

You can also use the command-line argument:

```json
{
  "mcpServers": {
    "hubspot": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "buryhuang/mcp-hubspot:latest",
        "--access-token",
        "your_access_token_here"
      ]
    }
  }
}
```

## Development

To set up the development environment:

```bash
pip install -e .
```

## Tools

## Available Tools

		1. `hubspot_create_contact` (Create a new contact in HubSpot, checking for duplicates.)
		2. `hubspot_create_company` (Create a new company in HubSpot, checking for duplicates.)
		3. `hubspot_get_company_activity` (Get activity history for a specific company.)
		4. `hubspot_get_recent_engagements` (Get recent engagement activities across all contacts and companies.)
		5. `hubspot_get_recent_companies` (Get most recently active companies from HubSpot.)
		6. `hubspot_get_recent_contacts` (Get most recently active contacts from HubSpot.)
