HubSpot MCP Server
Mirror of
MCP-Mirror
README
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
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 build
Configuration
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-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
Usage
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.js
Implementing 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-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:
- 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
HubSpotClient
class insrc/hubspot-client.ts
- Register new tools in the
setupToolHandlers
method insrc/index.ts
- Rebuild 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
推荐服务器
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
MCP Package Docs Server
促进大型语言模型高效访问和获取 Go、Python 和 NPM 包的结构化文档,通过多语言支持和性能优化来增强软件开发。
Claude Code MCP
一个实现了 Claude Code 作为模型上下文协议(Model Context Protocol, MCP)服务器的方案,它可以通过标准化的 MCP 接口来使用 Claude 的软件工程能力(代码生成、编辑、审查和文件操作)。
@kazuph/mcp-taskmanager
用于任务管理的模型上下文协议服务器。它允许 Claude Desktop(或任何 MCP 客户端)在基于队列的系统中管理和执行任务。
mermaid-mcp-server
一个模型上下文协议 (MCP) 服务器,用于将 Mermaid 图表转换为 PNG 图像。
Jira-Context-MCP
MCP 服务器向 AI 编码助手(如 Cursor)提供 Jira 工单信息。

Linear MCP Server
一个模型上下文协议(Model Context Protocol)服务器,它与 Linear 的问题跟踪系统集成,允许大型语言模型(LLM)通过自然语言交互来创建、更新、搜索和评论 Linear 问题。

Sequential Thinking MCP Server
这个服务器通过将复杂问题分解为顺序步骤来促进结构化的问题解决,支持修订,并通过完整的 MCP 集成来实现多条解决方案路径。
Curri MCP Server
通过管理文本笔记、提供笔记创建工具以及使用结构化提示生成摘要,从而实现与 Curri API 的交互。