🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@elitedcs/ghl-mcp

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elitedcs/ghl-mcp

GoHighLevel MCP Server for Claude. 233 tools — full CRM, automation, marketing control, account-wide workflow audit, live funnel-capture verification, and the only programmatic GHL workflow builder, now multi-tenant across client accounts.

latest
Source
npmnpm
Version
3.57.0
Version published
Weekly downloads
1.5K
318.68%
Maintainers
1
Weekly downloads
 
Created
Source

GHL Command — GoHighLevel MCP Server

Full GoHighLevel API access for Claude. 233 tools across 49 modules — manage contacts, conversations, pipelines, calendars, funnels, workflows, invoices, custom objects, webhooks, and more. Includes full workflow builder, funnel/page editor, form builder, pipeline builder, bulk operations, account export, and workflow cloning — capabilities no other GHL tool offers. Multi-tenant: one install can run the workflow builder across multiple clients' GHL accounts.

Distributed via npm as @elitedcs/ghl-mcp. Buyers install with one config block — no git, no Node.js setup, no terminal commands. Updates flow automatically (npx @latest re-resolves on every Claude restart).

Works with both the Claude Desktop App and Claude Code terminal — your choice.

License required. Get it at ghlcommand.com — $97/mo, covering UNLIMITED GoHighLevel sub-accounts on up to 3 machines (never billed per account). 30-day time-back guarantee: save 5+ hours on one client build or your first month back.

Try it FREE (read-only tier). Grab an instant free key at ghlcommand.com/free — 107 read-only tools on your own GHL account (89 before the one-login auditor unlock): the account-wide workflow audit (audit_workflows finds the silently broken references GHL never warns you about), account health, and every read across contacts, pipelines, funnels, and workflows. Write tools stay visible and answer with upgrade info. Buying later with the same email upgrades your key in place — 1 machine on free, 3 when you upgrade.

How this differs from HighLevel's official MCP. HighLevel ships an official Anthropic MCP that reads and writes your CRM (contacts, conversations, calendars, opportunities, payments, social) over the public API — it's free and it's good; use it for that. What it cannot do, because the public API doesn't expose it: build or edit workflows, build funnels/landing pages, or build forms. That's exactly what GHL Command does — the programmatic Workflow Builder, funnel/page builder, form builder, deep workflow cloning, the silent-failure audit_workflows, and Blueprint (build a whole client account from one intake — ships as a guided skill that installs itself automatically with this package; nothing to download), all on GHL's internal APIs. Official MCP = read/write your CRM. GHL Command = build and fix it. They stack fine together.

