HubSpot Operations Hub MCP Server
Create a powerful Model Context Protocol (MCP) server for HubSpot Operations Hub in minutes with our AI Gateway. This guide walks you through setting up seamless revenue operations integration with enterprise-grade security and instant OAuth authentication.
About HubSpot Operations Hub API
HubSpot Operations Hub is designed to help operations teams sync, clean, and curate customer data at scale. The Operations Hub API enables programmatic access to data quality tools, sync capabilities, and programmable automation features.
Key Capabilities
- Data Sync: Bi-directional data synchronization
- Data Quality: Automated data cleaning and validation
- Programmable Automation: Custom-coded workflow actions
- Custom Properties: Extended CRM data modeling
- Datasets: Advanced reporting data sources
- Webhooks: Real-time data streaming
- Data Pipelines: ETL workflow management
- Field Mappings: Cross-system data mapping
API Features
- REST API v3: Modern RESTful interface
- GraphQL API: Flexible data queries
- Webhooks v3: Event-driven integrations
- OAuth 2.0: Secure authentication
- Rate Limiting: 100-500 requests/10 seconds
- Batch Operations: Bulk data processing
- Change Tracking: Data audit trails
- API Versioning: Stable endpoints
What You Can Do with HubSpot Operations Hub MCP Server
The MCP server transforms HubSpot Operations Hub's API into a natural language interface, enabling AI agents to:
Data Synchronization
-
Sync Operations
- "Sync all contact data from Salesforce"
- "Set up bi-directional sync with database"
- "Map custom fields between systems"
- "Schedule hourly data synchronization"
-
Conflict Resolution
- "Show sync conflicts from last 24 hours"
- "Resolve duplicate contact records"
- "Merge conflicting field values"
- "Set priority rules for data sources"
-
Sync Monitoring
- "Check sync job status"
- "Show failed sync operations"
- "Get sync performance metrics"
- "Alert on sync failures"
Data Quality Management
-
Data Cleaning
- "Standardize phone number formats"
- "Clean up duplicate companies"
- "Fix inconsistent country names"
- "Normalize job titles"
-
Validation Rules
- "Create email validation rule"
- "Set required fields for deals"
- "Enforce data format standards"
- "Block invalid data entry"
-
Data Enrichment
- "Enrich contacts with company data"
- "Add industry classifications"
- "Append missing postal codes"
- "Update timezone information"
Programmable Automation
-
Custom Actions
- "Create custom workflow action for lead scoring"
- "Build API integration workflow step"
- "Add custom code for data transformation"
- "Deploy serverless function"
-
Workflow Extensions
- "Add custom trigger for workflow"
- "Create conditional branching logic"
- "Build custom delay action"
- "Implement retry logic"
-
Data Operations
- "Calculate custom metrics"
- "Transform data formats"
- "Execute complex calculations"
- "Process webhook payloads"
Custom Properties & Objects
-
Property Management
- "Create custom calculation property"
- "Add multi-select dropdown field"
- "Set up dependent properties"
- "Create property groups"
-
Object Configuration
- "Define custom object schema"
- "Set up object associations"
- "Create custom object pipelines"
- "Configure object permissions"
-
Field Mappings
- "Map Salesforce fields to HubSpot"
- "Create field transformation rules"
- "Set up value mappings"
- "Configure default values"
Advanced Reporting
-
Dataset Creation
- "Build custom dataset for RevOps metrics"
- "Join multiple data sources"
- "Create calculated columns"
- "Set up data filters"
-
Report Building
- "Create pipeline velocity report"
- "Build data quality dashboard"
- "Generate sync status report"
- "Design executive scorecard"
-
Data Export
- "Export dataset to warehouse"
- "Schedule report delivery"
- "Create API endpoint for BI tool"
- "Set up real-time data stream"
Integration Management
-
Webhook Configuration
- "Set up webhook for deal updates"
- "Configure retry policies"
- "Add webhook authentication"
- "Monitor webhook health"
-
API Integration
- "Connect external database"
- "Set up OAuth connection"
- "Configure API rate limits"
- "Map API responses"
-
Data Pipeline
- "Create ETL pipeline"
- "Set up data transformation"
- "Configure error handling"
- "Monitor pipeline performance"
Prerequisites
- Access to Cequence AI Gateway
- HubSpot Operations Hub Professional or Enterprise
- Super Admin permissions in HubSpot
- OAuth app creation capabilities
Step 1: Create HubSpot App
1.1 Access HubSpot App Dashboard
- Log in to your HubSpot account
- Navigate to Settings Integrations Private Apps
- Click Create a private app
1.2 Configure App Settings
-
Basic Info:
- Name: "AI Gateway Operations Hub MCP"
- Description: "MCP server for revenue operations automation"
-
Scopes:
- Enable Operations Hub specific scopes
- Add data sync permissions
- Include automation scopes
1.3 Set OAuth Configuration
-
Redirect URLs:
https://auth.aigateway.cequence.ai/v1/outbound/oauth/callback
-
Scopes: Select based on needs (see scopes section)
1.4 Get Credentials
- Copy Client ID
- Copy Client Secret
- Note App ID
Step 2-4: Standard Setup
Follow standard steps to access AI Gateway, find HubSpot Operations Hub API, and create MCP server.
Step 5: Configure API Endpoints
- Base URL:
https://api.hubapi.com
- Select Operations Hub endpoints:
- Data sync endpoints
- Custom object endpoints
- Automation endpoints
- Property endpoints
- Click Next
Step 6: MCP Server Configuration
- Name: "HubSpot Operations Hub"
- Description: "Revenue operations and data management"
- Configure production mode
- Click Next
Step 7: Configure Authentication
- Authentication Type: OAuth 2.0
- Authorization URL:
https://app.hubspot.com/oauth/authorize
- Token URL:
https://api.hubapi.com/oauth/v1/token
- Enter Client ID and Secret
- Select required scopes
Available HubSpot Operations Hub OAuth Scopes
Data Sync & Integration
-
crm.objects.custom.read
/crm.objects.custom.write
- Access custom objects
- Create and modify schemas
- Manage object records
- Configure associations
-
crm.schemas.custom.read
/crm.schemas.custom.write
- Define object schemas
- Create custom properties
- Manage property groups
- Set validation rules
Automation & Workflows
-
automation
- Access workflow APIs
- Create custom actions
- Manage workflow enrollment
- Execute workflow steps
-
webhooks
- Configure webhooks
- Manage subscriptions
- Access webhook logs
- Handle webhook events
Data Management
-
crm.import
- Import data in bulk
- Map import fields
- Handle import errors
- Track import status
-
crm.export
- Export CRM data
- Create export jobs
- Download datasets
- Schedule exports
Integration Platform
integrations-sync
- Configure sync settings
- Map data fields
- Handle sync conflicts
- Monitor sync health
Recommended Scope Combinations
For Data Sync Operations:
crm.objects.contacts.read
crm.objects.contacts.write
crm.objects.companies.read
crm.objects.companies.write
crm.objects.custom.read
crm.objects.custom.write
crm.schemas.custom.read
crm.schemas.custom.write
integrations-sync
For Full Operations Hub:
crm.objects.custom.read
crm.objects.custom.write
crm.schemas.custom.read
crm.schemas.custom.write
automation
webhooks
crm.import
crm.export
integrations-sync
oauth
Step 8-10: Complete Setup
Configure security, choose deployment, and deploy.
Using Your HubSpot Operations Hub MCP Server
With Claude Desktop
{
"servers": {
"hubspot-operations": {
"url": "your-mcp-server-url",
"auth": {
"type": "oauth2",
"client_id": "your-client-id"
}
}
}
}
Natural Language Commands
- "Sync all Salesforce contacts to HubSpot"
- "Clean up duplicate company records"
- "Create custom lead scoring property"
- "Set up webhook for deal stage changes"
- "Build revenue operations dashboard"
API Integration Example
// Initialize MCP client
const mcpClient = new MCPClient({
serverUrl: 'your-mcp-server-url',
auth: {
type: 'oauth2',
token: 'access-token'
}
});
// Create custom object schema
const customObject = await mcpClient.hubspot.schemas.create({
name: 'revenue_metrics',
labels: {
singular: 'Revenue Metric',
plural: 'Revenue Metrics'
},
primaryDisplayProperty: 'metric_name',
properties: [
{
name: 'metric_name',
label: 'Metric Name',
type: 'string',
fieldType: 'text'
},
{
name: 'metric_value',
label: 'Value',
type: 'number',
fieldType: 'number'
},
{
name: 'calculation_date',
label: 'Calculation Date',
type: 'datetime',
fieldType: 'date'
}
]
});
// Set up data sync
const syncConfig = await mcpClient.hubspot.sync.configure({
source: 'salesforce',
destination: 'hubspot',
objectType: 'contacts',
fieldMappings: [
{
sourceField: 'FirstName',
destinationField: 'firstname'
},
{
sourceField: 'LastName',
destinationField: 'lastname'
},
{
sourceField: 'Email',
destinationField: 'email'
}
],
syncFrequency: 'hourly',
conflictResolution: 'source_wins'
});
// Create custom workflow action
const customAction = await mcpClient.hubspot.automation.createAction({
name: 'calculate_lead_score',
inputFields: [
{
name: 'contact_id',
type: 'string',
required: true
}
],
executeFn: async (inputs) => {
// Custom scoring logic
const contact = await getContact(inputs.contact_id);
const score = calculateScore(contact);
return {
outputs: {
lead_score: score,
score_tier: getScoreTier(score)
}
};
}
});
// Configure webhook
const webhook = await mcpClient.hubspot.webhooks.configure({
subscriptions: [
{
propertyName: 'dealstage',
objectType: 'deal',
eventType: 'propertyChange'
}
],
targetUrl: 'https://your-app.com/webhooks/hubspot',
authentication: {
type: 'apiKey',
apiKeyName: 'X-HubSpot-Signature',
apiKeyValue: 'your-webhook-key'
}
});
// Create data quality rule
const validationRule = await mcpClient.hubspot.dataQuality.createRule({
name: 'email_validation',
objectType: 'contact',
property: 'email',
validation: {
type: 'regex',
pattern: '^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$',
errorMessage: 'Please enter a valid email address'
},
enforcement: 'block_invalid'
});
Common Use Cases
Revenue Operations
- Data synchronization across systems
- Custom metrics and calculations
- Pipeline velocity tracking
- Revenue attribution modeling
Data Management
- Automated data cleaning
- Duplicate management
- Field standardization
- Data governance enforcement
Integration Orchestration
- Multi-system workflows
- Event-driven automation
- API orchestration
- Real-time data streaming
Custom Automation
- Complex workflow logic
- Custom scoring models
- Automated enrichment
- Intelligent routing
Security Best Practices
-
OAuth Security:
- Use minimal required scopes
- Rotate credentials regularly
- Monitor API usage
- Implement IP restrictions
-
Data Protection:
- Encrypt sensitive data
- Implement field-level security
- Audit data access
- Use secure webhooks
-
Integration Security:
- Validate webhook signatures
- Use secure connection methods
- Implement retry limits
- Monitor for anomalies
Troubleshooting
Common Issues
-
Sync Failures
- Check field mappings
- Verify data types
- Review validation rules
- Check API limits
-
Automation Errors
- Debug custom code
- Check execution logs
- Verify permissions
- Test error handling
-
Data Quality Issues
- Review validation rules
- Check transformation logic
- Verify source data
- Monitor error logs
Getting Help
- Documentation: AI Gateway Docs
- Support: support@cequence.ai
- HubSpot Operations Hub Docs: developers.hubspot.com/docs/api/automation