hubspot-mcp-server
v0.2.17
Published
A powerful Model Context Protocol (MCP) server implementation for seamless HubSpot CRM integration, enabling AI assistants to interact with your HubSpot data
Maintainers
Readme
HubSpot MCP Server
A HubSpot Model Context Protocol server for giving AI agents structured, on-demand access to HubSpot CRM and operating data.
This package is built on top of the original open-source work at lkm1developer/hubspot-mcp-server. The Boondock Labs version expands that foundation with broader HubSpot coverage, MCP API-key authentication support, token-health utilities, incremental fetch controls, and additional tools across HubSpot's CRM, Sales, Marketing, Service, CMS, Commerce, and Operations surfaces.
What This Server Does
The server exposes HubSpot as a set of typed MCP tools. Instead of loading an entire portal into an agent prompt, the agent can ask for the exact slice of context it needs:
- Recent or updated contacts, companies, deals, tickets, and orders
- Exact CRM records by ID
- Company activity and engagement timelines
- Tasks, notes, and engagement activity
- Pipelines, properties, users, lists, workflows, domains, and associations
- Marketing forms, form submissions, marketing emails, email events, and campaigns
- CMS content such as blog posts, landing pages, site pages, files, and HubDB tables
- Service content such as conversations and knowledge base articles
- Commerce objects such as products, quotes, orders, and line items
- Custom objects and general object search
- HubSpot OAuth token validation, token health, and refresh helpers
The result is a retrieval-first HubSpot interface for agents: discover the right tool, pull the relevant records, then continue reasoning with only the context that matters.
Why This Version Exists
The original project proved the basic idea: expose HubSpot CRM through MCP. This version has been extended for heavier agent workflows where HubSpot is not just a contact database, but an operating environment.
Important additions include:
- Much wider HubSpot object coverage beyond contacts and companies
- Limit-based retrieval on most list tools
- Incremental
updatedAftersupport on heavy CRM reads - Cursor-based pagination helpers for HubSpot search and list APIs
- Rate limiting and 429 retry handling
- Token refresh and token health tools
- Support for direct HubSpot tokens or Morphed MCP API-key based auth
- Optional-scope handling for HubSpot features that may not be available in every portal
- More complete property sets for CRM records so agents can reason from richer context
Installation
npm install hubspot-mcp-serverFor local development:
git clone https://github.com/lkm1developer/hubspot-mcp-server.git
cd hubspot-mcp-server
npm install
npm run buildIf you are working from this expanded Boondock Labs package, use the package source you received or cloned, then run:
npm install
npm run buildAuthentication
The server supports two authentication modes.
Direct HubSpot Token
Set one of the supported token environment variables:
HUBSPOT_ACCESS_TOKEN=your-hubspot-access-tokenYou can also pass the token at startup:
npm start -- --access-token=your-hubspot-access-tokenThe server also checks:
HUBSPOT_DEVELOPER_API_KEY=your-token
HUBSPOT_PERSONAL_ACCESS_KEY=your-tokenMorphed MCP API Key
For Morphed-managed installs, the server can validate a Morphed MCP API key and retrieve the matching HubSpot OAuth token for that portal.
MORPHED_MCP_API_KEY=your-mcp-api-key
MORPHED_API_URL=https://morphed.ioOr pass the API key at startup:
npm start -- --api-key=your-mcp-api-keyRunning The Server
Build first:
npm run buildStart over stdio:
npm startOr:
node dist/index.jsThe package also includes a stdio script:
npm run stdioSSE Proxy Mode
For remote or browser-based MCP clients, you can run the server behind mcp-proxy-auth:
npx mcp-proxy-auth node dist/index.jsSet the auth verification endpoint:
AUTH_SERVER_URL=https://your-auth-server.com/verifyThe SSE endpoint is then available through the proxy, with API-key verification handled before requests reach the MCP server.
Tool Groups
Core CRM
hubspot_create_contacthubspot_create_companyhubspot_create_notehubspot_get_active_companieshubspot_get_active_contactshubspot_get_dealshubspot_get_ticketshubspot_get_ordershubspot_get_current_userhubspot_update_contacthubspot_update_companyhubspot_get_contact_by_idhubspot_get_company_by_idhubspot_get_deal_by_idhubspot_get_ticket_by_id
Engagements And Activity
hubspot_get_company_activityhubspot_get_recent_engagementshubspot_search_taskshubspot_search_noteshubspot_get_engagement_associationshubspot_get_engagement_by_id
Sales Hub
hubspot_get_pipelineshubspot_get_propertieshubspot_get_quoteshubspot_get_usershubspot_get_listshubspot_get_workflows
Marketing Hub
hubspot_get_formshubspot_get_form_submissionshubspot_get_marketing_emailshubspot_get_email_eventshubspot_get_campaignshubspot_get_analytics
Service Hub
hubspot_get_conversationshubspot_get_knowledge_base
CMS Hub
hubspot_get_blog_postshubspot_get_landing_pageshubspot_get_site_pageshubspot_get_fileshubspot_get_hubdb_tableshubspot_get_domains
Commerce Hub
hubspot_get_productshubspot_get_line_itemshubspot_get_ordershubspot_get_quotes
Operations And Enterprise
hubspot_get_custom_objectshubspot_search_objectshubspot_get_associations
Token Utilities
hubspot_refresh_tokenhubspot_validate_tokenhubspot_token_health
Context Strategy
The server is intentionally tool-first rather than prompt-dump-first.
Agents should not need to load every HubSpot record before doing useful work. They can start from the MCP tool list, choose the object family that matches the task, and request a bounded result set with limit, updatedAfter, or a specific record ID.
The heavier CRM reads use HubSpot sorting, cursor pagination, date filtering, and explicit property lists so the agent receives useful operational context without pulling the whole portal into memory at once.
That pattern makes the server useful for:
- CRM lookup and account research
- Workflow and list inspection
- Support and knowledge-base review
- Marketing and CMS context gathering
- Commerce object inspection
- Agentic HubSpot operations where the assistant needs just-in-time portal context
Extending The Server
To add a new HubSpot capability:
- Add a method to
HubSpotClientinsrc/hubspot-client.ts. - Register the MCP tool schema in
setupToolHandlersinsidesrc/index.ts. - Add the
CallToolRequestSchemahandler case insrc/index.ts. - Rebuild with:
npm run buildAttribution
This package began from lkm1developer/hubspot-mcp-server. The current Boondock Labs package keeps that foundation and expands it into a broader HubSpot MCP surface for richer AI-agent workflows.
HubSpot is a trademark of HubSpot, Inc. This package is not an official HubSpot product.
License
MIT. See LICENSE.
