HubSpot MCP server

Enables detailed interactions with HubSpot CRM data by providing comprehensive tools for searching contacts, managing sales pipelines, retrieving analytics, and performing advanced reporting through direct API integration.
Back to servers
Provider
Scopious Digital
Release date
Mar 27, 2025
Language
TypeScript
Stats
9 stars

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.

Installation

Creating a HubSpot Private App

Before using the MCP server, you need to create a HubSpot Private App and obtain an API key:

  1. Go to your HubSpot account
  2. Navigate to Settings → Account Setup → Integrations → Private Apps
  3. Click "Create private app"
  4. Name your app and set the following required scopes:
    • 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
  5. Create the app and copy your private app token

Setting Up with Claude Desktop

To use the MCP server with Claude Desktop, add the following to your claude_desktop_config.json file:

Using npx

{
  "mcpServers": {
    "hubspot": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-hubspot"],
      "env": {
        "HUBSPOT_API_KEY": "your-api-key-here"
      }
    }
  }
}

Using Docker

{
  "mcpServers": {
    "hubspot": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-e", "HUBSPOT_API_KEY", "mcp/hubspot"],
      "env": {
        "HUBSPOT_API_KEY": "your-api-key-here"
      }
    }
  }
}

Available Tools and Usage

Core CRM Tools

Contact Management

  • Search Contacts

    hubspot_search_contacts
    

    Parameters:

    • query (required): Search query string (email, name, etc.)
    • count (optional, default: 10): Maximum number of contacts to return
    • propertyList (optional): List of properties to include in results
  • Get Contact Details

    hubspot_get_contact
    

    Parameters:

    • contactId (required): The ID of the contact to retrieve
    • properties (optional): List of properties to include in results
  • Create Contact

    hubspot_create_contact
    

    Parameters:

    • properties (required): Contact properties with at least email field
  • Update Contact

    hubspot_update_contact
    

    Parameters:

    • contactId (required): The ID of the contact to update
    • properties (required): Contact properties to update

Deal Management

  • List Deals

    hubspot_list_deals
    

    Parameters:

    • limit (optional, default: 10, max: 100): Maximum number of deals to return
    • after (optional): Pagination cursor for next page
    • properties (optional): List of properties to include in results
  • Get Deal Details

    hubspot_get_deal
    

    Parameters:

    • dealId (required): The ID of the deal to retrieve
    • properties (optional): List of properties to include in results
  • Create Deal

    hubspot_create_deal
    

    Parameters:

    • properties (required): Deal properties with at least dealname field
  • Update Deal

    hubspot_update_deal
    

    Parameters:

    • dealId (required): The ID of the deal to update
    • properties (required): Deal properties to update

Company Management

  • List Companies

    hubspot_list_companies
    

    Parameters:

    • limit (optional, default: 10, max: 100): Maximum number of companies to return
    • after (optional): Pagination cursor for next page
    • properties (optional): List of properties to include in results
  • Get Company Details

    hubspot_get_company
    

    Parameters:

    • companyId (required): The ID of the company to retrieve
    • properties (optional): List of properties to include in results

Sales Analytics Tools

  • Sales 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 format
    • pipeline (optional): Pipeline ID to filter by
    • dealStage (optional): Deal stage ID to filter by
    • dealOwner (optional): Deal owner ID to filter by
  • Deal History

    hubspot_get_deal_history
    

    Parameters:

    • dealId (required): The ID of the deal to get history for
  • Deal Notes

    hubspot_get_deal_notes
    

    Parameters:

    • dealId (required): The ID of the deal to get notes for
    • limit (optional, default: 20): Maximum number of notes to return
    • after (optional): Pagination cursor for next page of results
  • Deal Engagements

    hubspot_get_engagements_by_deal
    

    Parameters:

    • dealId (required): The ID of the deal to get engagements for
    • types (optional): Types of engagements (CALL, EMAIL, MEETING, TASK, NOTE)
    • limit (optional, default: 20): Maximum number of engagements to return
    • after (optional): Pagination cursor for next page of results
  • Sales 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 format
    • ownerIds (optional): List of owner IDs to include in the analysis
    • pipeline (optional): Pipeline ID to filter by
  • Pipeline Analytics

    hubspot_get_pipeline_analytics
    

    Parameters:

    • pipelineId (required): The ID of the pipeline to analyze
    • 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 format
  • Forecast 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 forecast
    • pipeline (optional): Pipeline ID to filter by

Troubleshooting

If you encounter errors when using the MCP server, verify that:

  1. All required scopes are added to your HubSpot private app
  2. The API key is correctly copied to your configuration
  3. Your HubSpot plan includes access to the APIs you're trying to use

How to add this MCP server to Cursor

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.

Adding an MCP server to Cursor globally

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"
            ]
        }
    }
}

Adding an MCP server to a project

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.

How to use the MCP server

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.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later