This MCP server enables Claude to interact with the HubSpot CRM, allowing it to access and manipulate contact, deal, and company data, as well as analyze sales performance through the HubSpot API.
Before using the MCP server, you need to create a HubSpot Private App and obtain an API key:
crm.objects.contacts.read
crm.objects.contacts.write
crm.objects.deals.read
crm.objects.deals.write
crm.objects.companies.read
crm.objects.companies.write
crm.objects.owners.read
crm.objects.quotes.read
crm.objects.line_items.read
crm.objects.custom.read
crm.schemas.deals.read
crm.schemas.contacts.read
crm.schemas.companies.read
crm.schemas.custom.read
To use the MCP server with Claude Desktop, add the following to your claude_desktop_config.json
file:
{
"mcpServers": {
"hubspot": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-hubspot"],
"env": {
"HUBSPOT_API_KEY": "your-api-key-here"
}
}
}
}
{
"mcpServers": {
"hubspot": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "HUBSPOT_API_KEY", "mcp/hubspot"],
"env": {
"HUBSPOT_API_KEY": "your-api-key-here"
}
}
}
}
Search Contacts
hubspot_search_contacts
Parameters:
query
(required): Search query string (email, name, etc.)count
(optional, default: 10): Maximum number of contacts to returnpropertyList
(optional): List of properties to include in resultsGet Contact Details
hubspot_get_contact
Parameters:
contactId
(required): The ID of the contact to retrieveproperties
(optional): List of properties to include in resultsCreate Contact
hubspot_create_contact
Parameters:
properties
(required): Contact properties with at least email
fieldUpdate Contact
hubspot_update_contact
Parameters:
contactId
(required): The ID of the contact to updateproperties
(required): Contact properties to updateList Deals
hubspot_list_deals
Parameters:
limit
(optional, default: 10, max: 100): Maximum number of deals to returnafter
(optional): Pagination cursor for next pageproperties
(optional): List of properties to include in resultsGet Deal Details
hubspot_get_deal
Parameters:
dealId
(required): The ID of the deal to retrieveproperties
(optional): List of properties to include in resultsCreate Deal
hubspot_create_deal
Parameters:
properties
(required): Deal properties with at least dealname
fieldUpdate Deal
hubspot_update_deal
Parameters:
dealId
(required): The ID of the deal to updateproperties
(required): Deal properties to updateList Companies
hubspot_list_companies
Parameters:
limit
(optional, default: 10, max: 100): Maximum number of companies to returnafter
(optional): Pagination cursor for next pageproperties
(optional): List of properties to include in resultsGet Company Details
hubspot_get_company
Parameters:
companyId
(required): The ID of the company to retrieveproperties
(optional): List of properties to include in resultsSales Analytics
hubspot_get_sales_analytics
Parameters:
period
(required): Time period to group analytics by (daily, weekly, monthly, quarterly, yearly)startDate
(required): Start date for analysis in ISO format (YYYY-MM-DD)endDate
(optional): End date for analysis in ISO formatpipeline
(optional): Pipeline ID to filter bydealStage
(optional): Deal stage ID to filter bydealOwner
(optional): Deal owner ID to filter byDeal History
hubspot_get_deal_history
Parameters:
dealId
(required): The ID of the deal to get history forDeal Notes
hubspot_get_deal_notes
Parameters:
dealId
(required): The ID of the deal to get notes forlimit
(optional, default: 20): Maximum number of notes to returnafter
(optional): Pagination cursor for next page of resultsDeal Engagements
hubspot_get_engagements_by_deal
Parameters:
dealId
(required): The ID of the deal to get engagements fortypes
(optional): Types of engagements (CALL, EMAIL, MEETING, TASK, NOTE)limit
(optional, default: 20): Maximum number of engagements to returnafter
(optional): Pagination cursor for next page of resultsSales Performance
hubspot_get_sales_performance
Parameters:
period
(required): Time period to group data by (daily, weekly, monthly, quarterly, yearly)startDate
(required): Start date for analysis in ISO format (YYYY-MM-DD)endDate
(optional): End date for analysis in ISO formatownerIds
(optional): List of owner IDs to include in the analysispipeline
(optional): Pipeline ID to filter byPipeline Analytics
hubspot_get_pipeline_analytics
Parameters:
pipelineId
(required): The ID of the pipeline to analyzeperiod
(required): Time period to group analytics by (daily, weekly, monthly, quarterly, yearly)startDate
(required): Start date for analysis in ISO format (YYYY-MM-DD)endDate
(optional): End date for analysis in ISO formatForecast Analytics
hubspot_get_forecast_analytics
Parameters:
period
(required): Time period to group forecast data by (monthly, quarterly, yearly)numberOfPeriods
(optional, default: 3): Number of future periods to forecastpipeline
(optional): Pipeline ID to filter byIf you encounter errors when using the MCP server, verify that:
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.