HighLevel MCP Server
Enables sending and managing WhatsApp messages through HighLevel CRM conversations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@HighLevel MCP Serverlist contacts for client Acme Corp"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
HighLevel MCP Server
Multi-account HighLevel CRM MCP server with OAuth integration for managing 30+ sub-accounts through a unified interface.
Overview
This MCP (Model Context Protocol) server enables AI agents like TypingMind to interact with multiple HighLevel CRM sub-accounts through a single unified interface. Instead of managing 30+ Private Integration Tokens (PITs), this server leverages your existing OAuth tokens stored in Supabase.
Key Features
🔐 OAuth Integration - Uses existing access tokens from Supabase
🏢 Multi-Account Support - Manage 30+ HighLevel sub-accounts through one connection
⚡ 26 Read-Only API Tools - Coverage of contacts, conversations, opportunities, calendars, payments, blogs, emails, and social media (write operations disabled by default)
🚀 Cloudflare Workers - Serverless, auto-scaling, edge deployment
💾 Smart Caching - 5-minute token cache for optimal performance
🎯 Client-Friendly - Use client names or location IDs interchangeably
Why This Exists
HighLevel's official MCP server requires one Private Integration Token (PIT) per sub-account. For agencies managing 30+ clients, this means:
❌ Manually creating 30+ PITs through the UI
❌ Managing 30+ separate MCP connections
❌ No programmatic token management
Our solution:
✅ Reuse existing OAuth tokens from your Supabase database
✅ One MCP connection for all clients
✅ Automatic token management with caching
Related MCP server: GoHighLevel MCP Server
Architecture
┌─────────────┐
│ TypingMind │
│ (AI Agent) │
└──────┬──────┘
│ MCP Protocol (SSE)
│
┌──────▼────────────────────────┐
│ Cloudflare Worker │
│ ┌───────────────────────────┐ │
│ │ Token Manager (5min cache)│ │
│ └───────────┬───────────────┘ │
│ │ │
│ ┌───────────▼───────────────┐ │
│ │ 26 Read-Only API Tools │ │
│ └───────────┬───────────────┘ │
└─────────────┼─────────────────┘
│
┌───────▼────────┐
│ Supabase │
│ ┌────────────┐ │
│ │ locations │ │
│ │ - access_ │ │
│ │ token │ │
│ └────────────┘ │
└────────────────┘
│
┌───────▼──────────────┐
│ HighLevel REST API │
│ 32 Sub-Accounts │
└──────────────────────┘Available Tools (26 Read-Only)
Note: Write/update/delete operations are disabled by default for safety. To enable them, uncomment the relevant tools in
src/index.ts.
Contacts (3 active, 5 disabled)
contacts_get-contact- Fetch contact detailscontacts_get-contacts- List all contactscontacts_get-all-tasks- Get contact tasks- Create new contact (disabled)contacts_create-contact- Update contact (disabled)contacts_update-contact- Create or update contact (disabled)contacts_upsert-contact- Add tags to contact (disabled)contacts_add-tags- Remove tags from contact (disabled)contacts_remove-tags
Conversations (2 active, 1 disabled)
conversations_search-conversation- Search conversationsconversations_get-messages- Get conversation messages- Send SMS/Email/WhatsApp (disabled)conversations_send-a-new-message
Opportunities (3 active, 1 disabled)
opportunities_search-opportunity- Search opportunitiesopportunities_get-opportunity- Get opportunity detailsopportunities_get-pipelines- Get all pipelines- Update opportunity (disabled)opportunities_update-opportunity
Calendars (2 tools)
calendars_get-calendar-events- Get calendar eventscalendars_get-appointment-notes- Get appointment notes
Locations (2 tools)
locations_get-location- Get location detailslocations_get-custom-fields- Get custom fields
Payments (2 tools)
payments_get-order-by-id- Get payment orderpayments_list-transactions- List transactions
Blogs (5 active, 2 disabled)
blogs_get-blogs- Get all blogsblogs_get-blog-post- Get blog postsblogs_check-url-slug-exists- Check URL slugblogs_get-all-blog-authors-by-location- Get authorsblogs_get-all-categories-by-location- Get categories- Create blog post (disabled)blogs_create-blog-post- Update blog post (disabled)blogs_update-blog-post
Emails (1 active, 1 disabled)
emails_fetch-template- Get email templates- Create email template (disabled)emails_create-template
Social Media (4 active, 2 disabled)
socialmediaposting_get-account- Get social accountssocialmediaposting_get-social-media-statistics- Get analyticssocialmediaposting_get-post- Get post by IDsocialmediaposting_get-posts- List all posts- Create post (disabled)socialmediaposting_create-post- Edit post (disabled)socialmediaposting_edit-post
Utility (2 tools)
cache_get-stats- Get cache statistics for debugginglist_clients- List all available client names
Prerequisites
Node.js 18+ (for local development)
Cloudflare Workers account
Supabase account with HighLevel OAuth tokens
TypingMind or another MCP-compatible client
Database Schema
Your Supabase database must have these tables:
locations table:
CREATE TABLE locations (
location_id TEXT PRIMARY KEY,
access_token TEXT NOT NULL,
refresh_token TEXT,
company_id TEXT,
location_name TEXT,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);master_clients table (optional, for client name lookup):
CREATE TABLE master_clients (
id SERIAL PRIMARY KEY,
client_name TEXT UNIQUE NOT NULL,
location_id TEXT REFERENCES locations(location_id),
created_at TIMESTAMP DEFAULT NOW()
);Installation
1. Clone the Repository
git clone https://github.com/isaganiesteron/highlevel-mcp-server.git
cd highlevel-mcp-server2. Install Dependencies
npm install3. Configure Environment Variables
Create a .dev.vars file for local development:
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_KEY=eyJhbGc...your-service-key
HIGHLEVEL_API_BASE=https://services.leadconnectorhq.com
TOKEN_CACHE_TTL=300000For production, set these as Cloudflare Worker secrets:
wrangler secret put SUPABASE_URL
wrangler secret put SUPABASE_SERVICE_KEY4. Update wrangler.toml
name = "highlevel-mcp-server"
main = "src/index.ts"
compatibility_date = "2024-01-01"
[vars]
HIGHLEVEL_API_BASE = "https://services.leadconnectorhq.com"
TOKEN_CACHE_TTL = "300000"Development
Local Development
npm run devThe server will start on http://localhost:8787
Testing with MCP Inspector
npx @modelcontextprotocol/inspector node dist/index.jsRun Tests
npm testDeployment
Deploy to Cloudflare Workers
# Production deployment
npm run deploy
# Or using wrangler directly
wrangler deployConfigure Secrets
wrangler secret put SUPABASE_URL
wrangler secret put SUPABASE_SERVICE_KEYUsage
Configure in TypingMind
Add to your TypingMind MCP configuration:
{
"mcpServers": {
"highlevel": {
"url": "https://your-worker.workers.dev/mcp",
"transport": "sse",
"name": "HighLevel CRM (All Clients)"
}
}
}Example Queries
Using Client Name:
User: "Get all contacts for ABC Remodeling"The AI will call:
{
"tool": "contacts_get-contacts",
"arguments": {
"clientName": "ABC Remodeling"
}
}Using Location ID:
User: "Send a text message to contact_123 in location LN27DIXpeAMiwdjXhDZw"The AI will call:
{
"tool": "conversations_send-a-new-message",
"arguments": {
"locationId": "LN27DIXpeAMiwdjXhDZw",
"contactId": "contact_123",
"type": "SMS",
"message": "Your message here"
}
}Complex Workflow:
User: "Find all opportunities in 'Follow Up' stage for XYZ Construction and send them a reminder email"The AI will:
Search opportunities with
clientName="XYZ Construction",status="Follow Up"Get contact details for each opportunity
Send email via
conversations_send-a-new-message
Performance
Average Response Time: < 800ms (with cache hits < 500ms)
Cache Hit Rate: > 80% after warm-up
Token Cache TTL: 5 minutes
Client Mapping Cache: 10 minutes
Concurrent Requests: Supports 100+ requests/minute
Caching Strategy
Token Cache:
Access tokens cached in-memory for 5 minutes
Reduces Supabase queries by 80%+
Cache is per-worker instance (Cloudflare auto-scales)
Client Name Mapping:
clientName → locationIdcached for 10 minutesSmall dataset (32 clients), safe to cache longer
Error Handling
The server provides user-friendly error messages:
"Client 'ABC Remodeling' not found"- Invalid client name"No access token for location LN27DIXpeAMiwdjXhDZw"- Missing/invalid token"Contact not found"- Invalid contact ID"HighLevel API rate limit exceeded"- Rate limit hit"HighLevel API temporarily unavailable"- API down
Troubleshooting
Issue: "No access token for location"
Check:
Token exists in Supabase
locationstableToken is not empty string
location_idmatches exactly
Fix:
Re-authenticate client through HighLevel OAuth flow
Verify token in Supabase
Issue: "401 Unauthorized from HighLevel API"
Check:
Access token is valid (not expired)
Fix:
Refresh token using your existing OAuth infrastructure
Note: This MCP server does not refresh tokens (read-only access to Supabase)
Issue: "Client not found"
Check:
Client exists in
master_clientstableclient_namespelling is exact (case-sensitive)
Fix:
Add client to
master_clientstableUse
locationIddirectly instead
Issue: Slow response times
Check:
Cache hit rate (should be >80% after warm-up)
HighLevel API latency (external dependency)
Supabase query performance
Fix:
Increase
TOKEN_CACHE_TTLif neededCheck Cloudflare Workers analytics
Monitor Supabase performance
Security
Authentication
OAuth 2.0 access tokens for HighLevel API
Supabase service key stored as Cloudflare secret
No tokens exposed in logs or error messages
Data Privacy
No data stored by MCP server (pass-through only)
Token cache is in-memory only (5-minute TTL)
Logs do not contain PII
Compliance
GDPR: Data minimization (no unnecessary storage)
CCPA: User data rights respected
SOC 2: Cloudflare and Supabase are SOC 2 compliant
Monitoring
Cloudflare Workers Analytics
Request count and latency
Error rates
Geographic distribution
Recommended Additional Monitoring
Sentry for error tracking
Custom metrics for cache hit rates
Alert on error rate spikes
Project Structure
highlevel-mcp-server/
├── src/
│ ├── index.ts # Main MCP server entry point
│ ├── tools/
│ │ ├── contacts.ts # Contact tools (10)
│ │ ├── conversations.ts # Conversation tools (3)
│ │ ├── opportunities.ts # Opportunity tools (4)
│ │ ├── calendars.ts # Calendar tools (2)
│ │ ├── locations.ts # Location tools (2)
│ │ ├── payments.ts # Payment tools (2)
│ │ ├── blogs.ts # Blog tools (7)
│ │ ├── emails.ts # Email tools (2)
│ │ └── social-media.ts # Social media tools (6)
│ ├── lib/
│ │ ├── supabase.ts # Supabase client
│ │ ├── token-manager.ts # Token caching logic
│ │ ├── highlevel-client.ts # HighLevel API client
│ │ └── client-resolver.ts # Client name → location ID
│ └── types/
│ └── index.ts # TypeScript types
├── tests/
│ ├── tools/ # Tool tests
│ └── lib/ # Library tests
├── wrangler.toml # Cloudflare Workers config
├── package.json
├── tsconfig.json
└── README.mdContributing
Contributions are welcome! Please follow these guidelines:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Development Roadmap
Phase 1: Foundation ✅
Project setup and architecture
Token management with caching
Client identifier resolver
Error handling framework
Phase 2: Tools Implementation ✅
Implement all 38 tool schemas (26 read-only active, 12 write ops disabled)
HighLevel API endpoint mappings
Request/response formatting
Individual tool testing
Phase 3: Polish (In Progress)
Comprehensive error handling
Performance optimization
Documentation
Integration testing
Phase 4: Production
Production deployment
Team training
Monitoring setup
User acceptance testing
Future Enhancements
Automatic token refresh within MCP server
HighLevel webhook support (real-time events)
Response caching for read operations
Request batching for bulk operations
Admin UI for cache inspection
Workflow automation templates
License
MIT License - see LICENSE file for details
Support
Issues: GitHub Issues
Discussions: GitHub Discussions
Email: isagani@contractorscale.com
Acknowledgments
Built with Model Context Protocol
Powered by Cloudflare Workers
Database by Supabase
Integrates with HighLevel
Template based on typingmind-mcp-cloudflare-starter
Related Projects
Google Ads MCP Server - MCP server for Google Ads
Meta Ads MCP Server - MCP server for Meta Ads
TypingMind - AI chat interface with MCP support
Built with ❤️ by Isagani Esteron at Contractor Scale
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/isaganiesteron/-brain2-highlevel-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server