HubSpot + Claude
A one-time setup to get your machine ready to build with Claude, Claude Code, and HubSpot's developer tools — plus a live connection between Claude and your HubSpot data.
VS Code is your editor and your terminal. Everything else in this guide gets done from inside it.
VS Code is the editor and integrated terminal you'll use for the rest of the guide.
Download from code.visualstudio.com and drag the app to Applications.
Download from code.visualstudio.com and run the installer. During install, check Add to PATH and the Open with Code context menu options.
Open VS Code. You should see the Welcome screen.
Inside VS Code, open the integrated terminal panel — it docks at the bottom of the editor and inherits the folder you have open.
Shortcut (Mac & Windows): Ctrl + ` (backtick), or Terminal → New Terminal from the menu bar.
| pwd | Print working directory (where am I?) |
| ls | List files in this directory |
| cd foldername | Change into a folder |
| cd .. | Go up one level |
| cd ~ | Go to your home directory |
| clear | Clear the terminal output |
You'll use this terminal for the rest of the guide.
A package manager, Node.js, and Git form the base that everything else installs on top of.
Package managers install other tools cleanly and let you update them later.
Install Homebrew by pasting this into the terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Follow the prompts. The installer may print two PATH commands to add Homebrew to your shell — run them exactly as printed.
winget is built in on modern Windows — nothing to install.
brew --versionwinget --versionIf you don't see a version number, update Windows or install App Installer from the Microsoft Store.
Node is needed for the HubSpot CLI and, on Windows, for Claude Code.
brew install nodenpm and other Node-installed scripts by default, which breaks the HubSpot CLI and Claude Code installs later on. Run this once in your terminal before installing Node:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserThen close and reopen the terminal so the new policy takes effect.
winget install OpenJS.NodeJSClose and reopen VS Code's terminal so it picks up the new PATH.
node --version prints v18 or higher; npm --version also prints a version.
brew install gitOr accept the prompt to install Xcode Command Line Tools the first time you run any git command.
winget install Git.GitClose and reopen the terminal.
git --versionReplace with your real name and work email:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"Claude Code is the terminal-based coding agent you'll use for the rest of this guide.
brew install --cask claude-codeOr, if you'd rather use npm:
npm install -g @anthropic-ai/claude-codeRequires the Node.js install from the Core tooling section above.
Start Claude Code:
claudeThe first run opens your browser and walks you through signing in with your Claude.ai account. If your organization uses the Claude Console instead, you can set an API key when prompted. Once complete, your credentials are stored securely and reused for future sessions.
Type /exit or press Ctrl+C to leave the interactive prompt at any time.
claude --versionTwo pieces: the HubSpot CLI to build and deploy apps, and the HubSpot Developer MCP so Claude Code can build them with you.
Same command on Mac and Windows:
npm install -g @hubspot/cliConnect the CLI to a HubSpot account (a sandbox or test account works fine):
hs account authThe CLI opens a browser to generate a personal access key. Pick the account, copy the key, and paste it back into the terminal. The CLI saves it to a hubspot.config.yml file in the current directory.
hs --versionAnd confirm your connected account is listed:
hs accounts listThis MCP lets Claude Code actually build HubSpot apps.
In the terminal:
hs mcp setupWhen prompted:
y. Otherwise N is fine.Restart Claude Code after setup completes.
Reference: developers.hubspot.com/docs/developer-tooling/local-development/mcp-server
In Claude Code, run /mcp — you should see HubSpotDev listed.
This gives Claude — on web, desktop, or mobile — direct access to your HubSpot CRM data, so it can answer questions grounded in real records instead of general knowledge. No terminal required.
In a new Claude chat, ask: "List 3 contacts in my HubSpot account." If it returns real data, you're connected.
Two quick checks that everything from this guide works together.
In the terminal, start Claude Code:
claudeEnter the following prompt:
"What HubSpot developer tools do you have access to right now?"
In a Claude chat (web, desktop, or mobile), enter:
"Summarize the most recently created contact in my HubSpot account."
Your environment is verified. Now let's do something with it — this takes 5–10 minutes and gives you a feel for what a connected agent can do compared to a generic chatbot.
In a Claude chat, paste this prompt:
"Use HubSpot to pull the contact record for someone at [pick a company you know]. Summarize what you find in 3 bullets."
This is the difference between a generic chatbot and an agent with a connector — it's pulling from your CRM in real time, not making things up.
Follow up with:
"Based on what you found, draft a short follow-up email to that contact. Keep it under 4 sentences."
Claude uses context from the previous step — the actual CRM record — to write something grounded in real data, not generic filler.
Open Settings → Connectors in Claude and find HubSpot in the list. That live connection is what just gave Claude real, current access to your CRM instead of relying on general knowledge.
Close and reopen the terminal to apply the updated PATH. On macOS, make sure you ran any PATH-export commands printed by the installer.
Do not use sudo. Configure npm to install global packages under your home directory per the npm docs, or use the HubSpot CLI standalone mode described above.
Typically an auth issue. Re-run the sign-in or OAuth flow for the affected MCP. If tokens are cached, restart Claude Code.
Restart Claude Code. MCP servers are initialized at startup.
Open the terminal as Administrator for the install, or configure the npm prefix to a directory you own.
Double-check that HubSpot is toggled on under Search & Tools in your chat, and that you granted the permissions it needs when you connected it. If it's still not working, disconnect and reconnect from Settings → Connectors.
If you hit something else, reach out to your HubSpot contact.