How to Connect Claude Code to HubSpot via MCP (2026)
Connect Claude Code to HubSpot CRM and Marketing Hub in under 2 minutes using Cogny's managed MCP server. OAuth handled for you — no HubSpot developer account needed.
TL;DR
Cogny provides a managed, remote MCP server for HubSpot with built-in OAuth. Connect Claude Code to your HubSpot CRM, Marketing Hub, and Sales Hub without creating a developer app or managing API tokens.
What you get:
- Single federated MCP server at
app.cogny.com/mcp— tools determined by connected accounts - Access to contacts, companies, deals, tickets, and marketing data
- Pipeline analytics and deal flow analysis
- Automatic token refresh and credential management
- Works with Claude Code, Claude Desktop, Cursor, Windsurf, and any MCP client
Time required: 2 minutes | Difficulty: Beginner | Prerequisites: HubSpot account with appropriate access
Why Use a Managed MCP Server?
Connecting to HubSpot's API yourself requires:
- Creating a HubSpot developer account
- Creating an app with OAuth configuration
- Implementing the OAuth 2.0 authorization flow
- Managing token refresh (access tokens expire in 30 minutes)
- Hosting a server for the MCP endpoint
- Handling API rate limits and pagination
Cogny handles all of this. Sign in with HubSpot, authorize access, and Claude can query your CRM immediately.
What Can Claude Do With HubSpot?
With the HubSpot MCP server, Claude can:
- Query contacts, companies, deals, and tickets
- Analyze sales pipeline velocity and conversion rates
- Review marketing email performance and automation workflows
- Track deal progression and forecast revenue
- Identify at-risk deals and stalled opportunities
- Cross-reference CRM data with ad platform performance (when other MCPs connected)
Setup in 3 Steps
Step 1: Create a Cogny Account
Go to cogny.com, sign up, and create a warehouse.
Step 2: Connect HubSpot
In your dashboard, find HubSpot under the channels list and click connect.
Sign in with your HubSpot account and select the HubSpot portal to connect.
Step 3: Add to Claude Code
In your Cogny dashboard, generate an API key. Then add the Cogny MCP server to your Claude Code config. This is the same endpoint for all Cogny integrations — the tools available are determined by which accounts you've connected.
{
"mcpServers": {
"cogny": {
"type": "http",
"url": "https://app.cogny.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}
Done. Claude now has read access to your HubSpot data — and any other platforms you connect through Cogny.
Example Prompts
- "Show me all deals in the pipeline worth over $50K that haven't been updated in 2 weeks"
- "What's our average sales cycle length by deal source this quarter?"
- "List contacts who opened marketing emails but never converted to a deal"
- "Compare win rates across sales reps for Q1"
- "Which marketing campaigns generated the most qualified leads?"
- "Show me the deal pipeline forecast for next month"
Works With Any MCP Client
- Claude Code (CLI) / Claude Desktop (Mac/Windows)
- Cursor / Windsurf / Continue
- Any custom client built with the MCP SDK
Standard HTTP+SSE transport.
Security
- Read-only by default — Claude cannot modify CRM records
- OAuth tokens encrypted in Supabase Vault
- Automatic 30-minute token refresh cycle (handled transparently)
- Signed URLs with HMAC-SHA256 (5-minute expiry)
- Revoke access anytime from Cogny or HubSpot settings
Compared to Self-Hosted
| Feature | Cogny Managed | Self-Hosted |
|---|---|---|
| Setup time | 2 minutes | Hours |
| HubSpot dev account | Not needed | Required |
| OAuth app | Not needed | Required |
| Token refresh (30min) | Automatic | You build |
| Rate limit handling | Managed | You implement |
| Server hosting | Managed | You host |
Common Questions
Q: Do I need a HubSpot developer account? No. Cogny's managed server provides the OAuth flow.
Q: Which HubSpot hubs are supported? CRM (contacts, companies, deals, tickets), Marketing Hub, and Sales Hub data are accessible.
Q: Can Claude create or modify CRM records? Not by default. Write tools are available but require explicit opt-in.
Q: Does this work with HubSpot Free? Yes, with the data available in your plan. Premium features require the corresponding HubSpot subscription.
Next Steps
- Connect LinkedIn Ads via MCP — B2B ad performance + CRM
- Connect Google Ads via MCP — paid search + CRM attribution
- Connect Shopify via MCP — e-commerce + CRM
- B2B Sales Pipeline Signals — optimization strategies
About Cogny MCP Servers
Cogny provides managed, remote MCP servers for 12+ marketing and business platforms with built-in OAuth, token management, and enterprise-grade security.
Last Updated: April 2026
Try Cogny free
Connect your marketing platforms to Claude Code in under 2 minutes. No credit card required.