Bundled skills (install automatically). The package ships guided skills that teach Claude complete multi-step workflows on top of the raw tools. On every start the server installs/updates them into your ~/.claude/skills/ (never overwriting files you've edited — your version wins and is reported). Current skills: Blueprint — turn one client intake into a complete reviewed GHL account build; Clone Site — point at a live URL and get a rebranded, deploy-ready copy for a client, with a recorded rights declaration, a style-only lane when you have no rights, and a mandatory pre-launch report of every lead/booking/payment destination, borrowed testimonial and inherited claim still belonging to the original owner. Verify or repair any time by asking Claude to run install_skills, then fully restart Claude so new skills load.

Built by Elite DCs, LLC.

What Buyers Say

"I've already set it up, I'm using it and it works perfectly!" — Andres G., paying customer

"Wow! That makes me VERY happy. Given what you've built (I can't wait to test it), I would have been willing to run it on Claude Desktop lol. But on my droplet, as an actual AI skill, even better." — Garret W., paying customer (running it headless on a Linux droplet)

"That worked. Thank you." — Ryan T., paying customer (bug reported Monday, fix shipped as v3.23.0 Tuesday, confirmed Tuesday)

"Thank you, Jerry. You're a star." — Frankie B.

30+ releases on npm since launch (v3.6.0 → v3.34.0). Bugs get fixed in days, not quarters.

What Makes This Different

Most GHL integrations give you read access and basic CRUD. This server goes far beyond that — it includes capabilities that don't exist anywhere else, built on reverse-engineered internal APIs that GHL's public API doesn't expose.

Exclusive FeatureWhy It Matters
Programmatic Workflow BuilderThe only tool on the market that can create, edit, and publish GHL workflows via code. GHL's public API has no workflow write endpoints — this uses their internal backend API (the same one their UI calls) to give Claude full workflow CRUD. Build entire automation sequences from a conversation.
Deep Workflow CloningClone any workflow with full UUID remapping — every action, trigger, branch, and internal reference gets new IDs. No other tool can duplicate a workflow programmatically without ID collisions.
Funnel & Page EditorRead and edit funnel page content — sections, elements, rows, CSS, tracking codes. Goes beyond the public API's list-only access.
Form BuilderFull form CRUD including field management, conditional logic, and auto-responder configuration via internal API.
Pipeline BuilderCreate, edit, and delete pipelines and stages via internal API. The public API only lists pipelines — this lets Claude build them.
Template DeploymentDeploy a complete sub-account setup (tags, custom fields, pipelines, workflows, forms) from a single template. Set up a new client in minutes instead of hours.
Multi-Sub-Account Token RegistryRegister multiple sub-accounts with their own API keys. Switch locations mid-session and the API key swaps automatically — no restart needed.
Full Account Export & DiffExport an entire sub-account to JSON or compare two locations side-by-side. Useful for auditing, migration, and quality control.

Everything else — CRM, conversations, calendars, invoices, bulk ops — works through GHL's official public API v2 with full read/write access.

What It Does

This MCP (Model Context Protocol) server connects Claude directly to GoHighLevel's API v2. Once installed, Claude can read and write to your GHL account — no browser, no Zapier, no middleware. Use it from the Claude Desktop App (no terminal needed) or from Claude Code in the terminal.

CapabilityWhat Claude Can Do
CRMSearch, create, update, and delete contacts. Manage tags, notes, tasks.
ConversationsRead message threads, send SMS/email/WhatsApp, update message status.
PipelineCreate and manage opportunities. Move deals through stages.
SchedulingCheck availability, book appointments, manage calendars.
AutomationFull workflow builder — create, read, edit, and publish workflows. See every action, trigger, condition, and branch. Clone workflows with deep ID remapping.
MarketingFunnel/page editor — read and edit existing funnel page content (sections, elements, CSS). Full form builder — read/edit all fields, conditional logic, auto-responder.
PipelinesFull pipeline builder — create, edit, delete pipelines. Add, remove, rename, reorder stages.
Bulk OpsBatch tag, untag, update fields, enroll in workflows, or delete contacts — all rate-limited.
BackupExport entire sub-account to JSON. Compare two locations side-by-side for auditing.
Multi-LocationSwitch between sub-accounts mid-session. Token registry stores per-location API keys for seamless switching.
BillingCreate/send/void invoices, record payments, view orders and subscriptions.
ContentManage blog posts, social media posts, courses, media files.
Custom ObjectsFull CRUD on custom object schemas and records. Manage associations.
Estimates & CouponsCreate/send estimates, manage promo codes.
WebhooksCreate and manage webhook subscriptions.
DocumentsList, send, and manage documents/contracts.
AdminView/update sub-accounts, manage custom fields, custom values, location tags, users.

Quick Start (5 minutes)

1. Buy a license

ghlcommand.com — $97/mo, every sub-account you manage. License key arrives by email within 1-2 minutes.

2. Install in Claude Desktop App

Open Claude Desktop. Click Claude menu (top-left) → Settings...DeveloperEdit Config. Paste this block (or merge into your existing mcpServers if you have other MCP servers):

{
  "mcpServers": {
    "ghl": {
      "command": "npx",
      "args": ["-y", "@elitedcs/ghl-mcp@latest"]
    }
  }
}

Save the file. Quit Claude completely (Cmd+Q on Mac) and reopen.

Claude Code (terminal) instead? One command:

claude mcp add --scope user -t stdio ghl -- npx -y @elitedcs/ghl-mcp@latest

Then restart Claude Code.

3. Activate

After restart, GHL Command is loaded but locked. Type this in Claude (replace the four placeholders with your real values):

Run setup_ghl_mcp to activate GHL Command:
  email: YOUR_PURCHASE_EMAIL
  license_key: YOUR_LICENSE_KEY
  ghl_api_key: YOUR_GHL_API_KEY
  ghl_location_id: YOUR_LOCATION_ID

Approve the tool call. Server validates your license, verifies your GHL credentials, writes them to a per-user config file. Quit Claude one more time and reopen — the full core toolset is now unlocked (233 tools total with the optional Workflow Builder Firebase add-on).

4. Try it

"List my GHL contacts"
"Show my pipelines"
"What calendars do I have?"

Full step-by-step setup with screenshots: elitedcs.com/ghl-mcp-setup-guide.html

Get Your GHL API Key

CRITICAL: Sub-Account Level Only

Private Integrations in GHL are scoped to individual sub-accounts, NOT to the agency level. You must create a separate Private Integration inside each sub-account you want to connect. An API key created in Sub-Account A will return 403 Forbidden if you try to use it with Sub-Account B's Location ID.

Your API key can only be copied ONCE — at the moment you create the integration. After you leave that screen, the key is permanently masked and cannot be retrieved. If you lose it, you must delete the integration and create a new one.

  • Log into GoHighLevel
  • Switch into the specific sub-account you want to connect (not the agency view)
  • Go to Settings > Integrations
  • Click Private Integrations > Create Private Integration
  • Name it Claude Code MCP
  • Enable all scopes/permissions you want Claude to access
  • Immediately copy the API Key and pass it to setup_ghl_mcp as ghl_api_key — you will not be able to see it again

Find Your Location ID

Your Location ID (sub-account ID) is in the GHL URL when you'''re inside a sub-account:

https://app.gohighlevel.com/v2/location/YOUR_LOCATION_ID/dashboard

Enable the Workflow Builder

The builder + cloner + validator tools (workflow builder, funnel builder, form builder, pipeline builder, workflow cloner, validate_workflow) use GHL's internal API and require Firebase credentials. Without them, the other 179 tools work fine — you just won't have workflow/funnel/form/pipeline editing. This is the flagship feature: do this step.

One-click capture (v3.49.0+, the supported path):

  • In Claude, ask: Run capture_firebase_interactive. Your installed Chrome opens a dedicated window on the GHL login page (no browser download; it never touches your daily browsing profile).
  • Log into your GHL account in that window. That's the whole job — the tool reads the three Firebase values itself, validates them against Firebase, and saves them. If the call says it's still waiting, finish logging in and run the same tool again.
  • Restart Claude. The Firebase-gated tools are live.

Firebase refresh tokens can rotate. If workflow tools stop working after a few weeks (health_check shows Firebase auth: FAIL), just re-run capture_firebase_interactive — after your first login it re-captures silently, no window at all.

Console-paste fallback (no Chrome/Edge installed, the window path fails, or you're capturing a CLIENT account for multi-tenant)
  • In Claude, ask: Run auto_capture_firebase_script. It returns a small browser-console script.
  • In Chrome, open a tab logged into your GHL account. Press F12 (Windows) or Cmd+Option+I (Mac), click the Console tab, paste the script, press Enter. If Chrome blocks the paste, type allow pasting in the Console first, then paste again.
  • The script extracts the three Firebase values and copies them to your clipboard as JSON.
  • Back in Claude: Run enable_workflow_builder and paste the JSON into the firebase_paste field. (First-time setup? You can instead add firebase_paste as a fifth field on setup_ghl_mcp.)
  • Restart Claude. The Firebase-gated tools are live.

Screenshots and the same script behind a copy button: elitedcs.com/ghl-mcp-firebase

Manual fallback (locked-down browsers that block console pasting or clipboard access)
  • Open app.gohighlevel.com in Chrome (or any Chromium browser), log in.
  • Open DevTools (Cmd+Opt+I on Mac, F12 on Windows) → Application tab → IndexedDB in the left panel.
  • Expand: firebaseLocalStorageDbfirebaseLocalStorage.
  • Find the row whose key starts with firebase:authUser:.
  • The part between authUser: and :[DEFAULT] is your ghl_firebase_api_key (starts with AIza).
  • Inside that row's value object: uid is your ghl_user_id.
  • Inside value.stsTokenManager.refreshToken is your ghl_firebase_refresh_token.

Then in Claude, run enable_workflow_builder (or re-run setup_ghl_mcp with your license fields) passing the three values individually as ghl_user_id, ghl_firebase_api_key, and ghl_firebase_refresh_token.

Working in Clients' Accounts (Multi-Tenant)

The public-API tools work in any sub-account you have a Private Integration key for. The workflow builder (and every Firebase-gated tool) is different: GHL Firebase refresh tokens are company-scoped, so your own token can't build workflows inside a client's GHL — even if you're an admin user there. Without the client's own Firebase, those accounts are effectively read-only.

To unlock full builder access across multiple clients from one install:

  • Register the client's sub-account key so the public API works there:

    register_location
      locationId: CLIENT_LOCATION_ID
      name: "Client Name"
      apiKey: pit-...   (a Private Integration created INSIDE the client's sub-account)
    

    This auto-detects and stores the owning companyId.

  • Capture the client's Firebase values from a browser session logged into their account (run auto_capture_firebase_script the same way as above, but paste it into a tab logged into the client's GHL).

  • Register the client's company Firebase:

    register_company_firebase
      companyId: CLIENT_COMPANY_ID         (best-effort — see note)
      name: "Client Name"
      ghl_firebase_refresh_token: FROM_STEP_7
      ghl_user_id: FROM_STEP_6
      test_location_id: CLIENT_LOCATION_ID  (optional — runs a live check that it works)
    

    companyId is best-effort. GHL's agency-URL company ID is a different identifier than the internal one used for sub-accounts. The tool decodes the company ID the Firebase token itself authenticates as and stores the entry under that, so you don't have to track down the exact internal ID — pass whatever you have (e.g. from register_location's output) and it self-corrects.

  • Switch and build: switch_location CLIENT_LOCATION_ID swaps both the API key and the Firebase auth automatically. The workflow builder now operates in the client's account. Switching back to your own location restores your home Firebase.

list_registered_locations shows every location, its company, and which companies have Firebase wired up. health_check reports the active company. Rotated tokens are saved back to the correct client, never overwriting your own.

Server / Headless Deployment

GHL Command runs headless — Linux droplet, container, or behind an MCP gateway (MetaMCP, etc.). One license covers every GoHighLevel sub-account you manage, on up to 3 of your own machines. No per-account fees. A server counts as one machine; restarts never consume extra activations.

Highlights (full guide: docs/HEADLESS.md):

  • Scriptable multi-account setup — pre-seed the documented .ghl-tokens.json, or use the CLI in a Dockerfile/entrypoint:
    npx -y @elitedcs/ghl-mcp cli register-location --location-id XXXX --api-key pit-... --name "Account"
    npx -y @elitedcs/ghl-mcp cli register-company-firebase --company-id YYYY --refresh-token ... --user-id ...
    npx -y @elitedcs/ghl-mcp cli register-agency-key --api-key pit-...
    
  • Persistent config dir — set GHL_MCP_CONFIG_DIR=/data/ghl-mcp (absolute path) on a mounted volume so auto-rotated Firebase tokens survive container restarts.
  • Firebase is per-company, not per-sub-account — one credential set covers all sub-accounts under a company.
  • Node 20+, graceful SIGTERM shutdown, GHL_MCP_DISABLE_UPDATE_CHECK=1 for air-gapped boxes. Transport is stdio (your gateway supervises it as a child process); an HTTP serve mode is on the roadmap.

Tools

v3.10.0 adds Email Templates (list_email_templates, create_email_template, update_email_template) — Claude can now create new HTML email templates and save content into them via the public API. Templates power both standalone marketing emails and workflow email actions. Delete + rename remain UI-only (no public-API endpoint exists).

CRM & Contacts (15 tools)

ToolWhat It Does
search_contactsSearch contacts by name, email, phone, or tag
get_contactGet full contact details by ID
create_contactCreate a new contact
update_contactUpdate contact fields
delete_contactDelete a contact
upsert_contactCreate or update a contact (match by email/phone)
add_contact_tagsAdd tags to a contact
remove_contact_tagsRemove tags from a contact
get_contact_tasksList tasks for a contact
create_contact_taskCreate a task on a contact
get_contact_notesList notes on a contact
create_contact_noteAdd a note to a contact
get_contact_appointmentsList a contact's appointments
add_contact_to_workflowAdd a contact to a workflow
remove_contact_from_workflowRemove a contact from a workflow

Conversations & Messaging (8 tools)

ToolWhat It Does
search_conversationsSearch conversation threads
get_conversationGet a specific conversation
create_conversationStart a new conversation
get_messagesRead messages in a conversation
send_messageSend SMS, email, or WhatsApp message
add_inbound_messageLog an inbound message
update_message_statusUpdate read/unread status
get_messageGet a specific message

Opportunities & Pipelines (7 tools)

ToolWhat It Does
search_opportunitiesSearch deals across pipelines
get_opportunityGet opportunity details
create_opportunityCreate a new deal
update_opportunityUpdate deal fields or move stages
delete_opportunityDelete a deal
update_opportunity_statusChange opportunity status (won/lost/open)
get_pipelinesList all pipelines and their stages

Calendars & Scheduling (11 tools)

ToolWhat It Does
get_calendarsList all calendars
get_calendarGet calendar details
create_calendarCreate a new calendar
update_calendarUpdate calendar settings
delete_calendarDelete a calendar
get_free_slotsCheck available time slots
get_calendar_eventsList events on a calendar
get_appointmentGet appointment details
create_appointmentBook an appointment
update_appointmentUpdate an appointment
delete_appointmentCancel an appointment

Locations & Sub-Accounts (15 tools)

ToolWhat It Does
get_locationGet sub-account details
update_locationUpdate sub-account settings
search_locationsSearch locations
get_location_tagsList all tags in a location
create_location_tagCreate a new tag
update_location_tagUpdate an existing tag
delete_location_tagDelete a tag
get_custom_fieldsList all custom fields
create_custom_fieldCreate a new custom field
update_custom_fieldUpdate a custom field
delete_custom_fieldDelete a custom field
get_custom_valuesList all custom values
create_custom_valueCreate a new custom value
update_custom_valueUpdate a custom value
delete_custom_valueDelete a custom value

Custom Objects (7 tools)

ToolWhat It Does
list_custom_objectsList all custom object schemas
get_custom_objectGet a custom object schema by key
search_custom_object_recordsSearch records of a custom object
get_custom_object_recordGet a single record by ID
create_custom_object_recordCreate a new record
update_custom_object_recordUpdate an existing record
delete_custom_object_recordDelete a record

Associations (3 tools)

ToolWhat It Does
list_associationsList associations for a custom object record
create_associationLink a record to a contact/opportunity/other record
delete_associationRemove an association

Invoices & Billing (8 tools)

ToolWhat It Does
list_invoicesList all invoices
get_invoiceGet invoice details
create_invoiceCreate a new invoice
update_invoiceUpdate an invoice
send_invoiceSend invoice to recipient
void_invoiceVoid an invoice
record_invoice_paymentRecord a payment against an invoice
delete_invoiceDelete an invoice

Estimates (6 tools)

ToolWhat It Does
list_estimatesList estimates/quotes
get_estimateGet estimate details
create_estimateCreate a new estimate
update_estimateUpdate an estimate
delete_estimateDelete an estimate
send_estimateSend an estimate to a contact

Coupons (5 tools)

ToolWhat It Does
list_couponsList all coupons/promo codes
get_couponGet coupon details
create_couponCreate a new coupon
update_couponUpdate a coupon
delete_couponDelete a coupon

Webhooks (5 tools)

ToolWhat It Does
list_webhooksList all webhook subscriptions
get_webhookGet webhook details
create_webhookCreate a new webhook
update_webhookUpdate a webhook
delete_webhookDelete a webhook

Documents (4 tools)

ToolWhat It Does
list_documentsList documents and contracts
get_documentGet document details and signature status
delete_documentDelete a document
send_documentSend a document for e-signature

Payments (4 tools)

ToolWhat It Does
get_ordersView all orders
get_orderGet order details
get_subscriptionsList active subscriptions
get_transactionsView transaction history

Workflow Builder (9 tools) — Internal API

This is the flagship feature. GHL's public API has zero workflow write endpoints. These tools use GHL's internal backend API — the same API their own UI calls — reverse-engineered to give Claude full workflow CRUD. No other GHL integration, Zapier connector, or third-party tool can create or edit workflows programmatically. Requires additional Firebase auth setup (see "Enable Workflow Builder" in Quick Start above).

ToolWhat It Does
list_workflows_fullList all workflows with full metadata, versions, and permissions
get_workflow_fullGet complete workflow internals: every action, trigger, condition, if/else branch, email template, SMS body
create_workflowCreate a new workflow from scratch (starts as draft)
update_workflow_actionsAdd, edit, or remove actions, triggers, and branches in an existing workflow
delete_workflow_fullPermanently delete a workflow
publish_workflowPublish a draft workflow to make it active
get_trigger_registryDiscover GHL's marketplace trigger apps (Zoom, WooCommerce, Shopify, etc.) and their available trigger templates
validate_workflowPre-flight validation: scans every action and trigger for references to pipelines, stages, custom fields, users, and other workflows; verifies each ID exists. Catches the silent-failure bug where invalid IDs make GHL skip subsequent actions
build_goal_eventBuild a correctly-shaped goal-event node. Goals sit inline in the action chain — when the goal condition fires (e.g., review_request_clicked), the configured action runs (default: exit the workflow). Returns a workflow_goal node ready to wire into your actions array

What you can build: Complete automation sequences — lead nurture drip campaigns, appointment reminder sequences, onboarding flows, re-engagement workflows, internal notification chains, conditional exit workflows with goal events. Tell Claude what you want and it builds the workflow action by action.

Supported action types: sms, email, add_contact_tag, remove_contact_tag, update_contact_field, wait, if_else, webhook, create_opportunity, custom_code, add_notes, internal_notification, task_notification, remove_from_workflow, workflow_goal, and more.

Supported trigger types: All 57 native GHL trigger types are deeply typed with their own Zod variant. 42 have full field-path documentation (opportunity_*, form_submission, contact_changed, survey_submission, birthday_reminder, mailgun_email_event, and 36 others). 4 have partial docs, 2 are fieldless by design, 9 have type-only discrimination pending field-path capture. A permissive fallback handles any future trigger types GHL ships, so reads never crash. Plus 434 marketplace trigger entries across 85 third-party apps — query them via get_trigger_registry.

Pipeline Builder (5 tools) — Internal API

Also uses GHL's internal API. The public API only lists pipelines — this lets Claude create, edit, and delete pipelines and their stages.

ToolWhat It Does
list_pipelines_fullList all pipelines with full stage details, positions, and display settings
get_pipeline_fullGet a single pipeline with complete stage configuration
create_pipelineCreate a new pipeline with stages
update_pipelineUpdate name, add/remove/rename/reorder stages
delete_pipelinePermanently delete a pipeline

Bulk Operations (5 tools)

ToolWhat It Does
bulk_add_tagsAdd tags to multiple contacts at once (rate-limited)
bulk_remove_tagsRemove tags from multiple contacts (rate-limited)
bulk_update_contactsUpdate the same fields on multiple contacts (rate-limited)
bulk_add_to_workflowEnroll multiple contacts into a workflow (rate-limited)
bulk_delete_contactsDelete multiple contacts (rate-limited, requires safety confirmation)

Account Export & Comparison (2 tools)

ToolWhat It Does
export_accountFull sub-account backup — contacts, pipelines, workflows, funnels, forms, fields, tags, calendars, users
compare_locationsSide-by-side diff of two sub-accounts for auditing or migration

Location Switcher & Token Registry (6 tools)

ToolWhat It Does
get_current_locationShow which sub-account is active
switch_locationSwitch to a different sub-account mid-session (auto-swaps API key from registry)
list_available_locationsList all accessible sub-accounts
register_locationAdd a sub-account and its API key to the token registry
unregister_locationRemove a sub-account from the token registry
list_registered_locationsList all sub-accounts stored in the token registry

Workflow Cloner (1 tool)

Deep-clones a workflow with full UUID remapping. Every action, trigger, branch, and internal cross-reference gets a new unique ID. GHL has no built-in way to duplicate a workflow programmatically — this is the only tool that can.

ToolWhat It Does
clone_workflowDeep clone a workflow with new UUIDs for all actions, triggers, and references

Template Deployer (3 tools)

Deploy a complete sub-account setup from a pre-built template — tags, custom fields, pipelines, workflows, and forms — in one step. Claude walks the user through a questionnaire, then deploys everything. Includes dry-run mode to preview changes before applying.

ToolWhat It Does
list_templatesList available setup templates (clinic, med spa, dental, etc.)
get_template_questionnaireGet the questionnaire for a template — present to user conversationally
deploy_templateDeploy a complete sub-account setup from a template (tags, fields, pipelines, workflows, forms). Supports dry-run mode.

Setup & Diagnostics (3 tools)

ToolWhat It Does
get_mcp_versionCheck installed version against the latest published to npm. Confirms an upgrade landed after restarting Claude. Available even before GHL credentials are configured.
health_checkRun a full health check: npm registry + version status, GHL API key validity, default location reachability, Firebase auth status, token registry presence. Use when something feels broken.
enable_workflow_builderAdd Firebase credentials to an existing install to unlock 54 additional Firebase-gated tools (workflow builder, funnel builder, form builder, pipeline builder, workflow cloner, smart lists, reputation, email campaigns, email templates, memberships, validate_workflow). No need to re-enter license / API key / location ID. Run this any time after the basic setup, on the buyer's schedule.

Other Modules

ModuleToolsWhat It Does
Social Planner5Create, list, delete posts, view connected accounts
Businesses5Full CRUD on business entities
Blogs5Posts, authors, categories, URL slugs
Funnels (public API)2List funnels and their pages
Forms (public API)2List forms and view submissions
Surveys2List surveys and view submissions
Users2List and view team members
Media2Browse and delete media files
Campaigns1List campaigns
Workflows (public API)1List all workflows
Courses1List courses
Emails1List email campaigns
Trigger Links1List trigger links

How It Works

┌──────────────────┐   ┌──────────────────┐
│  Claude Desktop  │   │  Claude Code     │
│  App (GUI)       │   │  (Terminal)      │
└────────┬─────────┘   └────────┬─────────┘
         │                      │
         └──────────┬───────────┘
                    │ MCP Protocol (stdio)
┌───────────────────┴─────────────────────┐
│            GHL MCP SERVER               │
│                                         │
│  ┌──────────┐ ┌──────────┐ ┌────────┐  │
│  │ Contacts │ │ Calendar │ │Invoices│  │
│  │ 15 tools │ │ 11 tools │ │8 tools │  │
│  └────┬─────┘ └────┬─────┘ └───┬────┘  │
│       └─────────────┼───────────┘       │
│              ┌──────┴──────┐            │
│              │  GHL Client │            │
│              └──────┬──────┘            │
├─────────────────────┼───────────────────┤
│                     ↓                   │
│        GoHighLevel API v2               │
│   https://services.leadconnectorhq.com  │
└─────────────────────────────────────────┘

Architecture

  • src/index.ts — MCP server entry, startup API key validation, tool registration.
  • src/ghl-client.ts — HTTP client for GHL API v2. Returns Promise<unknown> (no generic as T casts). Automatic retry with exponential backoff on 429/5xx/network errors. 30-second timeout with clear error messages.
  • src/workflow-builder-client.ts — Internal API client for workflow CRUD. Firebase auth with thread-safe token refresh (promise lock), retry/backoff, Zod-validated WorkflowFull responses, and pre-flight validateActionChain() that catches common action attribute errors before GHL can silently fail.
  • src/api-schemas.ts — Zod response schemas for contacts, pipelines, and calendars. Runtime validation on the most-used API paths.
  • src/workflow-action-types.ts — Discriminated union types for all 11 documented workflow action types. Compile-time enforcement of action-specific attributes (SMS needs body, email needs subject+html, etc.).
  • src/tool-helpers.tssafeTool() wrapper (automatic try/catch + JSON formatting for 127 tools), response helpers, error formatting.
  • src/token-registry.ts — Per-location API key storage, Zod-validated on load with corruption backup.
  • src/tools/index.ts — Type-safe registry array. Compiler catches missing tool registrations.
  • src/tools/*.ts — One file per GHL domain. Most use safeTool() for zero-boilerplate handlers.

Build System

Uses esbuild for production builds (not tsc). TypeScript 5.9.3 + MCP SDK types cause tsc to run out of memory at 4GB+. esbuild bundles in ~5ms with zero memory issues.

npm run build    # esbuild → dist/index.js (~428KB)
npm run dev      # tsc --watch (type-checking only)

Data Flow

User prompt → Claude Code → MCP tool call → GHL Client → GHL API → JSON response → Claude Code → User

Every tool returns structured JSON. Claude interprets the response and presents it naturally. No data is stored locally — it's a pass-through to GHL's API.

Project Structure

ghl-command-mcp/
├── src/
│   ├── index.ts                   # MCP server entry point + startup validation
│   ├── ghl-client.ts              # GHL API v2 HTTP client (retry/backoff, returns unknown)
│   ├── workflow-builder-client.ts # Internal API client (Firebase auth, Zod-validated responses)
│   ├── workflow-action-types.ts   # Discriminated union types for workflow actions
│   ├── api-schemas.ts             # Zod response schemas for contacts, pipelines, calendars
│   ├── token-registry.ts          # Per-location API key storage (Zod-validated on load)
│   ├── tool-helpers.ts            # safeTool() wrapper, response helpers, error formatting
│   └── tools/
│       ├── index.ts               # Type-safe tool registry (compiler-checked)
│       ├── contacts.ts            # 15 tools — CRM & contact management
│       ├── conversations.ts       # 8 tools — messaging (SMS, email, WhatsApp)
│       ├── opportunities.ts       # 7 tools — pipeline & deal management
│       ├── calendars.ts           # 11 tools — scheduling & appointments
│       ├── locations.ts           # 15 tools — sub-accounts, custom fields/values, tags
│       ├── invoices.ts            # 8 tools — invoicing & payment recording
│       ├── custom-objects.ts      # 7 tools — custom object schema & record CRUD
│       ├── estimates.ts           # 6 tools — estimates/quotes
│       ├── social-planner.ts      # 5 tools — social media management
│       ├── businesses.ts          # 5 tools — business entity management
│       ├── blogs.ts               # 5 tools — blog management
│       ├── coupons.ts             # 5 tools — promo code management
│       ├── webhooks.ts            # 5 tools — webhook subscriptions
│       ├── payments.ts            # 4 tools — orders, subscriptions, transactions
│       ├── documents.ts           # 4 tools — document & contract management
│       ├── associations.ts        # 3 tools — custom object associations
│       ├── funnels.ts             # 2 tools — funnel & page listing
│       ├── forms.ts               # 2 tools — forms & submissions
│       ├── surveys.ts             # 2 tools — surveys & submissions
│       ├── users.ts               # 2 tools — team members
│       ├── media.ts               # 2 tools — media file management
│       ├── campaigns.ts           # 1 tool  — campaign listing
│       ├── workflows.ts           # 1 tool  — workflow listing
│       ├── courses.ts             # 1 tool  — course listing
│       ├── emails.ts              # 1 tool  — email campaign listing
│       ├── trigger-links.ts       # 1 tool  — trigger link listing
│       ├── workflow-builder.ts    # 6 tools — full workflow CRUD (internal API)
│       ├── funnel-builder.ts      # 10 tools — funnel/page builder (internal API)
│       ├── form-builder.ts        # 5 tools — form builder (internal API)
│       ├── pipeline-builder.ts    # 5 tools — pipeline/stage builder (internal API)
│       ├── bulk-operations.ts     # 5 tools — batch contact operations
│       ├── account-export.ts      # 2 tools — backup & location comparison
│       ├── workflow-cloner.ts     # 1 tool  — deep workflow cloning
│       ├── location-switcher.ts   # 6 tools — multi-location support + token registry
│       └── template-deployer.ts   # 3 tools — deploy sub-account from template (Zod-validated)
├── templates/
│   ├── clinic-medspa.json         # Clinic/Med Spa blueprint
│   └── action-schemas.json        # Mandatory workflow action attribute schemas
├── dist/                          # Compiled JavaScript (npm-published bundle)
├── bin/ghl-mcp.js                 # npm bin entry point
├── .github/workflows/publish.yml  # GitHub Actions npm-publish workflow
├── package.json                   # @elitedcs/ghl-mcp
├── tsconfig.json
├── CLAUDE.md                      # Claude Code project instructions
├── CHANGELOG.md
├── CONTRIBUTING.md                # Contributor guide
├── .gitignore
└── README.md
# Legacy (kept for self-hosted dev workflows; buyers don't need these):
# setup.sh, setup-wizard.mjs, start-mcp.example.sh

Known Limitations

These are GHL features the MCP server does not currently support. In most cases, the GHL API either doesn't expose these endpoints or the feature requires browser-level interaction.

AreaWhat's Missing
Contact deduplicationNo merge or dedup tool. search_contacts can find potential duplicates by name/email/phone, but merging must be done manually in the GHL UI.
Account auditingNo one-click "find what's broken" scanner. export_account dumps full sub-account data and compare_locations diffs two accounts — Claude can analyze the output to spot issues, but it's not a turnkey audit button.
SMS/email templatesNo template CRUD. You can send messages and build email actions in workflows, but managing reusable message templates isn't supported.
Payment gateway configRead-only access to orders, subscriptions, and transactions. No Stripe/payment gateway setup or configuration.
Phone & call trackingNo call tools. VoIP, call tracking, and phone number management are not available via the API.
Memberships & communitiesNot supported. GHL's membership/community features don't have public API endpoints.
Reporting & analyticsNo dashboard or reporting tools. Use export_account for raw data, but there are no built-in analytics queries.
Trigger linksList only — no create, update, or delete.
CampaignsList only — no create, update, or delete.
CoursesList only — no create, update, or delete.
Workflow builder authRequires Firebase credentials extracted from browser DevTools. The refresh token may rotate, requiring re-extraction.

Contributing: If you'd like to help close any of these gaps, see CONTRIBUTING.md.

Security

This MCP server is safe to share via GitHub.

ConcernHow It's Handled
API KeysStored in a per-user credentials file (~/Library/Application Support/elitedcs-ghl-mcp/credentials.json on Mac) at chmod 0600. Never in code, never committed.
License validationChecked at setup_ghl_mcp against the elitedcs.com license server, then cached as a signed attestation (~30 days). The server renews the attestation in the background as expiry approaches — never per-request, and your GHL keys are never sent to us.
Multi-userEach user brings their own license key + GHL API key. Complete account isolation.
ScopeThe server only talks to GHL's API, the elitedcs.com license server (setup + periodic attestation renewal), and npm's registry (startup version banner — GHL_MCP_DISABLE_UPDATE_CHECK=1 to disable). No filesystem access beyond its config dir, no shell commands.
PermissionsControlled by your GHL Private Integration scopes. Disable what you don't need.

Reliability & Type Safety

This server has been through a rigorous, multi-pass audit for production reliability (v2.4.0–v2.7.0). Here's what's in place:

LayerWhat It Does
Retry with backoffBoth HTTP clients automatically retry on 429 rate limits, 5xx server errors, and transient network failures (ECONNRESET, ETIMEDOUT). 3 retries with exponential backoff. Respects Retry-After headers.
Clear error messagesTimeouts show "Request timeout (30s): GET /path" instead of cryptic abort errors. API errors include status code, method, path, and response body.
Zod-validated responsesCritical API paths (contacts, pipelines, calendars, workflows) validate response structure at runtime with Zod schemas. Malformed responses throw immediately with clear errors instead of silently passing garbage.
Zod-validated configToken registry (.ghl-tokens.json) and template files are validated against Zod schemas on load. Corrupted files are backed up and reported, not silently accepted.
Pre-flight workflow validationvalidateActionChain() checks action attributes before sending to GHL — catches missing body on SMS, missing subject/html on email, missing pipelineId/stageId on create_opportunity, and more. Prevents GHL's silent failure mode where bad actions kill all subsequent steps.
Delete confirmation10 high-risk destructive operations (delete_contact, delete_workflow, delete_pipeline, delete_funnel, etc.) require confirm: "DELETE" parameter. Prevents accidental deletion.
Thread-safe token refreshFirebase token refresh uses a promise-based lock — concurrent requests share one refresh instead of racing. Failed refresh clears the cache immediately instead of leaving a stale token for 55 minutes.
Startup validationServer validates the API key at startup (non-blocking) and logs a clear warning if it's invalid.
Type-safe registrationTool modules are registered via a typed array — the compiler catches missing registrations.
Honest typesHTTP client methods return Promise<unknown>, not Promise<T>. No as T casts on JSON.parse. The type system never lies about response shapes.

Updates

Automatic. Every Claude restart, npx -y @elitedcs/ghl-mcp@latest re-resolves the latest published version. When v3.0.1 ships, every buyer is on it next time they reopen Claude. Zero action required.

To pin a specific version (e.g. for stability), change @latest to @3.0.0 in your MCP config.

Contributing

Source repo is private. Contributors need an invitation from drjerryrelth. The npm-published artifact is open; the build/source pipeline is not.

For contributors with repo access:

  • Clone the repo, run npm install
  • For dev work, set env vars in your shell or a wrapper script (env vars take priority over the credentials file — your dev workflow won't conflict with a buyer install on the same machine):
    export GHL_API_KEY=pit-your-dev-key
    export GHL_LOCATION_ID=your-test-location
    node dist/index.js
    
  • Read CONTRIBUTING.md for branching conventions, how to add tools, and PR guidelines.
  • Create a branch, run npm run build, test against a sandbox sub-account, open a PR against main.

Environment Variables

VariableRequiredDescription
GHL_API_KEYYesYour GHL Private Integration API key. Must be created inside the sub-account you're connecting to (not at the agency level). Can only be copied once at creation.
GHL_LOCATION_IDNoDefault sub-account ID. Must match the sub-account where you created the API key. Saves you from passing it with every tool call.
GHL_USER_IDNo*Your GHL user ID. Required for workflow builder tools.
GHL_FIREBASE_API_KEYNo*Firebase API key from GHL's auth system. Required for workflow builder tools.
GHL_FIREBASE_REFRESH_TOKENNo*Firebase refresh token. Required for workflow builder tools. May rotate periodically.
GHL_ENABLED_MODULESNoComma-separated module names to limit which tool groups register at startup (e.g. contacts,conversations,locations). Unset = every module registers (default). See "Reducing context / token usage" below.
GHL_ENABLED_TOOLSNoComma-separated individual tool names to register (e.g. search_contacts,get_contact,update_custom_value). Set alongside GHL_ENABLED_MODULES to add specific tools on top of whole-module enables.

*Required only for the workflow builder (internal API) tools. The standard API tools work without these.

Reducing context / token usage

Every registered MCP tool's schema is shipped to the model on every message. With 233 tools that's a meaningful per-message context cost even in chats that never touch GHL. If you only use a slice of GHL Command, restrict the tool surface with GHL_ENABLED_MODULES and/or GHL_ENABLED_TOOLS:

// Claude Desktop config — enable whole modules
"env": {
  "GHL_API_KEY": "pit-...",
  "GHL_LOCATION_ID": "...",
  "GHL_ENABLED_MODULES": "contacts,conversations,locations,custom-objects"
}
// Or pin to individual tools
"env": {
  "GHL_API_KEY": "pit-...",
  "GHL_LOCATION_ID": "...",
  "GHL_ENABLED_TOOLS": "search_contacts,get_contact,update_custom_value"
}

Rules of the road:

  • Neither set → every tool registers (default, backward compatible — your existing config keeps working unchanged).
  • GHL_ENABLED_MODULES only → register tools in those modules.
  • GHL_ENABLED_TOOLS only → register only those exact tool names.
  • Both set → register the union: a tool registers if its module is in GHL_ENABLED_MODULES OR its name is in GHL_ENABLED_TOOLS. (Whole modules plus a few extra tools.)
  • Whitespace and commas both work as separators. Matching is case-insensitive.
  • Always-on tools register regardless of the allowlist so setup and recovery still work: setup_ghl_mcp, request_license, get_mcp_version, auto_capture_firebase_script, enable_workflow_builder, health_check.
  • Unrecognized module/tool names log a one-line WARNING to stderr and are ignored. Startup never aborts.
  • On startup with the allowlist active, the server logs one summary line: Tool allowlist active: registered N of M tools (...).

Valid module names (use these in GHL_ENABLED_MODULES):

contacts, conversations, opportunities, calendars, locations, workflows, funnels, forms, surveys, payments, products, invoices, campaigns, users, media, social-planner, courses, businesses, blogs, emails, trigger-links, custom-objects, associations, estimates, coupons, webhooks, documents, bulk-operations, account-export, template-deployer, workflow-builder, funnel-builder, form-builder, pipeline-builder, workflow-cloner, smart-lists, reputation, email-campaigns, email-builder, memberships, validators, diagnostics, location-switcher

Turning tools off (security)

Some teams keep certain operations human-only — for example sub-account management or messaging — so that a prompt-injected or misbehaving AI session can never touch them. Two controls exist for exactly that:

1. Sub-account create/delete is OFF by default. create_sub_account and delete_sub_account do not register unless you explicitly opt in:

"env": {
  "GHL_ENABLE_ACCOUNT_ADMIN": "1"   // exactly "1" — nothing else enables it
}

The setup wizard asks this question during install (default No). Listing these tools in GHL_ENABLED_TOOLS does not bypass the flag.

2. Any tool or module can be switched off with a deny-list:

"env": {
  "GHL_DISABLED_TOOLS": "send_message,bulk_delete_contacts",
  "GHL_DISABLED_MODULES": "snapshots"
}

How the deny-list behaves:

  • Deny wins over everything — the allowlist, the always-on set, and GHL_ENABLE_ACCOUNT_ADMIN. A denied tool never registers: it is invisible to the model, so it cannot be called or discovered from a conversation.
  • There is deliberately no tool to change gating from inside Claude. Turning something back on requires editing your config file and fully restarting Claude — a human action.
  • Recovery core stays reachable: setup_ghl_mcp, request_license, get_mcp_version, and health_check ignore denial (with a logged warning) so you can never brick your install. Everything else — including the Firebase credential helpers enable_workflow_builder, auto_capture_firebase_script, capture_firebase_interactive, and install_skills (denying it also skips the bundled-skills auto-install) — is deniable.
  • Verify it took effect: run health_check in Claude. Its "Tool gating" section shows exactly what's disabled, whether account admin is on, and flags any misspelled name in your gating vars (typos do NOT disable anything — they warn instead).
  • Single-location shops that never want cross-account movement can also deny switch_location and register_location.
  • Honest limit: this gate is enforced at server startup from your config file, so it is as strong as your machine's file permissions. What it guarantees is that nothing inside a Claude conversation can widen the tool surface.

Troubleshooting

ErrorCauseFix
Only setup_ghl_mcp shows up; no other toolsBootstrap mode — credentials not yet activatedRun setup_ghl_mcp with all four required fields, then restart Claude
MCP tools don't appear (CLI)Server not registeredRun claude mcp add --scope user -t stdio ghl -- npx -y @elitedcs/ghl-mcp@latest
MCP tools don't appear (Desktop App)Config missing or wrongCheck ~/Library/Application Support/Claude/claude_desktop_config.json has a ghl entry under mcpServers (see Quick Start above for the exact block)
MCP tools don't appear (Desktop App)App not restartedQuit the Claude app completely (Cmd+Q on Mac) and reopen it
License key not foundWrong email or license_keyBoth must match exactly what we have on file. Check spam for the welcome email.
License key already activated on 3 devicesActivation limit hitEmail support@cliniclaunchlab.com to reset
locationId is requiredTool needs a location IDSet GHL_LOCATION_ID in your env, or tell Claude which location to use
GHL API Error 401Invalid or expired keyGenerate a new API key in GHL > Settings > Integrations
GHL API Error 403Key from wrong sub-accountCreate a new Private Integration inside the correct sub-account
GHL API Error 403 (alt)Missing permission scopeEdit your Private Integration in GHL and enable the required scope
GHL API Error 422Invalid request dataCheck the error message for which field is wrong
GHL API Error 429Rate limitedWait a moment and retry

About

Built by Elite DCs, LLC — a digital marketing and automation agency specializing in GoHighLevel implementations for healthcare practices and local businesses.

Tech stack: TypeScript, Node.js, esbuild, MCP SDK, Zod, GHL API v2, Firebase Auth

Version: 3.52.1

License

MIT License — see LICENSE for full text.

Copyright (c) 2026 Elite DCs, LLC. All rights reserved.

Keywords

mcp

FAQs

Package last updated on 30 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts