# HubSpot Analytics MCP

> HubSpot Analytics MCP Server connects your AI agent directly to HubSpot's full suite of reporting data. Check web traffic metrics, track campaign performance (opens, clicks, bounces), and view activity timelines for any contact or deal. It lets you query all your marketing and sales data using plain conversation, eliminating the need to switch between HubSpot tabs and BI tools.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** web-analytics, campaign-tracking, marketing-reports, data-visualization, inbound-marketing

## Description

HubSpot Analytics MCP Server connects your AI agent straight to HubSpot's reporting data. It lets you query all your marketing and sales data using plain conversation, so you never gotta jump between tabs or BI tools. **`hs_web_analytics`** gets you website traffic analytics, showing total sessions, page views, new contacts, and traffic sources for any time period. **`hs_email_analytics`** audits email campaign performance by grabbing delivery and engagement data for a specific send, including open rate, click count, and bounce count. **`hs_list_events`** lists all activity history—like page views, form submissions, and calls—for any contact, company, or deal. You can list custom analytics reports set up in HubSpot using **`hs_list_reports`**, which returns the report's name, type, and description. **`hs_analytics_views`** lets you scope your analytics data by listing available configurations, helping you filter web traffic and reports precisely.

## Tools

### hs_analytics_views
Lists available analytics views in the HubSpot account for filtering web traffic and reporting data.

### hs_email_analytics
Gets delivery and engagement analytics for a specific HubSpot marketing email: opens, clicks, bounces, and unsubscribes.

### hs_list_events
Lists all activity history (page views, form submissions, calls) for a specific HubSpot CRM record.

### hs_list_reports
Lists custom analytics reports configured in HubSpot with their name, type, and description.

### hs_web_analytics
Gets website traffic analytics from HubSpot, including sessions, page views, new contacts, and traffic sources over time.

## Prompt Examples

**Prompt:** 
```
Search for contacts at Acme Corp
```

**Response:** 
```
👥 **Contacts at Acme Corp**
| Name | Email | Phone | Lifecycle |
|---|---|---|---|
| John Smith | john@acme.com | +1 555-0123 | Customer |
| Sarah Chen | sarah@acme.com | +1 555-0456 | Lead |
```

**Prompt:** 
```
Create a deal: Enterprise Package $50,000
```

**Response:** 
```
✅ **Deal Created!**
- Name: Enterprise Package
- Amount: $50,000
- Pipeline: Sales Pipeline
- Stage: Appointment Scheduled
```

**Prompt:** 
```
Show me the deal pipeline stages
```

**Response:** 
```
📊 **Sales Pipeline**
1. Appointment Scheduled
2. Qualified to Buy
3. Presentation Scheduled
4. Decision Maker Bought-In
5. Contract Sent
6. Closed Won ✅
7. Closed Lost ❌
```

## Capabilities

### Check website traffic metrics
Retrieves total sessions, page views, new contacts, and traffic sources over a chosen time frame using `hs_web_analytics`.

### Audit email campaign performance
Gets delivery and engagement data for a specific email send, including open rate, click count, and bounce count via `hs_email_analytics`.

### View full activity history
Lists all timeline events—like page views, form submissions, and calls—for a specific contact, company, or deal using `hs_list_events`.

### List custom reports
Retrieves the name, type, and description of custom analytics reports set up in the HubSpot account using `hs_list_reports`.

### Filter analytics data by view
Lists available, named configurations that scope analytics data, allowing for precise filtering of web traffic and reports using `hs_analytics_views`.

## Use Cases

### Pinpointing a Cold Lead's Interest
A sales rep needs to qualify a lead but doesn't know what they've done. They ask their agent to run `hs_list_events` on the contact. The agent returns a timeline showing the lead viewed the pricing page three times and submitted a form, allowing the rep to tailor the conversation immediately.

### Measuring Campaign ROI
A marketing manager wants to know if the last email campaign worked. They ask the agent to check `hs_email_analytics`. The agent immediately provides the open rate, click rate, and bounce count, proving ROI without needing to export and chart a spreadsheet.

