Isaac Raja/hubspot-mcp-server
Built by Metorial, the integration platform for agentic AI.
Isaac Raja/hubspot-mcp-server
Server Summary
Retrieve contact by HubSpot ID
Find contact by email address
Search for contacts based on parameters
Interact with HubSpot deals
Manage engagement data
A Model Context Protocol server that provides access to the HubSpot API. This server enables LLMs to interact with HubSpot contacts, deals, and engagement data. A Model Context Protocol server that provides access to the HubSpot API. This server enables LLMs to interact with HubSpot contacts, deals, and engagements.
The server implements several tools for HubSpot interaction:
get_contact_by_id
: Retrieve a contact by their HubSpot ID (supports both string and integer IDs)get_contact_by_email
: Find a contact by their email addresssearch_contacts
: Search for contacts based on property criteriaget_deal_by_id
: Retrieve a deal by its HubSpot IDget_contact_deals
: Get all deals associated with a contactget_deal_contacts
: Get all contacts associated with a dealget_latest_marketing_campaign
: Get information about recent marketing campaignsget_campaign_engagement
: Get contacts who engaged with a specific campaignget_page_visits
: Get contacts who visited a specific pageget_contact_analytics
: Get analytics data for a specific contactget_scheduled_meetings
: Get meetings scheduled within a time periodget_meeting_details
: Get detailed information about a specific meetinghubspot://contacts/schema
: Information about the contact object structurehubspot://deals/schema
: Information about the deal object structureThe server requires the following environment variables:
HUBSPOT_API_KEY
(required): Your HubSpot API keyuv pip install hubspot-mcp-server
Add this to your Claude Desktop configuration file:
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
To install HubSpot MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @isaacraja/hubspot-mcp-server --client claude
"mcpServers": {
"hubspot": {
"command": "uv",
"env": {
"HUBSPOT_API_KEY": "your_hubspot_api_key"
},
"args": [
"--directory",
"{{PATH_TO_REPO}}",
"run",
"hubspot-mcp-server"
]
}
}
Replace {{PATH_TO_REPO}}
with the path to your cloned repository and your_hubspot_api_key
with your actual HubSpot API key.
{
"mcpServers": {
"hubspot-mcp-server": {
"command": "uv",
"env": {
"HUBSPOT_API_KEY": "your-api-key"
},
"args": [
"--directory",
"{{PATH_TO_REPO}}/src/hubspot_mcp_server",
"run",
"server.py"
]
}
}
}
{
"mcpServers": {
"hubspot-mcp-server": {
"command": "uvx",
"env": {
"HUBSPOT_API_KEY": "your-api-key"
},
"args": [
"hubspot-mcp-server"
]
}
}
}
Replace your-api-key
with your HubSpot API key.
uv sync
uv build
This will create source and wheel distributions in the dist/
directory.
uv publish
Note: You'll need to set PyPI credentials via environment variables or command flags:
--token
or UV_PUBLISH_TOKEN
--username
/UV_PUBLISH_USERNAME
and --password
/UV_PUBLISH_PASSWORD
Install test dependencies:
uv sync --extra test
Run tests:
# Run all tests
pytest
# Run with coverage
pytest --cov=server
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we recommend using the MCP Inspector.
You can launch the MCP Inspector via npm
with this command:
npx @modelcontextprotocol/inspector uv --directory {{PATH_TO_REPO}} run hubspot-mcp-server
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
MIT