@elitedcs/ghl-mcp 3.4.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +55 -0
- package/README.md +7 -6
- package/dist/index.js +83 -10
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,60 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.5.0 — `enable_workflow_builder` tool (one-call Firebase upgrade)
|
|
4
|
+
|
|
5
|
+
**176 tools across 38 modules. Bundle: 278.7 KB.**
|
|
6
|
+
|
|
7
|
+
A clean second-phase setup path for buyers who skipped Firebase on day one.
|
|
8
|
+
|
|
9
|
+
### The friction this removes
|
|
10
|
+
Before v3.5.0, a buyer who installed without Firebase (the 90% case for non-technical buyers — they get the 168 core tools and skip workflow builder until they need it) had to **re-run `setup_ghl_mcp` with all 7 fields** when they were ready to add Firebase later. Email, license key, GHL API key, location ID — all re-entered even though they were already saved.
|
|
11
|
+
|
|
12
|
+
### The fix
|
|
13
|
+
New tool `enable_workflow_builder` takes only the 3 Firebase fields (`ghl_user_id`, `ghl_firebase_api_key`, `ghl_firebase_refresh_token`). It reads the existing credentials file, validates the Firebase token refresh against `securetoken.googleapis.com`, merges the Firebase fields in, and writes back. Quit + restart Claude → 8 additional tools live.
|
|
14
|
+
|
|
15
|
+
If Firebase validation fails, the error message names the two most common causes (rotated refresh token, mismatched API key + refresh token from different rows) and links to the DevTools capture page.
|
|
16
|
+
|
|
17
|
+
### Discoverability
|
|
18
|
+
- `setup_ghl_mcp`'s success message now tells buyers about `enable_workflow_builder` when Firebase wasn't provided: *"To enable Workflow Builder later (8 extra tools): run enable_workflow_builder with your three Firebase values. No need to re-enter license/API key/location ID."*
|
|
19
|
+
- `health_check`'s Firebase "skip" detail mentions the tool too. Buyers running `health_check` for the first time see exactly how to add the missing piece.
|
|
20
|
+
|
|
21
|
+
### Registration
|
|
22
|
+
- **Non-bootstrap mode only.** Requires existing credentials — bootstrap mode buyers should run `setup_ghl_mcp` first.
|
|
23
|
+
- Returns a clear error if no credentials file exists yet.
|
|
24
|
+
|
|
25
|
+
### Verified end-to-end
|
|
26
|
+
- Tool registers (176 total).
|
|
27
|
+
- Valid Firebase credentials → 4 basic fields preserved + 3 Firebase fields added.
|
|
28
|
+
- Bogus Firebase credentials → clear error message + `isError: true`.
|
|
29
|
+
- Test cleanup left real credentials intact.
|
|
30
|
+
|
|
31
|
+
### Files changed
|
|
32
|
+
- `src/setup-tool.ts` — added `registerEnableWorkflowBuilderTool` + import `readCredentials`; updated `setup_ghl_mcp` success message to mention the new tool when Firebase isn't provided.
|
|
33
|
+
- `src/index.ts` — registers `enable_workflow_builder` in non-bootstrap mode.
|
|
34
|
+
- `src/tools/diagnostics.ts` — `health_check` Firebase skip message now points at `enable_workflow_builder`.
|
|
35
|
+
|
|
36
|
+
## 3.4.1 — fixes from real-world testing of v3.4.0 tools
|
|
37
|
+
|
|
38
|
+
**175 tools across 38 modules. Bundle: 275.2 KB.**
|
|
39
|
+
|
|
40
|
+
Two bugs caught when exercising v3.4.0's `health_check` and `validate_workflow` end-to-end against a real sandbox workflow:
|
|
41
|
+
|
|
42
|
+
1. **`health_check` API-key probe used the wrong endpoint.** `/locations/search` is agency-level — sub-account Private Integration keys (the kind buyers have) get 403, not 200, even when the key is fine. Fixed to use `/locations/{locationId}` which sub-account keys can call. Also added explicit handling for 403 with a clearer message ("doesn't have access to this location" vs. just "limited").
|
|
43
|
+
|
|
44
|
+
2. **`validate_workflow` errored when checking workflow references.** Called `builderClient.listWorkflowsFull()`, which doesn't exist — the actual method is `listWorkflows()`. Any workflow containing a `remove_from_workflow` action or a trigger with an `add_to_workflow` reference would crash the validator. Fixed.
|
|
45
|
+
|
|
46
|
+
Also: `src/index.ts` startup `validateApiKey()` had the same wrong-endpoint bug as `health_check`; fixed for consistency. Buyers will now see "API key validated" or a clear 403 message on startup instead of silent ambiguity.
|
|
47
|
+
|
|
48
|
+
### Verified end-to-end
|
|
49
|
+
Re-ran the spawn-handshake test against QA Test Clinic v3:
|
|
50
|
+
- `health_check` returns 5/5 PASS ("All systems go.")
|
|
51
|
+
- `validate_workflow` on the CLL Onboarding Form Submitted workflow correctly scans 2 references (form.id + self-referencing workflow.id), reports 0 issues, surfaces the self-reference as an informational note.
|
|
52
|
+
|
|
53
|
+
### Files changed
|
|
54
|
+
- `src/tools/diagnostics.ts` — endpoint fix + 403 handling
|
|
55
|
+
- `src/tools/validators.ts` — method name fix
|
|
56
|
+
- `src/index.ts` — same endpoint fix in startup probe
|
|
57
|
+
|
|
3
58
|
## 3.4.0 — health_check tool + validate_workflow expansion + smoke-test CI
|
|
4
59
|
|
|
5
60
|
**175 tools across 38 modules. Bundle: 274.6 KB.**
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# GHL Command — GoHighLevel MCP Server
|
|
2
2
|
|
|
3
|
-
**Full GoHighLevel API access for Claude.**
|
|
3
|
+
**Full GoHighLevel API access for Claude.** 176 tools across 36 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.
|
|
4
4
|
|
|
5
5
|
**Distributed via npm as [`@elitedcs/ghl-mcp`](https://www.npmjs.com/package/@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).
|
|
6
6
|
|
|
@@ -98,7 +98,7 @@ Run setup_ghl_mcp to activate GHL Command:
|
|
|
98
98
|
ghl_location_id: YOUR_LOCATION_ID
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
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** — all
|
|
101
|
+
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** — all 168 tools are now unlocked.
|
|
102
102
|
|
|
103
103
|
### 4. Try it
|
|
104
104
|
|
|
@@ -138,7 +138,7 @@ https://app.gohighlevel.com/v2/location/YOUR_LOCATION_ID/dashboard
|
|
|
138
138
|
|
|
139
139
|
## Enable Workflow Builder (Optional)
|
|
140
140
|
|
|
141
|
-
The 8 workflow builder tools use GHL'''s internal API and require Firebase credentials. Without them, the other
|
|
141
|
+
The 8 workflow builder tools use GHL'''s internal API and require Firebase credentials. Without them, the other 168 tools work fine — you just won'''t have workflow editing.
|
|
142
142
|
|
|
143
143
|
Grab the three values from your GHL browser session, then re-run `setup_ghl_mcp` with them:
|
|
144
144
|
|
|
@@ -167,9 +167,9 @@ Re-run setup_ghl_mcp with workflow builder:
|
|
|
167
167
|
|
|
168
168
|
---
|
|
169
169
|
|
|
170
|
-
## Tools (
|
|
170
|
+
## Tools (176)
|
|
171
171
|
|
|
172
|
-
> **v3.
|
|
172
|
+
> **v3.5.0 adds `enable_workflow_builder`** — a one-call upgrade path for adding Firebase credentials to an existing install. Buyers who skip Firebase on day one can now add it later without re-entering license / API key / location ID. Reads existing credentials, validates Firebase, merges, writes back.
|
|
173
173
|
|
|
174
174
|
### CRM & Contacts (15 tools)
|
|
175
175
|
|
|
@@ -413,12 +413,13 @@ Re-run setup_ghl_mcp with workflow builder:
|
|
|
413
413
|
| `get_template_questionnaire` | Get the questionnaire for a template — present to user conversationally |
|
|
414
414
|
| `deploy_template` | Deploy a complete sub-account setup from a template (tags, fields, pipelines, workflows, forms). Supports dry-run mode. |
|
|
415
415
|
|
|
416
|
-
###
|
|
416
|
+
### Setup & Diagnostics (3 tools)
|
|
417
417
|
|
|
418
418
|
| Tool | What It Does |
|
|
419
419
|
|---|---|
|
|
420
420
|
| `get_mcp_version` | Check installed version against the latest published to npm. Confirms an upgrade landed after restarting Claude. Available even before GHL credentials are configured. |
|
|
421
421
|
| `health_check` | Run 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. |
|
|
422
|
+
| `enable_workflow_builder` | Add Firebase credentials to an existing install to unlock the 8 workflow builder tools. No need to re-enter license / API key / location ID. Run this any time after the basic setup, on the buyer's schedule. |
|
|
422
423
|
|
|
423
424
|
### Other Modules
|
|
424
425
|
|
package/dist/index.js
CHANGED
|
@@ -31,8 +31,8 @@ var require_package = __commonJS({
|
|
|
31
31
|
"package.json"(exports2, module2) {
|
|
32
32
|
module2.exports = {
|
|
33
33
|
name: "@elitedcs/ghl-mcp",
|
|
34
|
-
version: "3.
|
|
35
|
-
description: "GoHighLevel MCP Server for Claude.
|
|
34
|
+
version: "3.5.0",
|
|
35
|
+
description: "GoHighLevel MCP Server for Claude. 176 tools \u2014 full CRM, automation, marketing control, and the only programmatic GHL workflow builder.",
|
|
36
36
|
main: "dist/index.js",
|
|
37
37
|
bin: {
|
|
38
38
|
"ghl-mcp": "dist/index.js"
|
|
@@ -6135,7 +6135,7 @@ function registerValidatorTools(server2, client, builderClient) {
|
|
|
6135
6135
|
fetches.users = client.get("/users/", { params: { locationId: locationId2 } });
|
|
6136
6136
|
}
|
|
6137
6137
|
if (refCategories.has("workflow")) {
|
|
6138
|
-
fetches.workflows = builderClient.
|
|
6138
|
+
fetches.workflows = builderClient.listWorkflows(200);
|
|
6139
6139
|
}
|
|
6140
6140
|
if (refCategories.has("form")) {
|
|
6141
6141
|
fetches.forms = client.get("/forms/", { params: { locationId: locationId2 } });
|
|
@@ -6304,8 +6304,12 @@ function registerDiagnosticTools(server2, installedVersion, client, builderClien
|
|
|
6304
6304
|
const checks = [];
|
|
6305
6305
|
const versionPromise = getVersionStatus(installedVersion);
|
|
6306
6306
|
const apiKeyPromise = (async () => {
|
|
6307
|
+
const locId = client.defaultLocationId;
|
|
6308
|
+
if (!locId) {
|
|
6309
|
+
return { name: "GHL API key", status: "warn", detail: `Can't validate without a default location ID. Set GHL_LOCATION_ID or run setup_ghl_mcp.` };
|
|
6310
|
+
}
|
|
6307
6311
|
try {
|
|
6308
|
-
const response = await fetch(
|
|
6312
|
+
const response = await fetch(`https://services.leadconnectorhq.com/locations/${locId}`, {
|
|
6309
6313
|
method: "GET",
|
|
6310
6314
|
headers: {
|
|
6311
6315
|
Authorization: `Bearer ${client.getApiKey()}`,
|
|
@@ -6318,8 +6322,11 @@ function registerDiagnosticTools(server2, installedVersion, client, builderClien
|
|
|
6318
6322
|
if (response.status === 401) {
|
|
6319
6323
|
return { name: "GHL API key", status: "fail", detail: `401 Unauthorized \u2014 key ${client.getApiKeyPrefix()} is invalid or revoked. Run setup_ghl_mcp with a fresh key.` };
|
|
6320
6324
|
}
|
|
6325
|
+
if (response.status === 403) {
|
|
6326
|
+
return { name: "GHL API key", status: "fail", detail: `403 Forbidden \u2014 key ${client.getApiKeyPrefix()} doesn't have access to location ${locId}. The key may belong to a different sub-account.` };
|
|
6327
|
+
}
|
|
6321
6328
|
if (!response.ok) {
|
|
6322
|
-
return { name: "GHL API key", status: "warn", detail: `HTTP ${response.status}
|
|
6329
|
+
return { name: "GHL API key", status: "warn", detail: `HTTP ${response.status} reading /locations/${locId} \u2014 key may be limited or GHL is having issues.` };
|
|
6323
6330
|
}
|
|
6324
6331
|
return { name: "GHL API key", status: "pass", detail: `Valid (key ${client.getApiKeyPrefix()}).` };
|
|
6325
6332
|
} catch (error) {
|
|
@@ -6341,7 +6348,7 @@ function registerDiagnosticTools(server2, installedVersion, client, builderClien
|
|
|
6341
6348
|
})();
|
|
6342
6349
|
const firebasePromise = (async () => {
|
|
6343
6350
|
if (!builderClient) {
|
|
6344
|
-
return { name: "Firebase auth (workflow builder)", status: "skip", detail: "Not configured.
|
|
6351
|
+
return { name: "Firebase auth (workflow builder)", status: "skip", detail: "Not configured. The 8 workflow builder tools need Firebase credentials. The other 168 tools work fine without. To add it: run enable_workflow_builder with the three Firebase values from your GHL browser session (see elitedcs.com/ghl-mcp-firebase for DevTools steps)." };
|
|
6345
6352
|
}
|
|
6346
6353
|
const result = await builderClient.checkAuth();
|
|
6347
6354
|
if (result.ok) {
|
|
@@ -6634,8 +6641,9 @@ Note: Firebase credentials rejected (${fb.error}). Saved without Workflow Builde
|
|
|
6634
6641
|
ghl_firebase_api_key: workflowBuilderEnabled ? args.ghl_firebase_api_key?.trim() : void 0,
|
|
6635
6642
|
ghl_firebase_refresh_token: workflowBuilderEnabled ? args.ghl_firebase_refresh_token?.trim() : void 0
|
|
6636
6643
|
});
|
|
6637
|
-
const toolCount = workflowBuilderEnabled ? "
|
|
6644
|
+
const toolCount = workflowBuilderEnabled ? "176" : "168";
|
|
6638
6645
|
const wfLine = workflowBuilderEnabled ? "Workflow Builder: enabled." : "Workflow Builder: not configured (optional).";
|
|
6646
|
+
const wfTip = workflowBuilderEnabled ? "" : "\nTo enable Workflow Builder later (8 extra tools): run enable_workflow_builder with your three Firebase values. No need to re-enter license/API key/location ID.";
|
|
6639
6647
|
return {
|
|
6640
6648
|
content: [{
|
|
6641
6649
|
type: "text",
|
|
@@ -6650,7 +6658,7 @@ Note: Firebase credentials rejected (${fb.error}). Saved without Workflow Builde
|
|
|
6650
6658
|
``,
|
|
6651
6659
|
`**Restart Claude (quit fully and reopen) to load all ${toolCount} tools.**`,
|
|
6652
6660
|
``,
|
|
6653
|
-
`After restart, try: "List my GHL contacts" or "Show my pipelines"
|
|
6661
|
+
`After restart, try: "List my GHL contacts" or "Show my pipelines".${wfTip}`,
|
|
6654
6662
|
workflowBuilderNote
|
|
6655
6663
|
].join("\n")
|
|
6656
6664
|
}]
|
|
@@ -6658,6 +6666,67 @@ Note: Firebase credentials rejected (${fb.error}). Saved without Workflow Builde
|
|
|
6658
6666
|
}
|
|
6659
6667
|
);
|
|
6660
6668
|
}
|
|
6669
|
+
function registerEnableWorkflowBuilderTool(server2) {
|
|
6670
|
+
server2.tool(
|
|
6671
|
+
"enable_workflow_builder",
|
|
6672
|
+
"Add Firebase credentials to an existing GHL Command install to unlock the 8 workflow builder tools (create/edit/clone/delete/publish workflows, validate_workflow, get_trigger_registry). Requires you've already run setup_ghl_mcp. Capture the three Firebase values from your GHL browser session \u2014 see elitedcs.com/ghl-mcp-firebase for step-by-step DevTools instructions. Tool count goes from 168 to 176 after the next Claude restart.",
|
|
6673
|
+
{
|
|
6674
|
+
ghl_user_id: import_zod42.z.string().min(10).describe("Firebase User ID (uid). DevTools \u2192 Application \u2192 IndexedDB \u2192 firebaseLocalStorageDb \u2192 firebaseLocalStorage \u2192 the value.uid field of the firebase:authUser row."),
|
|
6675
|
+
ghl_firebase_api_key: import_zod42.z.string().min(10).describe("Firebase API Key starting with 'AIza'. The string between 'firebase:authUser:' and ':[DEFAULT]' in the row's Key column."),
|
|
6676
|
+
ghl_firebase_refresh_token: import_zod42.z.string().min(10).describe("Firebase refresh token. value.stsTokenManager.refreshToken in the firebase:authUser row.")
|
|
6677
|
+
},
|
|
6678
|
+
async (args) => {
|
|
6679
|
+
const existing = readCredentials();
|
|
6680
|
+
if (!existing) {
|
|
6681
|
+
return {
|
|
6682
|
+
content: [{
|
|
6683
|
+
type: "text",
|
|
6684
|
+
text: "No existing credentials found at " + credentialsPath() + ".\n\nRun setup_ghl_mcp first to register your license and basic GHL credentials, then come back to this tool to add Workflow Builder."
|
|
6685
|
+
}],
|
|
6686
|
+
isError: true
|
|
6687
|
+
};
|
|
6688
|
+
}
|
|
6689
|
+
const fb = await validateFirebase(args.ghl_firebase_api_key.trim(), args.ghl_firebase_refresh_token.trim());
|
|
6690
|
+
if (!fb.ok) {
|
|
6691
|
+
return {
|
|
6692
|
+
content: [{
|
|
6693
|
+
type: "text",
|
|
6694
|
+
text: `Firebase credentials rejected: ${fb.error}
|
|
6695
|
+
|
|
6696
|
+
Common causes:
|
|
6697
|
+
- The refresh token has rotated (they rotate every few weeks). Re-extract from your GHL browser tab.
|
|
6698
|
+
- The Firebase API Key doesn't match the refresh token's project. Both must come from the SAME firebase:authUser row.
|
|
6699
|
+
|
|
6700
|
+
DevTools steps: https://elitedcs.com/ghl-mcp-firebase`
|
|
6701
|
+
}],
|
|
6702
|
+
isError: true
|
|
6703
|
+
};
|
|
6704
|
+
}
|
|
6705
|
+
writeCredentials({
|
|
6706
|
+
...existing,
|
|
6707
|
+
ghl_user_id: args.ghl_user_id.trim(),
|
|
6708
|
+
ghl_firebase_api_key: args.ghl_firebase_api_key.trim(),
|
|
6709
|
+
ghl_firebase_refresh_token: args.ghl_firebase_refresh_token.trim()
|
|
6710
|
+
});
|
|
6711
|
+
return {
|
|
6712
|
+
content: [{
|
|
6713
|
+
type: "text",
|
|
6714
|
+
text: [
|
|
6715
|
+
"Workflow Builder enabled!",
|
|
6716
|
+
"",
|
|
6717
|
+
"Firebase credentials verified and saved.",
|
|
6718
|
+
"",
|
|
6719
|
+
"**Restart Claude (quit fully and reopen) to load the 8 additional workflow builder tools (176 total).**",
|
|
6720
|
+
"",
|
|
6721
|
+
'After restart, try: "List my workflows in full detail" or "Validate workflow <id>".',
|
|
6722
|
+
"",
|
|
6723
|
+
"Note: Firebase refresh tokens rotate every few weeks. If workflow tools stop working, re-run enable_workflow_builder with fresh values from a current GHL browser session."
|
|
6724
|
+
].join("\n")
|
|
6725
|
+
}]
|
|
6726
|
+
};
|
|
6727
|
+
}
|
|
6728
|
+
);
|
|
6729
|
+
}
|
|
6661
6730
|
|
|
6662
6731
|
// src/tools/meta.ts
|
|
6663
6732
|
function registerMetaTools(server2, installedVersion) {
|
|
@@ -6761,15 +6830,16 @@ if (inBootstrapMode) {
|
|
|
6761
6830
|
} else {
|
|
6762
6831
|
const client = new GHLClient({ apiKey, locationId });
|
|
6763
6832
|
registerAllTools(server, client, registry, pkg.version);
|
|
6833
|
+
registerEnableWorkflowBuilderTool(server);
|
|
6764
6834
|
if (fileCreds && !process.env.GHL_API_KEY) {
|
|
6765
6835
|
process.stderr.write(`[ghl-mcp] Loaded credentials from ${credentialsPath()}
|
|
6766
6836
|
`);
|
|
6767
6837
|
}
|
|
6768
6838
|
}
|
|
6769
6839
|
async function validateApiKey() {
|
|
6770
|
-
if (!apiKey) return;
|
|
6840
|
+
if (!apiKey || !locationId) return;
|
|
6771
6841
|
try {
|
|
6772
|
-
const response = await fetch(
|
|
6842
|
+
const response = await fetch(`https://services.leadconnectorhq.com/locations/${locationId}`, {
|
|
6773
6843
|
method: "GET",
|
|
6774
6844
|
headers: {
|
|
6775
6845
|
Authorization: `Bearer ${apiKey}`,
|
|
@@ -6781,6 +6851,9 @@ async function validateApiKey() {
|
|
|
6781
6851
|
});
|
|
6782
6852
|
if (response.status === 401) {
|
|
6783
6853
|
process.stderr.write("[ghl-mcp] WARNING: API key is invalid (401 Unauthorized). Tools will fail.\n");
|
|
6854
|
+
} else if (response.status === 403) {
|
|
6855
|
+
process.stderr.write(`[ghl-mcp] WARNING: API key doesn't have access to location ${locationId} (403 Forbidden).
|
|
6856
|
+
`);
|
|
6784
6857
|
} else if (response.ok) {
|
|
6785
6858
|
process.stderr.write("[ghl-mcp] API key validated.\n");
|
|
6786
6859
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elitedcs/ghl-mcp",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "GoHighLevel MCP Server for Claude.
|
|
3
|
+
"version": "3.5.0",
|
|
4
|
+
"description": "GoHighLevel MCP Server for Claude. 176 tools — full CRM, automation, marketing control, and the only programmatic GHL workflow builder.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"ghl-mcp": "dist/index.js"
|