HubSpot MCP Server
Supports configuration through .env files, allowing users to store their HubSpot API access tokens and other environment variables securely for development purposes.
Available through GitHub repository, allowing users to clone and extend the server for additional HubSpot API capabilities.
Provides comprehensive tools for interacting with HubSpot CRM data, including creating and managing contacts and companies, retrieving company activity history and engagement timelines, accessing recent engagement data, getting lists of recently active companies and contacts, and performing CRM operations.
Integrates with npm packages, particularly mcp-proxy-auth for authentication, enabling secure API key verification for the SSE server.
Built with TypeScript, providing type safety and modern JavaScript features for the server implementation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@HubSpot MCP Server create a new contact for Jane Smith at TechCorp with email jane.smith@techcorp.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
HubSpot MCP Server
A powerful Model Context Protocol (MCP) server implementation for seamless HubSpot CRM integration, enabling AI assistants to interact with your HubSpot data.
Overview
This MCP server provides a comprehensive set of tools for interacting with the HubSpot CRM API, allowing AI assistants to:
Create and manage contacts and companies in your HubSpot CRM
Retrieve detailed company activity history and engagement timelines
Access recent engagement data across your entire HubSpot instance
Get lists of recently active companies and contacts
Perform CRM operations without leaving your AI assistant interface
Related MCP server: HubSpot MCP Server
Why Use This MCP Server?
Seamless AI Integration: Connect your AI assistants directly to your HubSpot CRM data
Simplified CRM Operations: Perform common HubSpot tasks through natural language commands
Real-time Data Access: Get up-to-date information from your HubSpot instance
Secure Authentication: Uses HubSpot's secure API token authentication
Extensible Design: Easily add more HubSpot API capabilities as needed
Installation
# Clone the repository
git clone https://github.com/lkm1developer/hubspot-mcp-server.git
cd hubspot-mcp-server
# Install dependencies
npm install
# Build the project
npm run buildConfiguration
The server requires a HubSpot API access token. You can obtain one by:
Going to your HubSpot Developer Account
Creating a private app with the necessary scopes (contacts, companies, engagements)
Copying the generated access token
You can provide the token in two ways:
As an environment variable:
HUBSPOT_ACCESS_TOKEN=your-access-tokenAs a command-line argument:
npm start -- --access-token=your-access-token
For development, create a .env file in the project root to store your environment variables:
HUBSPOT_ACCESS_TOKEN=your-access-tokenUsage
Starting the Server
# Start the server
npm start
# Or with a specific access token
npm start -- --access-token=your-access-token
# Run the SSE server with authentication
npx mcp-proxy-auth node dist/index.jsImplementing Authentication in SSE Server
The SSE server uses the mcp-proxy-auth package for authentication. To implement authentication:
Install the package:
npm install mcp-proxy-authSet the
AUTH_SERVER_URLenvironment variable to point to your API key verification endpoint:export AUTH_SERVER_URL=https://your-auth-server.com/verifyRun the SSE server with authentication:
npx mcp-proxy-auth node dist/index.jsThe SSE URL will be available at:
localhost:8080/sse?apiKey=apikeyReplace
apikeywith your actual API key for authentication.
The mcp-proxy-auth package acts as a proxy that:
Intercepts requests to your SSE server
Verifies API keys against your authentication server
Only allows authenticated requests to reach your SSE endpoint
Integrating with AI Assistants
This MCP server is designed to work with AI assistants that support the Model Context Protocol. Once running, the server exposes a set of tools that can be used by compatible AI assistants to interact with your HubSpot CRM data.
Available Tools
The server exposes the following powerful HubSpot integration tools:
hubspot_create_contact
Create a new contact in HubSpot with duplicate checking
Parameters:
firstname(string, required): Contact's first namelastname(string, required): Contact's last nameemail(string, optional): Contact's email addressproperties(object, optional): Additional contact properties like company, phone, etc.
Example:
{ "firstname": "John", "lastname": "Doe", "email": "john.doe@example.com", "properties": { "company": "Acme Inc", "phone": "555-123-4567", "jobtitle": "Software Engineer" } }
hubspot_create_company
Create a new company in HubSpot with duplicate checking
Parameters:
name(string, required): Company nameproperties(object, optional): Additional company properties
Example:
{ "name": "Acme Corporation", "properties": { "domain": "acme.com", "industry": "Technology", "phone": "555-987-6543", "city": "San Francisco", "state": "CA" } }
hubspot_get_company_activity
Get comprehensive activity history for a specific company
Parameters:
company_id(string, required): HubSpot company ID
Returns detailed engagement data including emails, calls, meetings, notes, and tasks
hubspot_get_recent_engagements
Get recent engagement activities across all contacts and companies
Parameters:
days(number, optional, default: 7): Number of days to look backlimit(number, optional, default: 50): Maximum number of engagements to return
Returns a chronological list of all recent CRM activities
hubspot_get_active_companies
Get most recently active companies from HubSpot
Parameters:
limit(number, optional, default: 10): Maximum number of companies to return
Returns companies sorted by last modified date
hubspot_get_active_contacts
Get most recently active contacts from HubSpot
Parameters:
limit(number, optional, default: 10): Maximum number of contacts to return
Returns contacts sorted by last modified date
hubspot_update_contact
Update an existing contact in HubSpot (ignores if contact does not exist)
Parameters:
contact_id(string, required): HubSpot contact ID to updateproperties(object, required): Contact properties to update
Example:
{ "contact_id": "12345", "properties": { "email": "updated.email@example.com", "phone": "555-987-6543", "jobtitle": "Senior Software Engineer" } }
hubspot_update_company
Update an existing company in HubSpot (ignores if company does not exist)
Parameters:
company_id(string, required): HubSpot company ID to updateproperties(object, required): Company properties to update
Example:
{ "company_id": "67890", "properties": { "domain": "updated-domain.com", "phone": "555-123-4567", "industry": "Software", "city": "New York", "state": "NY" } }
Extending the Server
The server is designed to be easily extensible. To add new HubSpot API capabilities:
Add new methods to the
HubSpotClientclass insrc/hubspot-client.tsRegister new tools in the
setupToolHandlersmethod insrc/index.tsRebuild the project with
npm run build
License
This project is licensed under the MIT License - see the LICENSE file for details.
Keywords
HubSpot, CRM, Model Context Protocol, MCP, AI Assistant, TypeScript, API Integration, HubSpot API, CRM Integration, Contact Management, Company Management, Engagement Tracking, AI Tools
Available Tools
8 toolshubspot_create_companyC
Create a new company in HubSpot
Inputs: name (required), properties.
hubspot_create_contactC
Create a new contact in HubSpot
Inputs: firstname (required), lastname (required), email, properties.
hubspot_get_active_companiesC
Get most recently active companies from HubSpot
Inputs: limit.
hubspot_get_active_contactsC
Get most recently active contacts from HubSpot
Inputs: limit.
hubspot_get_company_activityC
Get activity history for a specific company
Inputs: company_id (required).
hubspot_get_recent_engagementsB
Get recent engagement activities across all contacts and companies
Inputs: days, limit.
hubspot_update_companyB
Update an existing company in HubSpot (ignores if company does not exist)
Inputs: company_id (required), properties (required).
hubspot_update_contactA
Update an existing contact in HubSpot (ignores if contact does not exist)
Inputs: contact_id (required), properties (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose targeting specific resources (companies, contacts, engagements) and actions (create, get, update). The 'get' tools differentiate by scope (active vs. specific activity vs. recent engagements), eliminating ambiguity. No tools appear to do the same thing, making misselection unlikely.
All tools follow a consistent 'hubspot_verb_noun' pattern with snake_case throughout. The verbs (create, get, update) are used predictably across resources, and the naming structure is uniform, making the set highly readable and predictable for agents.
With 8 tools, this server is well-scoped for HubSpot CRM operations, covering core entities (companies, contacts, engagements) with essential CRUD actions. Each tool earns its place without bloat, providing a focused yet functional surface for typical agent workflows.
The toolset offers strong coverage for companies and contacts with create, get (active/specific), and update operations, plus engagement retrieval. Minor gaps include no delete operations and limited get options (e.g., no general get_company or get_contact by ID), but agents can work around these with the provided tools.
Related MCP Connectors
The HubSpot MCP Server acts as a bridge that enables AI assistants and Large Language Models to securely interact with HubSpot CRM data through natural conversation, without requiring users to understand complex API structures. It provides read-only access to standard CRM objects (contacts, companies, deals, tickets, products, invoices, and more) and their associations, secured via OAuth 2.0, allowing AI agents to perform tasks like summarizing deals, fetching company updates, and looking up record changes.
MCP server for the HubSpot Integrations Center HubDB: search and retrieve integration data.
API-first CRM for LLMs - contacts, companies, deals and activities over a native MCP server.
Marketo MCP server for AI. 130 tools to operate Marketo from Claude, Cursor, or ChatGPT.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceA server that enables AI models to interact with HubSpot CRM data and operations through a standardized interface, supporting contact and company management with multi-user token-based authentication.21 npmMIT
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with HubSpot CRM data for creating contacts and companies, retrieving company activity, active contacts and companies, recent conversations, and performing semantic search across previously retrieved data with built-in vector storage and caching.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with HubSpot CRM data, including creating contacts and companies, retrieving activity and conversations, and performing semantic search over stored interactions while using vector storage and caching for faster responses.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with HubSpot CRM data by creating contacts and companies, retrieving activity and recent conversations, and performing semantic search across previously retrieved records with built-in caching and vector storage.-