HubSpot CRM Integration
HTTP-SSESTDIOMCP server implementation for seamless HubSpot CRM integration, enabling AI assistants.
MCP server implementation for seamless HubSpot CRM integration, enabling AI assistants.
A powerful Model Context Protocol (MCP) server implementation for seamless HubSpot CRM integration, enabling AI assistants to interact with your HubSpot data.
This MCP server provides a comprehensive set of tools for interacting with the HubSpot CRM API, allowing AI assistants to:
# 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 build
The server requires a HubSpot API access token. You can obtain one by:
You can provide the token in two ways:
As an environment variable:
HUBSPOT_ACCESS_TOKEN=your-access-token
As 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-token
# 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.js
The SSE server uses the mcp-proxy-auth package for authentication. To implement authentication:
Install the package:
npm install mcp-proxy-auth
Set the AUTH_SERVER_URL
environment variable to point to your API key verification endpoint:
export AUTH_SERVER_URL=https://your-auth-server.com/verify
Run the SSE server with authentication:
npx mcp-proxy-auth node dist/index.js
The SSE URL will be available at:
localhost:8080/sse?apiKey=apikey
Replace apikey
with your actual API key for authentication.
The mcp-proxy-auth
package acts as a proxy that:
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.
The server exposes the following powerful HubSpot integration tools:
hubspot_create_contact
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.{ "firstname": "John", "lastname": "Doe", "email": "[email protected]", "properties": { "company": "Acme Inc", "phone": "555-123-4567", "jobtitle": "Software Engineer" } }
hubspot_create_company
name
(string, required): Company nameproperties
(object, optional): Additional company properties{ "name": "Acme Corporation", "properties": { "domain": "acme.com", "industry": "Technology", "phone": "555-987-6543", "city": "San Francisco", "state": "CA" } }
hubspot_get_company_activity
company_id
(string, required): HubSpot company IDhubspot_get_recent_engagements
days
(number, optional, default: 7): Number of days to look backlimit
(number, optional, default: 50): Maximum number of engagements to returnhubspot_get_active_companies
limit
(number, optional, default: 10): Maximum number of companies to returnhubspot_get_active_contacts
limit
(number, optional, default: 10): Maximum number of contacts to returnhubspot_update_contact
contact_id
(string, required): HubSpot contact ID to updateproperties
(object, required): Contact properties to update{ "contact_id": "12345", "properties": { "email": "[email protected]", "phone": "555-987-6543", "jobtitle": "Senior Software Engineer" } }
hubspot_update_company
company_id
(string, required): HubSpot company ID to updateproperties
(object, required): Company properties to update{ "company_id": "67890", "properties": { "domain": "updated-domain.com", "phone": "555-123-4567", "industry": "Software", "city": "New York", "state": "NY" } }
The server is designed to be easily extensible. To add new HubSpot API capabilities:
HubSpotClient
class in src/hubspot-client.ts
setupToolHandlers
method in src/index.ts
npm run build
This project is licensed under the MIT License - see the LICENSE file for details.
HubSpot, CRM, Model Context Protocol, MCP, AI Assistant, TypeScript, API Integration, HubSpot API, CRM Integration, Contact Management, Company Management, Engagement Tracking, AI Tools