home / mcp / hubspot mcp server
hubspot mcp server
Configuration
View docs{
"mcpServers": {
"lkm1developer-hubspot-mcp-server": {
"url": "http://localhost:8080/sse?apiKey=apikey",
"headers": {
"AUTH_SERVER_URL": "https://your-auth-server.com/verify",
"HUBSPOT_ACCESS_TOKEN": "your-access-token"
}
}
}
}You connect your AI assistant to HubSpot data using this MCP server, enabling you to create, read, and update contacts and companies, retrieve engagements, and access activity histories directly from your assistant. It provides secure token-based authentication and an extensible design to grow with your HubSpot needs.
Once the MCP server is running, you can issue natural language commands through your MCP client to create or update HubSpot records, fetch company activity, pull recent engagements, and retrieve lists of active contacts and companies. Use the HTTP endpoint when you want a remote connection to the MCP server, or use the local stdio configuration to run the server directly from your environment. Authentication is handled via a HubSpot access token and an optional API-key verification step for the SSE endpoint.
# 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 buildYou must provide a HubSpot API access token to enable API calls. Obtain a token by creating a private app in your HubSpot Developer account with the required scopes (contacts, companies, engagements). You can supply the token in two ways. Set an environment variable HUBSPOT_ACCESS_TOKEN with your token, or pass the token as a command-line argument when starting the server.
# Environment variable (preferred in development)
HUBSPOT_ACCESS_TOKEN=your-access-token
# Start the server with the token via CLI
npm start -- --access-token=your-access-token# Start the server with the default configuration
npm start
# Start the server with a specific access token
npm start -- --access-token=your-access-token
# Run the SSE server with authentication (if you enable the proxy Auth flow)
npx mcp-proxy-auth node dist/index.jsTo enable authenticated SSE connections, configure the authentication endpoint and run the proxy helper. The proxy validates incoming API keys before allowing access to the SSE endpoint, which ensures only authorized clients can stream HubSpot data.
# Example environment for authentication proxy
export AUTH_SERVER_URL=https://your-auth-server.com/verify
# Run the proxy-authenticated SSE server
npx mcp-proxy-auth node dist/index.js
# SSE endpoint (authenticated)
http://localhost:8080/sse?apiKey=apikeyThe server exposes a set of HubSpot capabilities you can invoke from your MCP client, including creating and updating contacts and companies, retrieving company activity, and listing recent engagements and active records.
Create a new HubSpot contact with optional duplicate checking and properties such as company, phone, and job title.
Create a new HubSpot company with optional properties like domain, industry, phone, city, and state.
Retrieve a comprehensive activity history for a specific HubSpot company, including emails, calls, meetings, notes, and tasks.
Fetch recent engagement activities across contacts and companies with optional days look-back and limit.
List the most recently active companies sorted by last modified date.
List the most recently active contacts sorted by last modified date.
Update an existing HubSpot contact by ID with new properties, ignoring if the contact does not exist.
Update an existing HubSpot company by ID with new properties, ignoring if the company does not exist.