Provides comprehensive CRM integration with tools for managing contacts, companies, and deals including full CRUD operations, search capabilities, relationship management, and access to live CRM data, pipelines, and property schemas.
HubSpot MCP Server
🚀 A complete Model Context Protocol (MCP) server for HubSpot CRM integration, implementing all 21 MCP protocol endpoints with multi-transport support (HTTP, Streamable HTTP, STDIO) and flexible port configuration.
✨ Features
- Complete MCP Protocol: All 21 endpoints (initialize, tools, resources, prompts, notifications, logging)
- Multi-Transport Support: HTTP JSON-RPC, Streamable HTTP (SSE), STDIO for process-based communication
- Comprehensive HubSpot Integration: 15+ tools for contacts, companies, deals with full CRUD operations
- Session Management: UUID-based sessions with timeout and rate limiting
- Production Ready: Health checks, metrics, structured logging, graceful shutdown
- Security Hardened: OWASP compliance, non-root execution, security headers
- Multi-Architecture: Docker images for AMD64 and ARM64 platforms
- Flexible Port Configuration: Configurable ports via build args and runtime environment variables
- Advanced Session Management: Cookie and header-based session persistence for HTTP requests
📦 Available Images
Registry | Image | Command |
---|---|---|
GitHub Container Registry | ghcr.io/sanketskasar/hubspot-mcp-server:latest | docker pull ghcr.io/sanketskasar/hubspot-mcp-server:latest |
Docker Hub | sanketskasar/hubspot-mcp-server:latest | docker pull sanketskasar/hubspot-mcp-server:latest |
🚀 Quick Start
Prerequisites
- Docker installed on your system
- HubSpot Private App Access Token (Setup Guide)
1. Run Container
GitHub Container Registry (Recommended):
Docker Hub:
Custom Port Configuration:
2. Verify Installation
🔧 Transport Protocols
HTTP Transport (Default)
Standard JSON-RPC 2.0 over HTTP:
Streamable HTTP Transport
Server-sent events for real-time updates:
STDIO Transport
Process-based communication:
⚙️ Configuration
Environment Variables
Docker Compose
Basic Configuration:
Custom Port Configuration:
🔧 Session Management
The server provides advanced session management for HTTP requests to maintain state across multiple API calls:
Session Creation
Sessions are automatically created on the first request and tracked via:
- X-Session-ID Header: Primary method for API clients
- mcp-session Cookie: Browser-friendly session persistence
- Request Body Parameter: Alternative session identification
Session Persistence Examples
Using Headers (Recommended for API clients):
Using Authorization Bearer (Alternative method):
Using Cookies (Browser-compatible):
Session Features
- Automatic Creation: Sessions created transparently on first request
- Multiple Persistence Methods: Headers, cookies, and body parameters
- aiohttp.ClientSession Compatible: Optimized for Python HTTP clients
- Authorization Bearer Support: Alternative session identification method
- Configurable Timeout: Sessions expire after
SESSION_TIMEOUT
seconds - Reconnection Support: SSE transport allows session reconnection
- Rate Limiting: Per-session rate limits for tools and resources
- Security: SameSite protection, configurable secure flag for HTTPS
🔑 HubSpot Setup
Step 1: Create Private App
- Go to HubSpot Settings → Integrations → Private Apps
- Click "Create a private app"
- Configure required scopes:
Scope | Purpose |
---|---|
crm.objects.contacts.read | Read contact information |
crm.objects.contacts.write | Create and update contacts |
crm.objects.companies.read | Read company information |
crm.objects.companies.write | Create and update companies |
crm.objects.deals.read | Read deal information |
crm.objects.deals.write | Create and update deals |
crm.objects.owners.read | Read owner/sales rep information |
Step 2: Generate Token
- Go to Auth tab
- Copy the Access Token (starts with
pat-...
) - ⚠️ Keep this token secure!
Step 3: Test Token
🛠️ Available Tools
The server implements 15+ HubSpot CRM tools through the MCP protocol:
Contact Management
Tool | Description | Parameters |
---|---|---|
get_contacts | Retrieve contacts with pagination | limit , properties , after |
create_contact | Create new contact | email (required), other properties |
update_contact | Update existing contact | id , properties |
search_contacts | Search contacts by query | query , properties , limit |
get_contact_by_email | Get contact by email | email |
Company Management
Tool | Description | Parameters |
---|---|---|
get_companies | Retrieve companies with pagination | limit , properties , after |
create_company | Create new company | name (required), other properties |
update_company | Update existing company | id , properties |
search_companies | Search companies by query | query , properties , limit |
Deal Management
Tool | Description | Parameters |
---|---|---|
get_deals | Retrieve deals with pagination | limit , properties , after |
create_deal | Create new deal | dealname (required), other properties |
update_deal | Update existing deal | id , properties |
search_deals | Search deals by query | query , properties , limit |
Relationship & Activity Tools
Tool | Description | Parameters |
---|---|---|
get_associations | Get object relationships | objectId , objectType , toObjectType |
get_engagement_history | Get activity timeline | objectId , objectType |
📊 Resources
8+ Live Resources Available:
hubspot://contacts
- Live contacts databasehubspot://companies
- Live companies databasehubspot://deals
- Live deals pipelinehubspot://properties/contacts
- Contact property schemahubspot://properties/companies
- Company property schemahubspot://properties/deals
- Deal property schemahubspot://pipelines/deals
- Deal pipeline configurationhubspot://owners
- Sales rep/owner information
💡 Prompts
5+ Ready-to-Use Prompts:
analyze_pipeline
- Deal pipeline analysis and optimizationcontact_research
- Deep contact and company researchlead_scoring
- Lead qualification and scoringemail_templates
- HubSpot email template generationmeeting_prep
- Pre-meeting research and preparation
📈 Monitoring & Health
Health Endpoints
Endpoint | Purpose | Response |
---|---|---|
GET /health | Basic health check | Health status and uptime |
GET /ready | Readiness probe | Application readiness |
GET /metrics | Prometheus metrics | Performance metrics |
GET /status | Detailed status | Comprehensive server status |
Example Usage
🔒 Security Features
- Non-root execution - Container runs as unprivileged user
- Security hardening - Read-only filesystem, dropped capabilities
- OWASP headers - Complete security header implementation
- Session management - UUID-based sessions with timeouts
- Rate limiting - Configurable per-session rate limits
- Input validation - Comprehensive parameter validation
🛠️ Development
Local Development
Command Line Options
📊 Performance
Resource Requirements
Environment | CPU | Memory | Concurrent Sessions |
---|---|---|---|
Minimum | 0.25 cores | 256MB | 10 |
Recommended | 0.5 cores | 512MB | 50 |
High Load | 1+ cores | 1GB+ | 100+ |
Monitoring
🚀 Building Multi-Architecture Images
🤝 Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Quick Start
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes and add tests
- Ensure all tests pass:
npm test
- Submit a pull request
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Related Resources
- Model Context Protocol - Official MCP specification
- HubSpot API Documentation - HubSpot CRM API
- MCP Protocol Specification - Technical MCP details
📋 Latest Updates - Version 1.0.0
🎉 Production Release Features
- ✅ Complete Multi-Transport Support: HTTP, Streamable HTTP (SSE), and STDIO protocols
- ✅ Flexible Port Configuration: Build-time and runtime port customization
- ✅ Enhanced Session Management: UUID-based sessions with comprehensive rate limiting
- ✅ Multi-Architecture Images: Native support for AMD64 and ARM64 platforms
- ✅ Production Hardening: OWASP security compliance and comprehensive monitoring
- ✅ Streamlined Codebase: Removed development components for production focus
🌍 Registry Availability
- GitHub Container Registry:
ghcr.io/sanketskasar/hubspot-mcp-server:latest
- Docker Hub:
sanketskasar/hubspot-mcp-server:latest
- Multi-Platform: Both registries support AMD64 and ARM64 architectures
🔧 Key Capabilities
- 21 MCP Protocol Endpoints: Complete compliance with MCP Protocol Version 2024-11-05
- aiohttp.ClientSession Support: Optimized session management for langchain_mcp_adapters
- 15+ HubSpot Tools: Full CRUD operations for contacts, companies, and deals
- 8+ Live Resources: Real-time access to HubSpot CRM data and schemas
- 5+ Ready-to-Use Prompts: Business intelligence and automation templates
- Advanced Monitoring: Health, readiness, metrics, and status endpoints
- Enterprise Security: Non-root execution, security headers, rate limiting
🎯 Built with ❤️ for the MCP ecosystem
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables comprehensive HubSpot CRM integration through the Model Context Protocol with 15+ tools for managing contacts, companies, and deals. Supports multiple transport protocols (HTTP, SSE, STDIO) with session management and real-time access to CRM data.
- ✨ Features
- 📦 Available Images
- 🚀 Quick Start
- 🔧 Transport Protocols
- ⚙️ Configuration
- 🔧 Session Management
- 🔑 HubSpot Setup
- 🛠️ Available Tools
- 📊 Resources
- 💡 Prompts
- 📈 Monitoring & Health
- 🔒 Security Features
- 🛠️ Development
- 📊 Performance
- 🚀 Building Multi-Architecture Images
- 🤝 Contributing
- 📜 License
- 🔗 Related Resources
- 📋 Latest Updates - Version 1.0.0
Related MCP Servers
- AsecurityAlicenseAqualityEnables AI models to interact with HubSpot CRM data and operations through a standardized interface, supporting contact and company management.Last updated -103MIT License
- -securityAlicense-qualityA server that enables AI models to interact with HubSpot CRM data and operations through a standardized interface, supporting contact and company management with multi-user token-based authentication.Last updated -MIT License
- AsecurityAlicenseAqualityA Model Context Protocol implementation for the HubSpot API that provides a standardized interface for accessing and managing CRM data, including companies, contacts, deals, and other objects with comprehensive CRUD operations and association management.Last updated -1320MIT License
- -securityAlicense-qualityA Model Context Protocol server that provides tools for interacting with HubSpot CRM, allowing users to create, update, delete, and fetch summary records stored as Note engagements in HubSpot.Last updated -MIT License