HubSpot MCP Server
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.
Components
Tools
The server implements several tools organized by category:
Contact Tools
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 criteria
Deal Tools
get_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 deal
Engagement Tools
get_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 meeting
Resources
hubspot://contacts/schema: Information about the contact object structurehubspot://deals/schema: Information about the deal object structure
Configuration
The server requires the following configuration:
HUBSPOT_API_KEY(required): Your HubSpot API key from a private app with appropriate permissions
Quickstart
Install
Claude Desktop
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
Development Configuration
"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.
Development
Building and Publishing
To prepare the package for distribution:
- Sync dependencies and update lockfile:
uv sync
- Build package distributions:
uv build
This will create source and wheel distributions in the dist/ directory.
- Publish to PyPI:
uv publish
Note: You'll need to set PyPI credentials via environment variables or command flags:
- Token:
--tokenorUV_PUBLISH_TOKEN - Or username/password:
--username/UV_PUBLISH_USERNAMEand--password/UV_PUBLISH_PASSWORD
Testing
Install test dependencies:
uv sync --extra test
Run tests:
# Run all tests
pytest
# Run with coverage
pytest --cov=server
Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly 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.
Technical Details
HubSpot API Integration
- API Version: v3
- Endpoints:
- Contacts:
/crm/v3/objects/contacts - Deals:
/crm/v3/objects/deals - Marketing:
/marketing/v3/campaigns - Analytics:
/analytics/v2 - Meetings:
/meetings/v1
- Contacts:
- Authentication: API Key in Bearer token
Getting a HubSpot API Key
You'll need a HubSpot API key to use this server. To get one:
- Create a HubSpot Developer account
- Create a private app with required permissions
- Use the generated API key
Metadata
Release files for hubspot-mcp-server 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hubspot_mcp_server-0.1.1.tar.gz | 15.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hubspot_mcp_server-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.6 kB
Release files / hubspot_mcp_server-0.1.1.tar.gz
| Download URL | hubspot_mcp_server-0.1.1.tar.gz |
|---|---|
| Size | 15.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61f08c229f68af651b2e75ab81b4dd318fe025e6ce4884cd966b038b375f49fd
|
|
BLAKE2b-256 checksum How to use checksums |
c8ec9238b2fbc39ad577467512cfe7a56f205e4c60407c3919ebde0cf0c1b827
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.24
|
Release files / hubspot_mcp_server-0.1.1-py3-none-any.whl
| Download URL | hubspot_mcp_server-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
24e44bdcb2f4ff3995f978eb80c8611a240c036a92f1a806ae809147295d6116
|
|
BLAKE2b-256 checksum How to use checksums |
8359d91ae99a5c8ee1ca243ba1c14ac0dad90ff519207400e2aede8d39c35016
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.24
|