# HubSpot MCP Server

A Model Context Protocol (MCP) server for integrating with HubSpot CRM to manage deals, companies, and email campaigns.

## Features

- **Deals Management**: Query and analyze deal data
- **Companies Management**: Access company information and engagement data
- **Email Campaigns**: Track email campaign performance and metrics
- **OAuth Authentication**: Secure authentication using CLIENT_ID and CLIENT_SECRET

## Installation

```bash
npm install
```

## Development

```bash
npm run dev
```

## Build

```bash
npm run build
```

## Environment Variables

Create a `.env` file with the following variables:

```env
HUBSPOT_CLIENT_ID=your_client_id
HUBSPOT_CLIENT_SECRET=your_client_secret
HUBSPOT_REDIRECT_URI=your_redirect_uri
HUBSPOT_SCOPE=your_required_scopes
```

## Usage

The server provides tools for:

1. **Top Deals Analysis**: Get the top three deals won in 2025 with AOT contacts
2. **Deal Ownership**: Find deals owned by specific users in Closed Won stage
3. **Company Engagement**: Identify high-potential prospects with email engagement
4. **Campaign Metrics**: Track email campaign open rates month by month

## API Endpoints

- `/deals` - Deal management operations
- `/companies` - Company data and engagement tracking
- `/email-campaigns` - Email campaign performance metrics