ghl-mcp-server
Click on "Deploy 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., "@ghl-mcp-server Check A2P registration status and list workflows for location abc123."
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.
ghl-mcp-server
An MCP server that lets AI agents (Claude Code, Claude Desktop, Cursor…) operate the parts of GoHighLevel that the official API doesn't expose: workflows, number pools, forms, funnels, custom fields, pipelines and A2P 10DLC status — by talking to GHL's internal web-app API.
Unofficial. This project uses undocumented endpoints of the GoHighLevel web app. Read the Disclaimer before using it.
Why
GoHighLevel's public API (and the official LeadConnector MCP) is great for data — contacts, conversations, opportunities. But much of the day-to-day work of a marketing agency is configuration: creating workflows, forms, custom fields, pipelines, checking phone tracking and A2P registration for every new client sub-account. That lives behind the web app's internal API.
This server was built while working with a GoHighLevel marketing agency, to let an AI agent audit and set up client sub-accounts instead of clicking through the UI by hand.
Related MCP server: ghl-internal-cli
Tools (21)
Every tool accepts an optional location_id (the GHL sub-account). If omitted, GHL_LOCATION_ID
is used. Every tool returns the same shape:
{"ok": bool, "status": int, "data": ..., "text": ..., "error": ...}.
Read
Tool | What it does | Internal endpoint |
| Workflows and folders of a sub-account |
|
| One workflow in full: triggers, actions, branches |
|
| Number pools (dynamic call tracking) |
|
| Phone numbers of the sub-account |
|
| Phone-system sub-account record incl. A2P state |
|
| A2P 10DLC standard-registration settings (read-only) |
|
| Forms |
|
| Funnels and websites |
|
| Custom fields (contact + opportunity) with ids and fieldKeys |
|
| Opportunity pipelines and stages |
|
Write (contracts verified end-to-end on a test sub-account)
Tool | What it does | Internal endpoint |
| Create a custom field (12 data types, contact/opportunity) |
|
| Rename a custom field |
|
| Delete a custom field |
|
| Create a custom value (reusable variable) |
|
| Create a tag |
|
| Create a pipeline with ordered stages |
|
| Create an empty draft workflow |
|
| Delete a workflow |
|
| Create an empty form |
|
| Create a contact |
|
Generic
Tool | What it does |
| Passthrough to any endpoint in |
Set GHL_READ_ONLY=1 to disable every write tool and non-GET passthrough call — recommended
while exploring a production account.
Architecture
flowchart LR
A["AI client<br/>(Claude Code / Desktop / Cursor)"] -- "MCP (stdio)" --> S["ghl-mcp-server<br/>FastMCP · 21 tools"]
S --> T{"Transport<br/>GHL_TRANSPORT"}
T -- "browser (default)" --> B["Your Chrome, logged in<br/>via CDP :9222<br/>(or headless + your exported session)"]
B -- "XHR inside the page<br/>+ live bearer captured from the app" --> API
T -- "token" --> H["httpx<br/>Bearer GHL_API_TOKEN"]
H --> API["GHL internal API<br/>backend.leadconnectorhq.com<br/>services.leadconnectorhq.com"]src/ghl_mcp_server/server.py— tool definitions, validation, read-only guard.src/ghl_mcp_server/transport.py— the two transports, with timeouts and normalized errors.src/ghl_mcp_server/config.py— everything account-specific comes from environment variables.
Transports
browser (recommended). GHL's internal API sits behind defenses that plain HTTP clients
struggle with (see below), so by default the server rides on a real browser session:
You start Chrome with remote debugging and log into GHL yourself (once):
# macOS example — use a dedicated profile directory "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \ --remote-debugging-port=9222 --user-data-dir="$HOME/.ghl-chrome-profile"The server attaches over CDP (
GHL_CDP_URL), opens the sub-account and installs a small script that records theAuthorizationheader the GHL app itself uses.Requests are sent with
XMLHttpRequestfrom inside the page, reusing the browser's TLS fingerprint, cookies and the app's live token. The app keeps refreshing the token itself.Because GHL issues different tokens per service, each tool first "warms" the matching UI module (e.g. Settings → Custom Fields) so the right token is available.
Optional headless fallback: point GHL_STORAGE_STATE at a Playwright storage-state file you
exported yourself. That file holds live session cookies — keep it outside the repo, chmod 600.
The server never writes secrets to disk and never closes your own Chrome.
token. Direct HTTPS with httpx and GHL_API_TOKEN. Simpler, but the web-app JWT expires
and rotates, and Cloudflare may answer 403 / error 1010 to non-browser clients; the server
reports that case explicitly so you can switch to browser.
Installation
git clone https://github.com/<your-user>/ghl-mcp-server.git
cd ghl-mcp-server
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[browser]" # or: pip install -r requirements.txt
python -m playwright install chromium # only needed for the headless fallback
cp .env.example .env # then fill in your values (never commit .env)Configuration
Variable | Required | Description |
| no |
|
| recommended | Default sub-account id |
| token transport | Bearer token for the internal API |
| browser transport | The URL you log into ( |
| no | Chrome DevTools endpoint (default |
| no | Path to your exported Playwright session (headless fallback) |
| no | Agency id, only for |
| no | Per-request timeout in seconds (default 30) |
| no |
|
Claude Code
claude mcp add ghl-internal \
-e GHL_TRANSPORT=browser \
-e GHL_APP_URL=https://app.gohighlevel.com \
-e GHL_LOCATION_ID=your-location-id \
-e GHL_READ_ONLY=1 \
-- /path/to/ghl-mcp-server/.venv/bin/python -m ghl_mcp_serverClaude Desktop / Cursor (mcpServers JSON)
{
"mcpServers": {
"ghl-internal": {
"command": "/path/to/ghl-mcp-server/.venv/bin/python",
"args": ["-m", "ghl_mcp_server"],
"env": {
"GHL_TRANSPORT": "browser",
"GHL_APP_URL": "https://app.gohighlevel.com",
"GHL_CDP_URL": "http://127.0.0.1:9222",
"GHL_LOCATION_ID": "your-location-id",
"GHL_READ_ONLY": "1"
}
}
}
}Then ask things like "list the workflows of this sub-account and tell me which ones are still drafts" or "create the custom fields Google Ads Click ID and UTM Source as contact fields".
Tests
The offline test suite uses a fake transport — no network, no browser:
pip install -e ".[dev]" && pytest -qReverse-engineering GHL's internal API
The official API didn't cover what the agency needed, so the first step was to map what the web app itself does.
1. Capture. A real Chrome session (logged in manually — Google's login blocks automation) was driven through every module of a sub-account — dashboard, automation, sites, settings, phone system, agency view — with Playwright attached over the Chrome DevTools Protocol. Every XHR/fetch the app made was recorded to JSONL (method, URL, status, request and response shape). Result: 4,673 captured calls, all read-only navigation.
2. Catalog. A build script normalized URLs into templates (20-character GHL ids, UUIDs and
numbers replaced by placeholders), grouped them by resource and summarized request/response
shapes. Result: 259 unique endpoints (method + template) in roughly 60 resource groups,
257 of them on GHL's two API hosts. The generic, data-free version is in
docs/ENDPOINTS.md.
3. Find the defenses. Plain HTTP didn't work, and figuring out why shaped the transport:
Defense | Evidence | Workaround |
Cloudflare filters by TLS fingerprint | Python | Send requests from inside the browser |
CSP blocks cross-host |
| Use |
Bearer JWT rotates in memory | Token in | Hook the app's own XHR/fetch to read the live header |
Tokens are per service | Workflow token rejected by custom-fields API | "Warm" the matching UI module first |
Mandatory | 401 "version header was not found" | Always send |
4. Verify writes. Passive capture only shows reads, so create/update/delete contracts were
probed actively on a test sub-account with minimal payloads and a throw-away name prefix,
then cleaned up. 15 contracts (custom fields, custom values, tags, pipelines, workflows, forms,
contacts) returned 200/201 and are marked ✅ verified in the catalog. End-to-end smoke test
through the MCP: create workflow → it appears in the list → delete it, three 200s.
Known gaps. Number-pool creation and A2P submission were not probed (they cost money and need a provisioned phone system). Workflow triggers are stored separately from the workflow graph and are not handled by a dedicated tool yet.
How it was built
Designed, directed and tested by Yeison Munera with AI pair-programming (Claude Code): the capture strategy, the choice of transports and every live verification were done by hand on real accounts; much of the code was written with the assistant.
Disclaimer
This is not an official GoHighLevel / LeadConnector product and is not affiliated with or endorsed by them.
It relies on an internal, undocumented API that can change or break at any time without notice.
Use it only with accounts you own or are explicitly authorized to operate, and make sure your use complies with GoHighLevel's Terms of Service. You are responsible for what an AI agent does with write access — start with
GHL_READ_ONLY=1.Never commit tokens, exported sessions, browser profiles or captured traffic: they contain live secrets and customer data. The provided
.gitignoreexcludes them.
License
MIT © 2026 Yeison Munera
Built by Yeison Munera · TechCube
Available Tools
21 toolsghl_a2p_registration_statusGhl A2P Registration StatusA
Read the A2P 10DLC standard registration settings of a sub-account. Never submits anything.
Inputs: company_id, location_id. Returns: object
ghl_a2p_statusGhl A2P StatusA
Read the phone-system sub-account record, including A2P 10DLC (US SMS) state. Read-only.
Inputs: location_id. Returns: object
ghl_callGhl CallA
Generic passthrough to any internal endpoint listed in docs/ENDPOINTS.md.
Use it for anything without a dedicated tool. Non-GET methods WRITE to the live account and are refused when GHL_READ_ONLY is enabled.
Inputs: path (required), method (required), body, host, +2 more. Returns: object
ghl_create_contactGhl Create ContactA
Create a contact. WRITES to the live account. Provide at least an email or a phone.
Inputs: email, phone, last_name, first_name, +1 more. Returns: object
ghl_create_custom_fieldGhl Create Custom FieldA
Create a custom field. WRITES to the live account.
Inputs: name (required), model, data_type, location_id. Returns: object
ghl_create_custom_valueGhl Create Custom ValueC
Create a custom value (a reusable sub-account variable such as {{custom_values.x}}). WRITES.
Inputs: name (required), value (required), location_id. Returns: object
ghl_create_formGhl Create FormA
Create an empty form and return its id. WRITES to the live account.
Inputs: name (required), location_id. Returns: object
ghl_create_pipelineGhl Create PipelineC
Create an opportunity pipeline. WRITES to the live account.
Inputs: name (required), stages (required), location_id. Returns: object
ghl_create_tagGhl Create TagC
Create a contact tag. WRITES to the live account.
Inputs: name (required), location_id. Returns: object
ghl_create_workflowGhl Create WorkflowA
Create an empty draft workflow and return its id. WRITES to the live account.
Triggers and actions can then be added with ghl_call (see docs/ENDPOINTS.md).
Inputs: name (required), location_id. Returns: object
ghl_delete_custom_fieldGhl Delete Custom FieldA
Delete a custom field. DESTRUCTIVE: data stored in the field is lost.
Inputs: field_id (required), location_id. Returns: object
ghl_delete_workflowGhl Delete WorkflowB
Delete a workflow by UUID. DESTRUCTIVE.
Inputs: workflow_id (required), location_id. Returns: object
ghl_get_workflowGhl Get WorkflowA
Get one workflow in full: triggers, actions (nodes) and branches.
Inputs: workflow_id (required), location_id. Returns: object
ghl_list_custom_fieldsGhl List Custom FieldsB
List custom fields (contact and opportunity models), including their ids and fieldKeys.
Inputs: limit, location_id. Returns: object
ghl_list_formsGhl List FormsC
List the forms of a sub-account.
Inputs: limit, location_id. Returns: object
ghl_list_funnelsGhl List FunnelsB
List funnels and websites of a sub-account.
Inputs: limit, location_id. Returns: object
ghl_list_number_poolsGhl List Number PoolsB
List number pools (dynamic call-tracking numbers shown on websites).
Inputs: location_id. Returns: object
ghl_list_phone_numbersGhl List Phone NumbersC
List the phone numbers provisioned in the sub-account's phone system.
Inputs: location_id. Returns: object
ghl_list_pipelinesGhl List PipelinesC
List opportunity pipelines and their stages.
Inputs: location_id. Returns: object
ghl_list_workflowsGhl List WorkflowsB
List automation workflows and folders of a sub-account.
Inputs: limit, parent_id, location_id. Returns: object
ghl_update_custom_fieldGhl Update Custom FieldB
Rename a custom field. WRITES to the live account.
Inputs: name (required), field_id (required), location_id. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Each tool targets a distinct resource and action—custom fields, workflows, forms, contacts, pipelines, tags, phone numbers, etc. Even the two A2P status tools are clearly separated by their scope (sub-account record vs. registration settings). The generic ghl_call is explicitly marked as a passthrough for anything else, so no ambiguity.
All tools share the ghl_ prefix and follow a verb_noun pattern (create, update, delete, list, get, call). Minor inconsistencies include plural vs. singular nouns (e.g., ghl_list_number_pools vs. ghl_list_forms) and two non-verb tools (ghl_a2p_status, ghl_a2p_registration_status), but the overall convention is predictable and readable.
With 21 tools, the count is slightly above the ideal range, but it is justified by the breadth of the GoHighLevel domain—covering CRM entities, phone systems, funnels, workflows, and more. Each tool serves a distinct purpose, so there is no redundancy; the count feels appropriate for the scope.
The tool surface has notable gaps: contacts only have create (no list/update/delete), tags only have create, custom values only have create, and forms/pipelines lack update/delete. However, the generic ghl_call passthrough provides a fallback for any missing endpoint, so agents are not dead-ended. This makes the set partially complete.
Maintenance
Related MCP Connectors
GoHighLevel MCP server for ChatGPT, Claude and any AI agent: create workflow, add trigger, add action, publish workflow, read workflow stats and edit funnel page SEO in your own GoHighLevel account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to GoHighLevel yourself; Cotlet does not store your password and you need no GoHighLevel API key. About the official GoHighLevel API: Yes. HighLevel has a public REST API and official MCP servers with more than 550 read, create, update and delete operations (checked 27 Oct 2026). Setup and FAQ: https://cotlet.dev/integrations/gohighlevel-api-mcp-server
Let your AI agent operate any website through a real, logged-in browser session.
Let AI agents use your real, signed-in Chrome: tabs, clicks, forms, screenshots and video.
Stealth web automation for AI agents. Login, signup, navigate, screenshot.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to manage GoHighLevel workspaces through natural language, with 508 tools across 18 domains for complete CRM, marketing, and workflow automation.Apache 2.0
- AlicenseCqualityNot gradedmaintenanceEnables AI agents to interact with GoHighLevel's internal v2 API, managing Agent Studio, Voice AI, and Knowledge Base features through natural language commands.471MIT
- FlicenseBqualityCmaintenanceEnables AI assistants to operate GoHighLevel agencies through the official v2 API, managing contacts, deals, conversations, appointments, tags, custom fields, workflows, and pipeline reports with bulk operations and fail-closed security.12-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to manage GoHighLevel sub-account CRM data, including contacts, custom fields, tags, workflows, and calendar configurations through natural language.MIT