# HubSpot

A local MCP server that exposes HubSpot CRM to your coding agent: contacts, deals, tickets, tasks and files. Handy when you juggle more than one HubSpot account.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 13
- Author: mindstone
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/mindstone/mcp-servers/tree/HEAD/connectors/hubspot
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/hubspot

## What it does

The server runs on your own machine via `npx -y @mindstone/mcp-server-hubspot` and hands the agent 106 tools covering CRM objects, their associations, marketing lists, files, workflows and conversations. Every record it creates carries a source label, so you can tell later which entries came from an AI agent. File uploads stay inside one workspace folder on disk.

OAuth is the host's job, not the server's. The server reads tokens the host has already written to `${HUBSPOT_CONFIG_DIR}/credentials/*.token.json`. Each process serves a single HubSpot account, so run separate processes with different `HUBSPOT_ACCOUNT_EMAIL` values if you need several. Node.js 20+ and npm are required.

Start it without `HUBSPOT_CLIENT_ID` and `HUBSPOT_CLIENT_SECRET` and it still boots, but any tool that touches the HubSpot API answers with a structured `auth_required` response. The file tools need a writable `MCP_WORKSPACE_PATH` directory.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `HUBSPOT_CONFIG_DIR`, `HUBSPOT_ACCOUNT_EMAIL`, `MCP_WORKSPACE_PATH`, `HUBSPOT_CLIENT_ID`, `HUBSPOT_CLIENT_SECRET`, `HUBSPOT_SOURCE_LABEL`, `HUBSPOT_DISABLE_REFRESH`, `HUBSPOT_ALLOW_CLOUD_REFRESH`, `HUBSPOT_REQUEST_TIMEOUT_MS`, `HUBSPOT_REFRESH_LOCK_STALE_MS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.
- Works with: HubSpot

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env HUBSPOT_CONFIG_DIR=<HUBSPOT_CONFIG_DIR> --env HUBSPOT_ACCOUNT_EMAIL=<HUBSPOT_ACCOUNT_EMAIL> --env MCP_WORKSPACE_PATH=<MCP_WORKSPACE_PATH> --env HUBSPOT_CLIENT_ID=<HUBSPOT_CLIENT_ID> --env HUBSPOT_CLIENT_SECRET=<HUBSPOT_CLIENT_SECRET> --transport stdio hubspot -- npx -y @mindstone/mcp-server-hubspot
```
Replace <…> with your own values. 5 more environment variables are in the server README

### Codex

**Platform CLI**
```bash
codex mcp add hubspot --env HUBSPOT_CONFIG_DIR=<HUBSPOT_CONFIG_DIR> --env HUBSPOT_ACCOUNT_EMAIL=<HUBSPOT_ACCOUNT_EMAIL> --env MCP_WORKSPACE_PATH=<MCP_WORKSPACE_PATH> --env HUBSPOT_CLIENT_ID=<HUBSPOT_CLIENT_ID> --env HUBSPOT_CLIENT_SECRET=<HUBSPOT_CLIENT_SECRET> -- npx -y @mindstone/mcp-server-hubspot
```
Replace <…> with your own values. 5 more environment variables are in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "hubspot": {
            "command": "npx",
            "args": [
                "-y",
                "@mindstone/mcp-server-hubspot"
            ],
            "env": {
                "HUBSPOT_CONFIG_DIR": "<HUBSPOT_CONFIG_DIR>",
                "HUBSPOT_ACCOUNT_EMAIL": "<HUBSPOT_ACCOUNT_EMAIL>",
                "MCP_WORKSPACE_PATH": "<MCP_WORKSPACE_PATH>",
                "HUBSPOT_CLIENT_ID": "<HUBSPOT_CLIENT_ID>",
                "HUBSPOT_CLIENT_SECRET": "<HUBSPOT_CLIENT_SECRET>"
            }
        }
    }
}
```
Replace <…> with your own values. 5 more environment variables are in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "hubspot": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@mindstone/mcp-server-hubspot"
            ],
            "env": {
                "HUBSPOT_CONFIG_DIR": "<HUBSPOT_CONFIG_DIR>",
                "HUBSPOT_ACCOUNT_EMAIL": "<HUBSPOT_ACCOUNT_EMAIL>",
                "MCP_WORKSPACE_PATH": "<MCP_WORKSPACE_PATH>",
                "HUBSPOT_CLIENT_ID": "<HUBSPOT_CLIENT_ID>",
                "HUBSPOT_CLIENT_SECRET": "<HUBSPOT_CLIENT_SECRET>"
            }
        }
    }
}
```
Replace <…> with your own values. 5 more environment variables are in the server README

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e HUBSPOT_CONFIG_DIR=<HUBSPOT_CONFIG_DIR> -e HUBSPOT_ACCOUNT_EMAIL=<HUBSPOT_ACCOUNT_EMAIL> -e MCP_WORKSPACE_PATH=<MCP_WORKSPACE_PATH> -e HUBSPOT_CLIENT_ID=<HUBSPOT_CLIENT_ID> -e HUBSPOT_CLIENT_SECRET=<HUBSPOT_CLIENT_SECRET> hubspot npx -y @mindstone/mcp-server-hubspot
```
Replace <…> with your own values. 5 more environment variables are in the server README

## When to use it
- look up a company by name and get its ID
- log a call note on a customer record
- schedule a follow-up task tied to a deal
- attach uploaded files to CRM records
- work across several HubSpot accounts from one agent

## Example prompts
- Find Acme Corp in HubSpot and log a note about the call with their CTO
- Create a task to follow up with Acme Corp next Tuesday, associated to the company
- Upload a file from the workspace and attach it to the deal record

## Similar
- [HubSpot MCP](https://affpapa.org/en/nevibecode/mcp/hubspot-mcp.md) — MCP server · ★ 63
- [hubspot-sales](https://affpapa.org/en/nevibecode/plugins/hubspot-sales.md) — plugin · ★ 4
- [bulk-operations](https://affpapa.org/en/nevibecode/skills/bulk-operations.md) — skill · 1800 installs
- [closed-lost-revival](https://affpapa.org/en/nevibecode/skills/closed-lost-revival.md) — skill · ★ 111
- [cleanup-lead-owners](https://affpapa.org/en/nevibecode/skills/cleanup-lead-owners.md) — skill · ★ 78
- [call-list](https://affpapa.org/en/nevibecode/skills/call-list.md) — skill · 1600 installs

From the same set: [mindstone/mcp-servers](https://affpapa.org/en/nevibecode/by/mindstone/mcp-servers.md) — 24 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
