GoHighLevel MCP服务器
GoHighLevel的模型上下文协议服务器。它通过stdio、Streamable HTTP和遗留SSE将GHL API操作公开为MCP工具。
当前API覆盖范围
- 解析了官方GHL端点:
576 - 官方端点覆盖范围:
576 / 576 - 生成的官方端点工具:
238 - 注册表中的MCP工具:
834(802原始API工具加32精心策划的代理工作流工具) - 仅跟踪本地端点参考以供审查:
253 - 当官方GHL API文档更改时,每日GitHub操作刷新打开PR。
覆盖工件:
docs/GHL-API-COVERAGE-REPORT.mddocs/GHL-LOCAL-ENDPOINT-CLASSIFICATION.mddocs/ghl-api-coverage.jsondocs/API-DASHBOARD.mddocs/tool-inventory.json
配套工具
MCP服务器专注于MCP传输和GHL工具执行。配套工具就在它旁边,用于设置、检查、更新和示例。
npm run tools:doctor # Check build output, env, and API coverage health
npm run tools:list # Browse the registered MCP tool inventory
npm run tools:report # Regenerate the API dashboard and tool inventory JSON
npm run tools:explorer # Print the local static tool explorer path
npm run tools:configure # Print a Claude-compatible MCP config snippet
npm run tools:update-api # Refresh official GHL API coverage and generated tools直接CLI用法:
npx ghl-mcp doctor
npx ghl-mcp list-tools --search ads
npx ghl-mcp configure claude
npx ghl-mcp test-tool search_contacts '{"locationId":"your_location_id","pageLimit":1}'看 docs/TOOLING.md 查看完整的工具图。
代理工具配置文件
默认情况下,服务器会公开完整的工具界面:原始端点工具加上精心策划的CRM工作流层。使用更少、更高级别的操作可以更好地工作的代理可以使用:
GHL_TOOL_PROFILE=curated npm run start:stdio配置文件:
full-违约;暴露一切834工具。curated-只暴露32代理工作区工具,例如crm_prepare_lead_intake,crm_prepare_conversation_reply,crm_prepare_appointment_booking,以及crm_location_health_check.raw-仅暴露原始内容802端点级工具。
策划的工具返回结构化的写入确认队列。他们提供代理在用户确认后应该执行的确切原始工具调用,而不是让出站消息、计费、工作流注册、阶段移动或快照推送感觉像是一个模糊的API调用。
食谱和代理商起动器
这 examples/ 目录将工具表面转化为实用的MCP工作流程:
examples/recipes/--结构化的JSON食谱,用于潜在客户获取、预约、管道跟进、广告报告、审核请求、位置健康检查等。examples/agents/--初级助理提示客户关系管理、预约设置、渠道管理、广告报告和代理运营。docs/tool-explorer.html--静态浏览器资源管理器docs/tool-inventory.json.
食谱使用真实的MCP工具名称,并包括出站消息、约会创建、工作流注册、删除和快照推送等操作的确认点。
MCP应用程序
mcp-apps/ 包含支持交互式MCP资源的主机的配套MCP应用程序。它们作为单独的应用程序服务器运行,因此核心MCP API服务器保持精简。
MCP应用程序需要Node 20+,因为它们使用 @modelcontextprotocol/ext-apps.
这些应用程序首先连接到精心策划的CRM工作流工具,因此“准备潜在客户导入”、“准备预订”和“准备快照推出”等按钮会为ChatGPT、Claude或其他MCP主机生成确认门控行动计划。
npm run build
npm run apps:install
npm run apps:build
npm run apps:start:stdio包含的应用程序工具:
show_ghl_tool_explorer_appshow_ghl_contact_workspace_appshow_ghl_lead_intake_appshow_ghl_conversation_inbox_appshow_ghl_pipeline_board_appshow_ghl_appointment_desk_appshow_ghl_automation_launcher_appshow_ghl_reputation_center_appshow_ghl_ads_dashboard_appshow_ghl_billing_commerce_appshow_ghl_agency_admin_app
看 mcp-apps/README.md 用于主机配置和HTTP模式。
对于普通浏览器预览:
npm run apps:start:http打开 http://localhost:3001/preview工具资源管理器链接到每个CRM工作区预览。
运输
npm run start:stdio--用于桌面MCP客户端的stdio MCP服务器。npm run start:http--位于的可流式HTTP服务器/mcp.npm run start:legacy--位于的旧式SSE服务器/sse.
HTTP服务器还公开了:
GET /healthGET /capabilitiesGET /toolsPOST /executePOST /tools/call
设置
npm install
cp .env.example .env设置:
GHL_API_KEY=your_private_integration_api_key
GHL_LOCATION_ID=your_location_id
GHL_BASE_URL=https://services.leadconnectorhq.com
GHL_API_VERSION=2021-07-28构建并运行:
npm run build
npm run start:stdio对于HTTP:
npm run start:httpMCP客户端配置
stdio配置示例:
{
"mcpServers": {
"ghl": {
"command": "node",
"args": ["/absolute/path/to/Go-High-Level-MCP-2026-Complete/dist/server.js"],
"env": {
"GHL_API_KEY": "your_private_integration_api_key",
"GHL_LOCATION_ID": "your_location_id",
"GHL_BASE_URL": "https://services.leadconnectorhq.com",
"GHL_API_VERSION": "2021-07-28"
}
}
}
}脚本
npm run build # Compile server files to dist/
npm run lint # Fast TypeScript syntax/transpile check
npm test # Jest tests
npm run scan:ghl-api # Refresh official GHL API coverage and generated tools
npm run ci:ghl-api-drift # Fail if generated API artifacts are stale
npm run smoke:ghl-live # Optional read-only live checks when GHL env vars are set
npm run tools:doctor # Check local MCP setup
npm run tools:report # Generate API dashboard and tool inventory
npm run tools:explorer # Show the static tool explorer file path每日API刷新
.github/workflows/ghl-api-drift.yml 每天跑步。它
- 拉最新官方
GoHighLevel/highlevel-api-docs快照。 - 重新生成覆盖文档和生成的官方端点工具。
- 如果生成的任何工件发生变化,则打开PR。
PR和推送也会运行漂移检查,这样过时的生成文件就不会悄无声息地落地。
项目布局
src/
clients/ GHL API clients
tools/ MCP tool modules
types/ shared TypeScript types
main.ts Streamable HTTP MCP server
server.ts stdio MCP server
http-server.ts legacy SSE MCP server
scripts/ API scanner, generator, build, smoke test
docs/ generated API coverage reports
examples/ MCP recipes and starter agent templates
mcp-apps/ companion MCP Apps server and bundled UI
tests/ Jest tests备注
src/tools/official-spec-tools.ts和src/tools/official-spec-endpoints.json生成。不要手动编辑它们。- 跑
npm run scan:ghl-api在GHL API文件更改后。 - 实时烟雾测试是可选择的,仅在以下情况下运行
GHL_API_KEY和GHL_LOCATION_ID出席。
