概要
What is HubSpot MCP Server?
HubSpot MCP Server is a Model Context Protocol (MCP) server implementation that enables AI assistants to interact with HubSpot CRM data. It provides tools for creating and managing contacts and companies, retrieving company activity histories, accessing recent engagements, and fetching lists of active contacts and companies.
How to use HubSpot MCP Server?
Clone the repository, install dependencies with npm install, and build with npm build. Configure a HubSpot API access token as an environment variable (HUBSPOT_ACCESS_TOKEN) or pass it as a command-line argument (--access-token). Start the server with npm start. For an authenticated SSE server, use npx mcp-proxy-auth node dist/index.js and set the AUTH_SERVER_URL environment variable.
Key features of HubSpot MCP Server
- Create contacts and companies with duplicate checking
- Retrieve comprehensive company activity and engagement timelines
- Get recent engagement data across all contacts and companies
- Fetch lists of recently active companies and contacts
- Update existing contacts and companies by ID
Use cases of HubSpot MCP Server
- AI assistants creating and managing HubSpot contacts and companies via natural language
- Retrieving detailed activity history for a specific company
- Accessing recent engagement data (emails, calls, meetings, notes, tasks) across the entire HubSpot instance
- Getting lists of recently modified companies and contacts for CRM monitoring
FAQ from HubSpot MCP Server
What does the HubSpot MCP Server do?
It provides a set of MCP tools that allow AI assistants to perform HubSpot CRM operations such as creating/updating contacts and companies, retrieving activity histories, and accessing recent engagements.
How do I obtain a HubSpot API access token?
Go to your HubSpot Developer Account, create a private app, and select the necessary scopes (contacts, companies, engagements). Copy the generated access token.
How can I provide the access token to the server?
Set the token as the HUBSPOT_ACCESS_TOKEN environment variable in a .env file, or pass it as a command-line argument with --access-token=your-token when starting the server.
How do I implement authentication for the SSE server?
Install the mcp-proxy-auth package, set the AUTH_SERVER_URL environment variable to your API key verification endpoint, and run npx mcp-proxy-auth node dist/index.js. The SSE URL will be localhost:8080/sse?apiKey=apikey.
How can I extend the server with new HubSpot API capabilities?
Add new methods to the HubSpotClient class in src/hubspot-client.ts, register new tools in the setupToolHandlers method in src/index.ts, and rebuild the project with npm run build.