From 8998304b445b336a0a54017b7ef1d408ae3dd3b9 Mon Sep 17 00:00:00 2001 From: Steve Mannenbach Date: Tue, 18 Aug 2026 17:04:44 -0700 Subject: [PATCH 1/8] feat(ghl-browser): add browser-automation MCP with 130 tools covering full GHL UI New Playwright-based MCP server providing browser automation for GHL features not accessible via REST API. 25 tool modules cover workflows, funnels, pipelines, campaigns, social media, blogs, forms, email builder, page builder, proposals, calendars, reporting, memberships, invoices, reputation, affiliates, settings, trigger links, snapshots, conversation AI, media library, tags/custom fields, and automation templates. Includes discovery harness scripts and results from initial API endpoint sweep, plus a comprehensive integration test that validates all 36 read-only tools against the live GHL dashboard (all passing). --- src/ghl-browser/.gitignore | 11 + src/ghl-browser/README.md | 358 +++++++++++ src/ghl-browser/browser-state/.gitkeep | 1 + src/ghl-browser/discovery-harness-2.mjs | 193 ++++++ src/ghl-browser/discovery-harness-bundles.mjs | 215 +++++++ .../discovery-harness-forms-v2.mjs | 86 +++ src/ghl-browser/discovery-harness-forms.mjs | 157 +++++ .../discovery-harness-manifest.mjs | 86 +++ src/ghl-browser/discovery-harness-state.mjs | 80 +++ src/ghl-browser/discovery-harness-ws.mjs | 81 +++ src/ghl-browser/discovery-harness.mjs | 165 +++++ src/ghl-browser/discovery-results/FINDINGS.md | 154 +++++ .../discovery-results/_summary-triggers.json | 51 ++ .../discovery-results/_summary.json | 79 +++ .../discovery-results/app-manifest-full.json | 1 + src/ghl-browser/discovery-results/blogs.json | 73 +++ .../calendar-open-audit.json | 63 ++ .../discovery-results/calendars.json | 73 +++ .../discovery-results/campaigns.json | 73 +++ .../contacts-search-audit.json | 100 +++ .../discovery-results/contacts-state.json | 134 ++++ .../discovery-results/contacts-ws.json | 80 +++ .../discovery-results/contacts.json | 73 +++ .../discovery-results/conversations-ws.json | 80 +++ .../discovery-results/conversations.json | 73 +++ .../discovery-results/dashboard-state.json | 134 ++++ .../discovery-results/dashboard-ws.json | 104 +++ .../discovery-results/dashboard.json | 97 +++ .../discovery-results/funnels.json | 73 +++ .../invoices-list-audit.json | 74 +++ .../discovery-results/media-library.json | 73 +++ .../discovery-results/opportunities.json | 73 +++ .../reporting-attribution-audit.json | 85 +++ .../settings-company-audit.json | 108 ++++ .../settings-location-audit.json | 74 +++ .../discovery-results/settings.json | 107 ++++ .../discovery-results/social-planner.json | 73 +++ .../discovery-results/users-list-audit.json | 74 +++ .../workflows-open-first-audit.json | 63 ++ .../discovery-results/workflows-state.json | 134 ++++ .../discovery-results/workflows.json | 73 +++ src/ghl-browser/integration-test.mjs | 219 +++++++ src/ghl-browser/package.json | 29 + src/ghl-browser/smoke-test.mjs | 67 ++ src/ghl-browser/src/browser.ts | 182 ++++++ src/ghl-browser/src/helpers.ts | 64 ++ src/ghl-browser/src/index.ts | 61 ++ src/ghl-browser/src/login.ts | 64 ++ src/ghl-browser/src/tools/affiliates.ts | 552 ++++++++++++++++ .../src/tools/automation-templates.ts | 455 +++++++++++++ src/ghl-browser/src/tools/blogs.ts | 143 +++++ src/ghl-browser/src/tools/calendar-config.ts | 602 ++++++++++++++++++ src/ghl-browser/src/tools/campaigns.ts | 168 +++++ src/ghl-browser/src/tools/conversation-ai.ts | 573 +++++++++++++++++ src/ghl-browser/src/tools/discovery.ts | 372 +++++++++++ src/ghl-browser/src/tools/email-builder.ts | 422 ++++++++++++ src/ghl-browser/src/tools/form-builder.ts | 485 ++++++++++++++ src/ghl-browser/src/tools/funnels.ts | 145 +++++ src/ghl-browser/src/tools/index.ts | 62 ++ src/ghl-browser/src/tools/invoices.ts | 565 ++++++++++++++++ src/ghl-browser/src/tools/media-library.ts | 454 +++++++++++++ src/ghl-browser/src/tools/memberships.ts | 598 +++++++++++++++++ src/ghl-browser/src/tools/page-builder.ts | 521 +++++++++++++++ src/ghl-browser/src/tools/pipelines.ts | 130 ++++ src/ghl-browser/src/tools/proposals.ts | 566 ++++++++++++++++ src/ghl-browser/src/tools/reporting.ts | 565 ++++++++++++++++ src/ghl-browser/src/tools/reputation.ts | 405 ++++++++++++ src/ghl-browser/src/tools/settings.ts | 556 ++++++++++++++++ src/ghl-browser/src/tools/snapshots.ts | 439 +++++++++++++ src/ghl-browser/src/tools/social.ts | 139 ++++ src/ghl-browser/src/tools/tags-fields.ts | 557 ++++++++++++++++ src/ghl-browser/src/tools/trigger-links.ts | 440 +++++++++++++ src/ghl-browser/src/tools/utils.ts | 104 +++ src/ghl-browser/src/tools/workflows.ts | 211 ++++++ src/ghl-browser/tsconfig.json | 18 + 75 files changed, 14892 insertions(+) create mode 100644 src/ghl-browser/.gitignore create mode 100644 src/ghl-browser/README.md create mode 100644 src/ghl-browser/browser-state/.gitkeep create mode 100644 src/ghl-browser/discovery-harness-2.mjs create mode 100644 src/ghl-browser/discovery-harness-bundles.mjs create mode 100644 src/ghl-browser/discovery-harness-forms-v2.mjs create mode 100644 src/ghl-browser/discovery-harness-forms.mjs create mode 100644 src/ghl-browser/discovery-harness-manifest.mjs create mode 100644 src/ghl-browser/discovery-harness-state.mjs create mode 100644 src/ghl-browser/discovery-harness-ws.mjs create mode 100644 src/ghl-browser/discovery-harness.mjs create mode 100644 src/ghl-browser/discovery-results/FINDINGS.md create mode 100644 src/ghl-browser/discovery-results/_summary-triggers.json create mode 100644 src/ghl-browser/discovery-results/_summary.json create mode 100644 src/ghl-browser/discovery-results/app-manifest-full.json create mode 100644 src/ghl-browser/discovery-results/blogs.json create mode 100644 src/ghl-browser/discovery-results/calendar-open-audit.json create mode 100644 src/ghl-browser/discovery-results/calendars.json create mode 100644 src/ghl-browser/discovery-results/campaigns.json create mode 100644 src/ghl-browser/discovery-results/contacts-search-audit.json create mode 100644 src/ghl-browser/discovery-results/contacts-state.json create mode 100644 src/ghl-browser/discovery-results/contacts-ws.json create mode 100644 src/ghl-browser/discovery-results/contacts.json create mode 100644 src/ghl-browser/discovery-results/conversations-ws.json create mode 100644 src/ghl-browser/discovery-results/conversations.json create mode 100644 src/ghl-browser/discovery-results/dashboard-state.json create mode 100644 src/ghl-browser/discovery-results/dashboard-ws.json create mode 100644 src/ghl-browser/discovery-results/dashboard.json create mode 100644 src/ghl-browser/discovery-results/funnels.json create mode 100644 src/ghl-browser/discovery-results/invoices-list-audit.json create mode 100644 src/ghl-browser/discovery-results/media-library.json create mode 100644 src/ghl-browser/discovery-results/opportunities.json create mode 100644 src/ghl-browser/discovery-results/reporting-attribution-audit.json create mode 100644 src/ghl-browser/discovery-results/settings-company-audit.json create mode 100644 src/ghl-browser/discovery-results/settings-location-audit.json create mode 100644 src/ghl-browser/discovery-results/settings.json create mode 100644 src/ghl-browser/discovery-results/social-planner.json create mode 100644 src/ghl-browser/discovery-results/users-list-audit.json create mode 100644 src/ghl-browser/discovery-results/workflows-open-first-audit.json create mode 100644 src/ghl-browser/discovery-results/workflows-state.json create mode 100644 src/ghl-browser/discovery-results/workflows.json create mode 100644 src/ghl-browser/integration-test.mjs create mode 100644 src/ghl-browser/package.json create mode 100644 src/ghl-browser/smoke-test.mjs create mode 100644 src/ghl-browser/src/browser.ts create mode 100644 src/ghl-browser/src/helpers.ts create mode 100644 src/ghl-browser/src/index.ts create mode 100644 src/ghl-browser/src/login.ts create mode 100644 src/ghl-browser/src/tools/affiliates.ts create mode 100644 src/ghl-browser/src/tools/automation-templates.ts create mode 100644 src/ghl-browser/src/tools/blogs.ts create mode 100644 src/ghl-browser/src/tools/calendar-config.ts create mode 100644 src/ghl-browser/src/tools/campaigns.ts create mode 100644 src/ghl-browser/src/tools/conversation-ai.ts create mode 100644 src/ghl-browser/src/tools/discovery.ts create mode 100644 src/ghl-browser/src/tools/email-builder.ts create mode 100644 src/ghl-browser/src/tools/form-builder.ts create mode 100644 src/ghl-browser/src/tools/funnels.ts create mode 100644 src/ghl-browser/src/tools/index.ts create mode 100644 src/ghl-browser/src/tools/invoices.ts create mode 100644 src/ghl-browser/src/tools/media-library.ts create mode 100644 src/ghl-browser/src/tools/memberships.ts create mode 100644 src/ghl-browser/src/tools/page-builder.ts create mode 100644 src/ghl-browser/src/tools/pipelines.ts create mode 100644 src/ghl-browser/src/tools/proposals.ts create mode 100644 src/ghl-browser/src/tools/reporting.ts create mode 100644 src/ghl-browser/src/tools/reputation.ts create mode 100644 src/ghl-browser/src/tools/settings.ts create mode 100644 src/ghl-browser/src/tools/snapshots.ts create mode 100644 src/ghl-browser/src/tools/social.ts create mode 100644 src/ghl-browser/src/tools/tags-fields.ts create mode 100644 src/ghl-browser/src/tools/trigger-links.ts create mode 100644 src/ghl-browser/src/tools/utils.ts create mode 100644 src/ghl-browser/src/tools/workflows.ts create mode 100644 src/ghl-browser/tsconfig.json diff --git a/src/ghl-browser/.gitignore b/src/ghl-browser/.gitignore new file mode 100644 index 0000000000..46f83f2bfb --- /dev/null +++ b/src/ghl-browser/.gitignore @@ -0,0 +1,11 @@ +node_modules/ +dist/ +screenshots/ +browser-state/* +!browser-state/.gitkeep +.env +.env.local +*.tsbuildinfo +discovery-results/bundles/ +Thumbs.db +.DS_Store diff --git a/src/ghl-browser/README.md b/src/ghl-browser/README.md new file mode 100644 index 0000000000..618512dcfb --- /dev/null +++ b/src/ghl-browser/README.md @@ -0,0 +1,358 @@ +# ghl-browser-mcp + +Browser-automation MCP that covers the GHL features blocked from REST/PIT access: +workflow canvas, funnel page editor, pipeline drag-drop, campaign builder, +social media posting, blog authoring, form builder, email template builder, +website/funnel page builder, proposals/estimates, calendar configuration, +reporting dashboard, memberships/courses, invoices, reputation management, +affiliate management, sub-account settings, trigger links, snapshots, +conversation AI, media library, tags & custom fields, and automation templates. + +Uses Playwright with a **persistent browser profile** so the user logs in once +interactively (`npm run login`), and subsequent MCP runs reuse the stored +session cookies. + +## Prerequisites + +- Node 20+ +- Playwright Chromium installed: `npx playwright install chromium` + +## Login once + +```bash +cd ~/mcp-servers/src/ghl-browser +npm install +npm run build +npm run login +``` + +A Chromium window opens to `https://app.leadconnectorhq.com/`. Log in manually +with your GHL agency/user credentials. Once the dashboard appears, close the +window — the auth state is persisted to `./browser-state/`. + +## Build & run + +```bash +npm run build +node dist/index.js +``` + +Speaks MCP over stdio. Add to your MCP client config: + +```json +{ + "mcpServers": { + "ghl-browser": { + "command": "node", + "args": ["C:/Users/steve/mcp-servers/src/ghl-browser/dist/index.js"] + } + } +} +``` + +## Tools (130 total) + +All tools are best-effort UI automation. If GHL reorganizes the DOM, tools +may fail gracefully with a screenshot path in the error message for debugging. + +### Environment variables + +| Var | Default | Purpose | +|---|---|---| +| `GHL_BROWSER_HEADLESS` | `true` | Set `false` to see the browser while the MCP runs (debug only) | +| `GHL_SLOW_MO` | `0` | Milliseconds to delay between Playwright actions (debug) | +| `GHL_APP_URL` | `https://app.leadconnectorhq.com` | Override the GHL base URL (e.g. for a white-label host) | + +### Integration test + +Runs every read-only browser tool end-to-end against the live GHL dashboard: + +```bash +node integration-test.mjs +``` + +For verbose output (including full tool results): + +```bash +VERBOSE=1 node integration-test.mjs +``` + +### Workflow Builder (5) + +| Tool | Description | +|---|---| +| `ghl_browser_list_workflows` | List workflows visible on the Workflows index page | +| `ghl_browser_create_workflow` | Open the "Create Workflow" dialog and submit a name | +| `ghl_browser_get_workflow_canvas` | Snapshot the canvas: list nodes, triggers, actions | +| `ghl_browser_add_workflow_node` | Add a trigger or action node (type + config) | +| `ghl_browser_save_workflow` | Save & publish the current workflow | + +### Funnel Page Editor (3) + +| Tool | Description | +|---|---| +| `ghl_browser_list_funnel_pages` | List funnel pages with status (draft/published) | +| `ghl_browser_edit_funnel_page` | Update headline/body/button on a funnel page and save | +| `ghl_browser_publish_funnel_page` | Publish or unpublish a page | + +### Pipeline Drag-Drop (3) + +| Tool | Description | +|---|---| +| `ghl_browser_list_pipeline_opportunities` | List opps by stage (read from the Kanban) | +| `ghl_browser_move_opportunity_stage` | Drag an opportunity card to a different stage | +| `ghl_browser_snapshot_pipeline` | Capture a board snapshot (stage → count + opp list) | + +### Campaign Builder (4) + +| Tool | Description | +|---|---| +| `ghl_browser_list_campaigns` | List campaigns with status | +| `ghl_browser_create_campaign` | Create a campaign shell (name, type) | +| `ghl_browser_add_campaign_step` | Add a step (SMS / Email / Wait / Action) | +| `ghl_browser_start_stop_campaign` | Start, pause, or stop a campaign | + +### Social Media (3) + +| Tool | Description | +|---|---| +| `ghl_browser_social_compose` | Compose and post to one or more connected accounts | +| `ghl_browser_social_schedule` | Schedule a post for a specific date/time | +| `ghl_browser_social_list_posts` | List recent posts with status (published/scheduled/failed) | + +### Blog Authoring (3) + +| Tool | Description | +|---|---| +| `ghl_browser_list_blogs` | List blog sites and post counts | +| `ghl_browser_create_blog_post` | Draft or publish a blog post (title, body, image) | +| `ghl_browser_update_blog_post` | Edit title/body and save/publish | + +### Form Builder (7) + +| Tool | Description | +|---|---| +| `ghl_browser_list_forms` | List forms (or surveys) with name, type, status, ID; supports search | +| `ghl_browser_create_form` | Create a new form or survey via the GHL UI | +| `ghl_browser_get_form_builder` | Open a form and return its field layout: names, types, required flags, order | +| `ghl_browser_add_form_field` | Add a field from the palette (text, email, phone, dropdown, etc.) | +| `ghl_browser_save_form` | Save and optionally publish a form | +| `ghl_browser_delete_form` | Delete a form (requires `confirm: true`) | +| `ghl_browser_get_form_embed` | Get embed code (HTML snippet, iframe URL, or direct link) for a form | + +### Email Builder (6) + +| Tool | Description | +|---|---| +| `ghl_browser_list_email_templates` | List email templates with name, type (builder/html/imported), last updated | +| `ghl_browser_create_email_template` | Create a template from builder, raw HTML, or blank | +| `ghl_browser_edit_email_template` | Update subject, preheader, and body HTML of an existing template | +| `ghl_browser_get_email_preview` | Capture a rendered preview screenshot (desktop or mobile) | +| `ghl_browser_send_test_email` | Send a test email to one or more addresses | +| `ghl_browser_delete_email_template` | Delete a template (requires `confirm: true`) | + +### Page Builder (6) + +| Tool | Description | +|---|---| +| `ghl_browser_list_sites` | List websites and funnels with name, type, page count, status | +| `ghl_browser_get_page_tree` | Get the page tree for a site: page names, URL paths, status | +| `ghl_browser_open_page_builder` | Open the WYSIWYG builder and return the element tree (sections, columns, elements) | +| `ghl_browser_add_page_section` | Add a section/element (heading, text, image, button, form, columns, etc.) | +| `ghl_browser_edit_page_element` | Edit element properties: text, link, image, colors, font size, CSS class | +| `ghl_browser_save_page` | Save and optionally publish a page | + +### Proposals & Estimates (7) + +| Tool | Description | +|---|---| +| `ghl_browser_list_proposals` | List proposals with contact, amount, status (draft/sent/accepted/declined) | +| `ghl_browser_create_proposal` | Create a proposal or estimate, optionally from a template | +| `ghl_browser_get_proposal_details` | Open a proposal and return sections, line items, terms, and total | +| `ghl_browser_add_proposal_section` | Add a section (heading, text_block, line_item, table, terms, signature, payment) | +| `ghl_browser_send_proposal` | Send a proposal to the assigned contact via email | +| `ghl_browser_update_proposal_status` | Update status: draft, sent, accepted, or declined | +| `ghl_browser_delete_proposal` | Delete a proposal (requires `confirm: true`) | + +### Calendar Configuration (7) + +| Tool | Description | +|---|---| +| `ghl_browser_list_calendars` | List appointment calendars with name, type, status, booking URL | +| `ghl_browser_get_calendar_config` | Get full config: slots, availability, buffers, limits, assigned users | +| `ghl_browser_create_calendar` | Create a calendar (simple, round-robin, or group type) | +| `ghl_browser_update_availability` | Set availability windows per day-of-week and timezone | +| `ghl_browser_assign_calendar_users` | Add/remove users from a calendar (rotation pool or group) | +| `ghl_browser_get_booking_link` | Get the public booking URL for sharing or embedding | +| `ghl_browser_delete_calendar` | Delete a calendar (requires `confirm: true`) | + +### Reporting Dashboard (6) + +| Tool | Description | +|---|---| +| `ghl_browser_list_reports` | List reports with name, category, type, last run date | +| `ghl_browser_create_report` | Create a custom report with metrics, dimensions, and date range | +| `ghl_browser_get_report_data` | Extract report data: table rows, chart values, summary metrics | +| `ghl_browser_export_report` | Export a report as CSV or PDF | +| `ghl_browser_get_dashboard_metrics` | Read dashboard summary: leads, conversions, revenue, appointments | +| `ghl_browser_delete_report` | Delete a custom report (requires `confirm: true`) | + +### Memberships & Courses (6) + +| Tool | Description | +|---|---| +| `ghl_browser_list_memberships` | List memberships/courses with type, price, member count, status | +| `ghl_browser_create_membership` | Create a membership, course, or offer with pricing and billing | +| `ghl_browser_get_membership_structure` | Get content hierarchy: courses, modules, lessons with titles and order | +| `ghl_browser_add_membership_content` | Add a course, module, or lesson (video, text, PDF, quiz) | +| `ghl_browser_update_membership_settings` | Update pricing, access control, drip schedule, trial period | +| `ghl_browser_delete_membership` | Delete a membership (requires `confirm: true`) | + +### Invoices (6) + +| Tool | Description | +|---|---| +| `ghl_browser_list_invoices` | List invoices with contact, amount, status, due date, balance | +| `ghl_browser_create_invoice` | Create an invoice with contact, line items, due date, tax | +| `ghl_browser_get_invoice_details` | Get full invoice: line items, payments, balance, status | +| `ghl_browser_send_invoice` | Send invoice to contact via email with optional custom message | +| `ghl_browser_record_invoice_payment` | Record a payment: amount, method, date, reference | +| `ghl_browser_void_invoice` | Void or delete an invoice (requires `confirm: true`) | + +### Reputation Management (5) + +| Tool | Description | +|---|---| +| `ghl_browser_list_reviews` | List reviews from Google/Facebook with rating, text, response status | +| `ghl_browser_request_review` | Send a review request to a contact via SMS or email | +| `ghl_browser_respond_to_review` | Reply to a review (posted to original platform) | +| `ghl_browser_get_reputation_score` | Get average rating, review count, rating distribution, trend | +| `ghl_browser_list_review_sites` | List connected review platforms with URL, count, and rating | + +### Affiliate Management (6) + +| Tool | Description | +|---|---| +| `ghl_browser_list_affiliates` | List affiliates with commission rate, status, referral stats | +| `ghl_browser_create_affiliate` | Create a new affiliate with name, email, commission settings | +| `ghl_browser_get_affiliate_details` | Get full details: commission settings, referral links, conversions, payments | +| `ghl_browser_update_affiliate` | Update commission rate, status, or other settings | +| `ghl_browser_get_affiliate_links` | Get referral/tracking links with click and conversion stats | +| `ghl_browser_delete_affiliate` | Delete an affiliate (requires `confirm: true`) | + +### Settings & Configuration (7) + +| Tool | Description | +|---|---| +| `ghl_browser_get_business_profile` | Get sub-account business profile: name, address, phone, timezone, currency | +| `ghl_browser_update_business_profile` | Update profile fields: name, phone, address, timezone, etc. | +| `ghl_browser_list_users` | List users/team members with name, email, role, status | +| `ghl_browser_create_user` | Invite a new user with first name, email, and role | +| `ghl_browser_update_user_permissions` | Update a user's role or permissions | +| `ghl_browser_get_integrations` | List configured integrations (Twilio, Stripe, etc.) and connection status | +| `ghl_browser_configure_integration` | Open integration settings and update config (enable/disable, API key) | + +### Trigger Links (5) + +| Tool | Description | +|---|---| +| `ghl_browser_list_trigger_links` | List tracking links with URL, click count, and associated action | +| `ghl_browser_create_trigger_link` | Create a link that fires a workflow/tag/pipeline action on click | +| `ghl_browser_get_trigger_link_stats` | Get click analytics: total clicks, unique, conversions, recent activity | +| `ghl_browser_update_trigger_link` | Update name, redirect URL, or enable/disable status | +| `ghl_browser_delete_trigger_link` | Delete a trigger link (requires `confirm: true`) | + +### Snapshots (5) + +| Tool | Description | +|---|---| +| `ghl_browser_list_snapshots` | List account snapshots with name, description, creation date, included assets | +| `ghl_browser_create_snapshot` | Capture current sub-account as a reusable snapshot | +| `ghl_browser_get_snapshot_details` | Get snapshot details: included assets, counts, creation info | +| `ghl_browser_load_snapshot` | Load/apply a snapshot to a target sub-account | +| `ghl_browser_delete_snapshot` | Delete a snapshot (requires `confirm: true`) | + +### Conversation AI (6) + +| Tool | Description | +|---|---| +| `ghl_browser_get_conversation_ai_config` | Get bot config: name, tone, enabled status, knowledge base settings | +| `ghl_browser_update_conversation_ai` | Update bot name, tone, system prompt, response delay, handoff message | +| `ghl_browser_list_ai_training_data` | List knowledge base entries: FAQs, documents, URLs, Q&A pairs | +| `ghl_browser_add_ai_training_data` | Add FAQ, document text, URL to crawl, or custom Q&A pair | +| `ghl_browser_delete_ai_training_data` | Remove a training entry (requires `confirm: true`) | +| `ghl_browser_get_ai_conversation_logs` | Get recent AI chat logs: contact, channel, messages, resolution status | + +### Media Library (5) + +| Tool | Description | +|---|---| +| `ghl_browser_list_media` | List files with name, type, size, URL; supports search and type filter | +| `ghl_browser_upload_media` | Upload a file from local path or import from URL | +| `ghl_browser_get_media_details` | Get file details: dimensions, URL, embed code, usage | +| `ghl_browser_create_media_folder` | Create a folder for organizing media files | +| `ghl_browser_delete_media` | Delete a media file (requires `confirm: true`) | + +### Tags & Custom Fields (7) + +| Tool | Description | +|---|---| +| `ghl_browser_list_tags` | List all tags with name, color, and usage count | +| `ghl_browser_create_tag` | Create a new tag with name and optional color | +| `ghl_browser_delete_tag` | Delete a tag (removes from all contacts; requires `confirm: true`) | +| `ghl_browser_list_custom_fields` | List custom fields: name, key, type, model (contact/opportunity) | +| `ghl_browser_create_custom_field` | Create a custom field (text, number, email, date, select, etc.) | +| `ghl_browser_update_custom_field` | Update field name, placeholder, or options | +| `ghl_browser_delete_custom_field` | Delete a custom field (requires `confirm: true`) | + +### Automation Templates (5) + +| Tool | Description | +|---|---| +| `ghl_browser_list_automation_templates` | Browse template library by category (lead nurture, onboarding, etc.) | +| `ghl_browser_get_automation_template_details` | Get template steps, triggers, actions, and requirements | +| `ghl_browser_install_automation_template` | Install a template, creating a new workflow from the blueprint | +| `ghl_browser_list_automation_recipes` | List recipes (multi-step sequences combining workflows + campaigns) | +| `ghl_browser_install_automation_recipe` | Install a recipe creating multiple linked assets from one blueprint | + +### Utils (4) + +| Tool | Description | +|---|---| +| `ghl_browser_screenshot` | Navigate to any GHL path and capture a PNG (saved to `./screenshots/`) | +| `ghl_browser_session_check` | Returns `{ authenticated: true/false }` against the GHL dashboard | +| `ghl_browser_logout` | Clear stored browser state (forces re-login on next tool call) | +| `ghl_browser_evaluate` | Run arbitrary JS in the page context (for ad-hoc scraping / debugging) | + +### Discovery (3) + +Network-capture tools used to discover undocumented GHL XHR endpoints. Feed +the discovered endpoints back into `ghl-mcp` as new REST tools. + +Both network tools also capture **WebSocket frames** exchanged during the +observation window (`wsFrames` + `wsSummary` in the response), which is +where Firebase real-time updates would be delivered. + +| Tool | Description | +|---|---| +| `ghl_browser_capture_network` | Navigate to a GHL path and capture every XHR/fetch request + WS frames | +| `ghl_browser_audit_api_calls` | Run a JS action and capture XHR/fetch + WS calls (listeners attach BEFORE navigation, so page-load calls are included) | +| `ghl_browser_extract_state` | Dump all `window.__*` globals and large inline `