How to Connect HubSpot to MCP for AI Agents
Integrate HubSpot CRM, Marketing Hub, and Sales Hub with AI agents via MCP. Manage contacts, deals, and tickets through the AnythingMCP dashboard.
AI-Powered CRM with HubSpot and MCP
HubSpot's comprehensive CRM platform manages contacts, deals, tickets, and marketing campaigns for hundreds of thousands of businesses. Connecting HubSpot to MCP enables AI agents to manage your entire customer lifecycle.
Step-by-Step Guide
Step 1: Deploy AnythingMCP
git clone https://github.com/HelpCode-ai/anythingmcp.git
cd anythingmcp && docker compose up -d
Step 2: Create a REST Connector
Open the AnythingMCP dashboard at http://localhost:3000 and create a new REST connector. Set the base URL to https://api.hubapi.com.
Step 3: Configure Authentication
In the connector settings, configure Bearer token authentication with your HubSpot Private App access token, or use OAuth 2.0 for more granular permissions.
Step 4: Import and Customize Tools
Configure endpoints for contacts, deals, companies, and tickets in the dashboard. You can import HubSpot's OpenAPI spec or configure endpoints manually.
Step 5: Test and Connect
Test each tool in the dashboard, then configure your MCP client:
{
"mcpServers": {
"hubspot": {
"url": "http://localhost:4000/mcp"
}
}
}
AI Agent Use Cases
- "Create a contact for Jane Doe, CEO at TechStartup Inc"
- "Show me all deals in the Negotiation stage worth over $10k"
- "Move the Acme Corp deal to Closed Won"
- "How many new contacts were added this week?"
- "Create a support ticket: Customer reports billing discrepancy"
Best Practices
- Use Private App tokens for server-to-server integrations
- Scope permissions — Only request scopes your tools actually need
- Rate limits — HubSpot allows 100 requests per 10 seconds for private apps
- Associations — Use the Associations API to link contacts, companies, and deals
Next Steps
- Salesforce to MCP Guide — Alternative CRM
- Zendesk to MCP Guide — Customer support