GoHighLevel MCP Server
Enables AI voice agents like RetellAI and Vapi to directly integrate with GoHighLevel for contact management, calendar availability, and appointment booking without middleware.
README
GoHighLevel MCP Server (Self-Hosted)
Use case: Connect AI apps like RetellAI and Vapi directly to GoHighLevel (GHL) for contact + booking workflows. This project may also work with other MCP-compatible apps.
No middleware required: direct RetellAI/Vapi -> GHL integration without apps like n8n or make.com.
If this is your first time using Vercel or MCP, setup typically takes 15-30 minutes.
You maybe asking why not just use GHL's native MCP? At the time of development they do not provide tooling for querying calendars for open slots or booking appointments.
Table of Contents
- What This Server Does
- Quick Start Checklist
- 1. Deploy on Vercel
- 2. Connect MCP in Your Agent Platform
- 3. Recommended Agent Flow
- 4. Troubleshooting
What This Server Does
- Create or update contacts (
ghl_create_contact) - Search contacts (
ghl_search_contacts) - Retrieve calendar free slots (
ghl_get_calendar_free_slots) - Create confirmed appointments (
ghl_create_appointment)
Endpoint:
POST /mcp
Quick Start Checklist
- Deploy this repo to Vercel
- Add required environment variables
- Copy your Vercel
/mcpURL - Add MCP in RetellAI with required headers
- Add all 4 tools to your Retell agent
- Run one end-to-end test call
1. Deploy on Vercel
1.1 Import this repo
- Go to Vercel.
- Create a new project.
- Import this GitHub repository.
- Deploy.
1.2 Add environment variables
In Vercel project settings, add the following:
| Variable | Required | What it is | How to get it |
|---|---|---|---|
GHL_PRIVATE_INTEGRATION_TOKEN |
Yes | GHL API token used by this MCP | GHL -> Settings -> Private Integrations -> create integration -> copy token |
DEFAULT_LOCATION_ID |
Yes | Sub-account location ID this server is scoped to | GHL sub-account -> Settings -> Business Information |
MCP_SHARED_SECRET |
Yes | Shared secret that authenticates MCP clients to your server | Choose your own secret (like a password) or generate with openssl rand -hex 32 |
DEFAULT_TIMEZONE |
No | Default timezone fallback | Optional, default is America/New_York |
ALLOWED_LOCATION_IDS |
No | Optional multi-tenant allowlist | Comma-separated list of location IDs |
Private Integration scopes required:
contacts.readonlycontacts.writecalendars.readonlycalendars/events.write
Hardcoded in app (no env needed):
- GHL base URL:
https://services.leadconnectorhq.com - GHL API version header:
2021-07-28
1.3 Confirm endpoint
Your MCP URL will be:
https://<your-vercel-domain>/mcp
2. Connect MCP in Your Agent Platform
Choose one platform below. RetellAI and Vapi are separate alternatives. This MCP server may also work with other MCP-capable platforms, but testing for this project was conducted using RetellAI and Vapi.
Option A: RetellAI
2.1 Add MCP (matches Retell UI)
In RetellAI -> Add MCP:
- Name:
GHL MCP(or any label) - URL:
https://<your-vercel-domain>/mcp - Timeout (ms):
10000
Under Headers, add:
Authorization=Bearer <GHL_PRIVATE_INTEGRATION_TOKEN>locationId=<DEFAULT_LOCATION_ID>X-MCP-KEY=<MCP_SHARED_SECRET>calendarId=<GHL_CALENDAR_ID>
Under Query Parameters:
- leave empty
Then click Save.
2.2 Add tools to your agent
In RetellAI -> Add Tool, add:
ghl_create_contactghl_search_contactsghl_get_calendar_free_slotsghl_create_appointment
Recommended toggles:
- Speak During Execution: off
- Speak After Execution: on
Optional variable mapping:
- Store
ghl_create_contact.contactIdascontact_id - Use
contact_idforghl_create_appointment.contactId
Important notes:
calendarIdheader is required for calendar tools.X-MCP-KEYmust exactly match your VercelMCP_SHARED_SECRET.- Get
calendarIdfrom GHL calendar settings.
Option B: Vapi
2.3 Create the MCP tool
In Vapi:
- Go to Tools (left menu).
- Click Create Tool.
- Select MCP.
Configure these fields:
- Tool Name:
ghl_mcp(or any label) - Description:
GHL MCP - Server URL:
https://<your-vercel-domain>/mcp - Timeout:
20seconds (recommended)
Under HTTP Headers, add:
Authorization=Bearer <GHL_PRIVATE_INTEGRATION_TOKEN>locationId=<DEFAULT_LOCATION_ID>X-MCP-KEY=<MCP_SHARED_SECRET>calendarId=<GHL_CALENDAR_ID>
Under MCP Settings:
- Select Streamable HTTP (SHTTP) (recommended)
- SSE is also supported if needed
Then click Save.
2.4 Assign the MCP tool to your assistant
After saving the MCP tool:
- Go to Assistants.
- Select your assistant.
- Open the Tools dropdown/menu.
- Assign the MCP tool you created.
Important:
- If the tool is not assigned to the assistant, calls will not use this MCP server.
X-MCP-KEYmust match your VercelMCP_SHARED_SECRETexactly.calendarIdheader is required for calendar tools.
3. Recommended Agent Flow
ghl_search_contactsghl_create_contact(only if no match)ghl_get_calendar_free_slotsghl_create_appointment
Copy/Paste system prompt tool policy
Use this in your Retell system prompt. You can customize it, but test with real calls before production.
Use MCP tools for all contact + booking actions.
Do not invent contact IDs, availability, or confirmations.
Never mention tool names, tool calls, or internal MCP/tool errors to the caller.
Flow:
1) Run ghl_search_contacts first using available phone/email/query.
2) If exactly one contact is found, use that contactId.
3) If no contact is found, collect missing phone/email and run ghl_create_contact.
4) If multiple contacts are found, disambiguate before booking.
5) Run ghl_get_calendar_free_slots and only offer returned slots.
6) Run ghl_create_appointment only with a confirmed contactId and an offered slot.
If no slots, ask for a different date range.
If tool error, say there is a technical issue and retry or escalate.
Confirm booking only after ghl_create_appointment succeeds.
4. Troubleshooting
401 AUTH_ERROR: a required header is missing or invalid.403location access error: verify token access andlocationId.- Empty free slots:
- verify
calendarIdheader - verify date range + timezone
- verify calendar availability in GHL
- verify
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。