
This guide walks you through connecting AI agents to Merge Agent Handler's HubSpot MCP server with Claude Code.
By the end, you'll have a working MCP configuration that gives your Claude agents direct access to HubSpot's CRM, enabling them to read and update contacts, manage deals, log activities, and more without leaving your terminal.
Merge Agent Handler bridges Claude Code and HubSpot's CRM API. You install the Merge CLI, authenticate once, and register the connection with a single terminal command. You never expose raw HubSpot credentials to the agent. Merge handles OAuth authentication and enforces the tool-level permissions you've configured.
Here's the command that registers the connection:
Related: A guide to connecting to the HubSpot MCP with Codex
Before getting started, you'll need the following:
claude --version to confirm)pipx --version to confirm, or install via pip install pipx)If you want to connect Merge Agent Handler's HubSpot MCP with internal or customer-facing agentic products, you can follow the steps in our docs.
Install with pipx: pipx install merge-api

Verify your installation: merge --version
This links the CLI to your Merge Agent Handler account and authenticates your session: merge login
This starts an authenticated session so the CLI can make authorized requests on your behalf.
The simplest way to register the Agent Handler MCP server with Claude Code:
Alternatively, register manually:
Confirm it connected. Open Claude Code and run: /mcp
agent-handler should appear under Local MCPs with a connected status.

Related: 4 steps for connecting a HubSpot MCP with Cursor
To confirm the connection is working, open a Claude Code session and try: "Pull all open deals in the pipeline and summarize which ones haven't had activity in the last 14 days."
On first use, a Magic Link will appear to finish connector authentication.

{{this-blog-only-cta}}
In case you have any more questions, we've addressed several more below.
Here are just a few impactful use cases:
Merge Agent Handler gives you a production-grade MCP interface to HubSpot without building and maintaining your own connector.
Instead of managing OAuth tokens, handling API versioning, or writing tool schemas by hand, you get a fully maintained HubSpot integration out of the box. The Tool Pack and Registered User model also lets you scope exactly what your agent can access, allowing it to (as an example) read contacts without being able to delete deals.
Merge also handles rate limiting, error normalization, and API changes on your behalf.
Claude Code is purpose-built for agentic, terminal-native workflows. If your team lives in the command line, Claude Code lets you pull HubSpot context directly into that environment without switching to a browser or a separate tool.
It's especially powerful for sales engineers and RevOps teams who want to script CRM automation, inspect deal data mid-workflow, or build lightweight agents that interleave HubSpot reads with code execution.
Agents connected to HubSpot via Merge can handle the full spectrum of CRM automation.
On the read side, they can pull contact histories, summarize deal pipelines, identify stale opportunities, or generate account briefings before a sales call.
On the write side, they can log outreach activity, update deal stages based on email sentiment analysis, create follow-up tasks, and enroll leads into nurture sequences.
More sophisticated agents can combine HubSpot data with external signals. For example, reading a LinkedIn profile, enriching a HubSpot contact record, and drafting a personalized outreach email, all in a single agent run.
Use Merge Agent Handler’s 150+ connectors (including HubSpot) to power reliable, secure, and powerful agents.