### Troubleshooting Traffic Drop-Offs
Traffic dropped last month. The ops team asks the agent to run `hs_web_analytics` over the last 90 days. The agent shows a clear drop in sessions correlated with a change in traffic source, helping the team immediately identify the problem area.

### Auditing a Deal's History
A manager needs a quick snapshot of a deal's status before a meeting. They ask the agent to list the pipeline stages and check `hs_list_events` for that deal. They get the full history, seeing who created the deal and when key documents were attached.

## Benefits

- See the full journey of a prospect. Instead of checking a separate tab for activity, the `hs_list_events` tool shows every page view, form submission, and call history on a contact or deal.
- Audit campaign performance instantly. Use `hs_email_analytics` to get hard numbers on open rates, click counts, and bounces for any specific marketing email without manual report generation.
- Track lead generation sources. `hs_web_analytics` gives you sessions, page views, and new contact counts, letting you see exactly where your website traffic is coming from over time.
- Manage the entire sales lifecycle. The underlying CRM tools let you search, create, and manage deals and contacts, keeping all that data accessible through conversation.
- Understand reporting scope. The `hs_analytics_views` tool lists available report scopes, ensuring your queries are filtered correctly and your data is accurate.
- Find required reports quickly. `hs_list_reports` lists all custom analytics reports in HubSpot, so you don't waste time hunting for the right dashboard.

## How It Works

The bottom line is, your AI client acts as the interface to HubSpot's data layer, running complex reports and queries without you touching the native UI.

1. Your AI client sends a natural language request (e.g., 'What was the open rate for the last campaign?').
2. The MCP Server identifies the need for analytics data and invokes the relevant tool (e.g., `hs_email_analytics`).
3. The tool executes the query against HubSpot and returns structured data (e.g., JSON) to your AI client for immediate display.

## Frequently Asked Questions

**How does the HubSpot Analytics MCP Server handle web traffic data using hs_web_analytics?**
It retrieves metrics like total sessions, pageviews, new contacts, and traffic sources. You can specify the report view, period (daily, weekly, monthly), and date range to narrow down the traffic data.

**Can I check email performance using the hs_email_analytics tool?**
Yes. This tool gets delivery and engagement analytics for a specific marketing email. It returns opens, clicks, bounces, and unsubscribes.

**What is the purpose of hs_list_events for HubSpot analytics?**
This tool lists all activity history for a specific CRM record (contact, company, deal). It shows everything from page views to form submissions, giving a complete activity timeline.

**How do I find available reports with hs_list_reports?**
You use this tool to list all custom analytics reports configured in HubSpot. It returns the report's name, type, and description so you know which report to query.

**Does hs_analytics_views help with HubSpot reporting?**
Yes. This tool lists available analytics views, which are configured scopes that help filter your web traffic and reporting data accurately.

**How do I check for available report scopes using the hs_analytics_views tool?**
The `hs_analytics_views` tool lists available reporting scopes. This helps you narrow down web traffic and reporting data by providing specific view IDs for filtered analytics queries.

**What information does the hs_web_analytics tool return regarding website performance?**
It returns core web metrics like total sessions, pageviews, new contacts, and bounce rate. You can specify time ranges and view types (totals, daily, weekly, monthly) to track traffic trends.

**When should I use the hs_list_events tool for tracking activity history?**
Use `hs_list_events` when you need a complete activity timeline. It pulls all interaction history—page views, form submissions, calls, etc.—for a specific contact, company, or deal record.

**What HubSpot data can I access?**
Contacts, Companies, Deals, Tickets, Notes, Owners, and Pipelines. All data respects your HubSpot permissions.

**Can I create and update records?**
Yes! Create contacts, deals, tickets, and notes. All through natural conversation.

**How does authentication work?**
Uses a HubSpot Private App token (Bearer). Create a Private App in Settings > Integrations > Private Apps, copy the token, and paste it.