GoHighLevel MCP
Enables sending WhatsApp messages to contacts in GoHighLevel.
GoHighLevel MCP Server
Give any AI agent — Claude, Cursor, Windsurf, or any MCP-compatible client — full access to your GoHighLevel account through natural language.
What is this?
This is a Model Context Protocol (MCP) server that connects your AI tools directly to your GoHighLevel (GHL) sub-account via the GHL API v2.
Once installed, you can talk to your CRM naturally:
"Find all contacts tagged 'cold-lead' and send them an SMS saying we have a new offer" "Book an appointment for Sarah Johnson tomorrow at 2pm on the Discovery calendar" "Move any open opportunities in Stage 1 that haven't been touched in 14 days to 'Lost'" "Create a note on John's contact record and enroll him in the cold call workflow"
127 tools covering the full GHL API:
Category | Tools |
Contacts | CRUD, search, upsert, tags, notes, tasks, workflow enrollment, appointments |
Conversations & Messaging | Search, send SMS/email/WhatsApp, schedule, message history |
Calendars & Appointments | List calendars, check availability, book, reschedule, block slots |
Opportunities / Pipeline | Pipelines, deals, stage moves, won/lost/abandoned |
Workflows & Campaigns | List workflows and campaigns |
Location Settings | Custom fields, custom values, tags, users, templates, forms, surveys |
Email Marketing | Email builder templates, email campaigns |
Funnels | List funnels, pages, page counts |
Phone Numbers | List, search, purchase, update, release phone numbers |
Payments & Invoices | Orders, transactions, subscriptions, coupons, invoices, payments |
Social & Media | Social posts, media library, trigger links |
Knowledge Base, FAQs & Crawler | Create/manage knowledge bases, FAQ pairs, and AI-train websites via crawler |
Related MCP server: ghl-mcp
Prerequisites
Before you begin, make sure you have:
Node.js 18 or later — download here
A GoHighLevel account with sub-account access
A GHL Private Integration Token (takes ~2 minutes to create — see below)
How to get your GHL credentials
1. Private Integration Token (GHL_PIT_TOKEN)
Log in to GoHighLevel and navigate to your sub-account (not the agency dashboard)
Go to Settings → Private Integrations
Click + Create New Integration
Give it a name (e.g.
AI Agent) and select all the scopes you want to grantClick Create — copy the token that appears (you won't see it again)
⚠️ Keep this token secret. It grants full API access to your sub-account.
2. Location ID (GHL_LOCATION)
Your Location ID is in the URL when you're inside your sub-account:
https://app.gohighlevel.com/location/XXXXXXXXXXXXXXXXXX/dashboard
^^^^^^^^^^^^^^^^^^
This is your Location IDInstallation
No build step needed. Pass your credentials directly in your AI client config and the server runs on demand.
Quick install via package manager (recommended)
Use npx, pnpm dlx, or bunx to run the server without installing anything globally:
# npm / npx (no install required)
npx @nerdsnipe-inc/ghl-mcp-server
# pnpm
pnpm dlx @nerdsnipe-inc/ghl-mcp-server
# bun
bunx @nerdsnipe-inc/ghl-mcp-serverOr install it globally if you prefer:
npm install -g @nerdsnipe-inc/ghl-mcp-server
# then run:
ghl-mcp-serverConnect to your AI tool
Pick your AI client below and follow the instructions.
Connecting to AI Clients
Claude Desktop
Open (or create) your Claude Desktop config file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"ghl": {
"command": "npx",
"args": ["-y", "@nerdsnipe-inc/ghl-mcp-server"],
"env": {
"GHL_PIT_TOKEN": "your_token_here",
"GHL_LOCATION": "your_location_id_here"
}
}
}
}Restart Claude Desktop. You should see a hammer icon (🔨) in the chat input — that means MCP tools are active.
Claude Code (CLI)
Run this from your terminal to add the server to your Claude Code config:
claude mcp add ghl npx -- -y @nerdsnipe-inc/ghl-mcp-server \
-e GHL_PIT_TOKEN=your_token_here \
-e GHL_LOCATION=your_location_id_hereOr add it manually to ~/.claude/mcp_servers.json (or your project's .mcp.json):
{
"mcpServers": {
"ghl": {
"command": "npx",
"args": ["-y", "@nerdsnipe-inc/ghl-mcp-server"],
"env": {
"GHL_PIT_TOKEN": "your_token_here",
"GHL_LOCATION": "your_location_id_here"
}
}
}
}Project-scoped tip: Add a
.mcp.jsonin your project root so everyone on the team picks it up automatically — no local install required. Add.mcp.jsonto.gitignoreso tokens aren't committed. If you store credentials in a.envfile you can omit theenvblock entirely.
Cursor
Open Cursor Settings → MCP (or press
Cmd+Shift+P→ "Open MCP Settings")Click Add Server and fill in:
{
"name": "ghl",
"command": "npx",
"args": ["-y", "@nerdsnipe-inc/ghl-mcp-server"],
"env": {
"GHL_PIT_TOKEN": "your_token_here",
"GHL_LOCATION": "your_location_id_here"
}
}Save and restart Cursor.
Windsurf
Open ~/.codeium/windsurf/mcp_config.json and add:
{
"mcpServers": {
"ghl": {
"command": "npx",
"args": ["-y", "@nerdsnipe-inc/ghl-mcp-server"],
"env": {
"GHL_PIT_TOKEN": "your_token_here",
"GHL_LOCATION": "your_location_id_here"
}
}
}
}Any other MCP-compatible client
This server uses stdio transport — the standard for local MCP servers. Your client needs:
Command:
npxArgs:
["-y", "@nerdsnipe-inc/ghl-mcp-server"]Env:
GHL_PIT_TOKENandGHL_LOCATION
Refer to your client's MCP documentation for exact config syntax.
Running from source (contributors)
If you've cloned the repo and want to run directly from TypeScript without a build step:
git clone https://github.com/Nerdsnipe-Inc/ghl-mcp-server.git
cd ghl-mcp-server
npm installThen point your MCP client at the source via tsx:
{
"command": "npx",
"args": ["tsx", "/absolute/path/to/ghl-mcp-server/src/index.ts"]
}Or build first for production use:
npm run build
# then run:
node dist/index.jsAll 127 Tools — Full Reference
Contacts
Tool | Description |
| List/search contacts by name, email, phone, or tags |
| Get a single contact by ID |
| Create a new contact |
| Update contact fields |
| Create or update by email/phone (prevents duplicates) |
| Permanently delete a contact |
| Advanced search with filter conditions |
| Add tags to a contact |
| Remove tags from a contact |
| List all notes on a contact |
| Add a note to a contact |
| Update an existing note |
| Delete a note |
| List tasks for a contact |
| Create a task for a contact |
| Update a task (status, due date, etc.) |
| Delete a task |
| Enroll a contact in a workflow/automation |
| Remove a contact from a workflow |
| Get all appointments for a contact |
Conversations & Messaging
Tool | Description |
| Search conversations by contact, status, or channel |
| Get a conversation by ID |
| Open a new conversation thread |
| List messages in a conversation |
| Send SMS, email, WhatsApp, or other channel message |
| Send an email within an existing conversation |
| Mark messages read/unread/delivered |
| Cancel a scheduled (future) message |
| Inject an inbound message (testing/simulation) |
Calendars & Appointments
Tool | Description |
| List all calendars |
| Get a calendar by ID |
| Check available appointment slots in a date range |
| Get events/appointments in a date range |
| Book an appointment |
| Get an appointment by event ID |
| Reschedule, change status, or add notes |
| Delete an event or appointment |
| Block a time period on a calendar |
| List calendar groups |
Opportunities / Pipeline
Tool | Description |
| List all pipelines and their stages |
| Search deals by contact, stage, pipeline, or status |
| Get a single opportunity |
| Create a new deal |
| Update deal fields (stage, value, assignee) |
| Quickly mark a deal won/lost/abandoned |
| Create or update a deal |
| Delete a deal |
Workflows & Campaigns
Tool | Description |
| List all workflows (use to discover workflow IDs) |
| List all campaigns |
Enrolling contacts in workflows is done via
ghl_add_contact_to_workflow.
Email Marketing
Tool | Description |
| List all email builder templates in the location |
| Get a single email builder template by ID |
| Create a new email builder template with HTML content |
| Update an existing email builder template's HTML content |
| Delete an email builder template by ID |
| List all email campaigns in the location |
| Get details of a single email campaign by ID |
| Create a new email campaign |
| Delete an email campaign by ID |
Funnels
Tool | Description |
| List all funnels in the location |
| List all pages in a specific funnel |
| Get the total count of pages in a funnel |
Phone Numbers
Tool | Description |
| List all purchased/active phone numbers in the location |
| Search for available numbers to purchase (filter by area code, country, type) |
| Purchase a phone number for the location (E.164 format, e.g. |
| Update settings for a phone number (assignment, call forwarding) |
| Release (delete) a phone number from the location |
Surveys
Tool | Description |
| List all surveys created in the location |
| Get submissions for a survey, with optional filters |
Location Settings
Tool | Description |
| Get location/sub-account details |
| List all tags in the location |
| Create a new tag |
| Delete a tag |
| List custom contact fields |
| Create a custom field |
| Update a custom field |
| Delete a custom field |
| List custom values (location-level variables) |
| Create a custom value |
| Update a custom value |
| Delete a custom value by ID |
| List all team members |
| Search users by name or email |
| Get a single team member by user ID |
| Create a new team member in the location |
| Update an existing team member |
| Remove a team member from the location |
| List SMS/email/WhatsApp templates |
| Create a new SMS/email/WhatsApp template |
| Update an existing template |
| Delete a template by ID |
| List all forms |
| Get form submissions |
Payments & Invoices
Tool | Description |
| List payment orders |
| Get a single order |
| List payment transactions |
| List active subscriptions |
| List coupons |
| Create a discount coupon |
| List invoices |
| Get a single invoice |
| Create a new invoice |
| Email an invoice to the contact |
| Void (cancel) an invoice |
| Record a manual payment on an invoice |
Social & Media
Tool | Description |
| List connected social media accounts |
| List scheduled or published posts |
| Schedule or publish a social media post |
| Delete a scheduled post |
| List files in the media library |
| Delete a file from the media library |
| List trigger links |
| Create a trigger link |
| Delete a trigger link |
Knowledge Bases
Tool | Description |
| List all knowledge bases for the location with cursor-based pagination |
| Get a single knowledge base by ID — includes metadata counts (FAQs, URLs, files) |
| Create a new knowledge base (max 15 per location) |
| Update the name or description of an existing knowledge base |
| Permanently delete a knowledge base and all its content (FAQs, trained URLs, etc.) |
FAQs
Tool | Description |
| List all FAQ question/answer pairs for a knowledge base with cursor-based pagination |
| Add a new FAQ question and answer to a knowledge base |
| Update the question and answer text of an existing FAQ |
| Permanently delete an FAQ by ID |
Web Crawler
Use the crawler to discover and ingest website pages as AI training data for a knowledge base. The typical flow is: discover → check status → train.
Tool | Description |
| Start crawling a website to discover pages. Choose scope: |
| Check progress of a crawl job by |
| List all trained page links for a knowledge base. Use to retrieve |
| Ingest discovered pages into the knowledge base for AI training using |
| Remove previously trained page URLs from a knowledge base by |
Example Prompts
Here are some things you can say to your AI once connected:
"Find all contacts tagged 'new-lead' added this week and send them a welcome SMS"
"What appointments are booked on the Discovery calendar this Friday?"
"Check Sarah Johnson's conversation history and summarize the last 5 messages"
"Create a note on contact ID abc123 saying 'Called, left voicemail' and mark the task as complete"
"Move all open opportunities in the Onboarding pipeline older than 30 days to 'Lost'"
"Book an appointment for john@example.com tomorrow at 3pm on calendar XYZ"
"Enroll contact ID abc123 in the cold call workflow"
"Show me all unpaid invoices over 30 days old"
"List all users/team members in this location"
"What workflows do we have? Show me the names and IDs"
"Create a knowledge base called 'Product FAQ' and add 5 FAQs covering our pricing, refund policy, and onboarding steps"
"Crawl https://example.com and train our support knowledge base on every page under /docs"
"List all the FAQs in our knowledge base and update any that mention the old pricing"
"Show me the status of the last website crawl and train on all successfully discovered pages"Environment Variables Reference
Variable | Required | Description |
| ✅ Yes | Your GHL Private Integration Token |
| ✅ Yes | Your sub-account location ID |
That's it — just two variables. Workflow IDs, pipeline IDs, calendar IDs, and all other GHL resource identifiers are passed directly as parameters when you call the relevant tools. This keeps the server generic and usable across any project or use case.
Development
# Install dependencies
npm install
# Run in development mode (no build step needed)
npm run dev
# Type-check without building
npm run typecheck
# Build for production
npm run build
# Watch mode (rebuilds on file changes)
npm run build:watchProject Structure
ghl-mcp-server/
├── src/
│ ├── index.ts # MCP server entry point — registers all tools
│ ├── client.ts # GHL HTTP client (auth, request helper, error handling)
│ └── tools/
│ ├── contacts.ts # 21 contact tools
│ ├── conversations.ts # 9 conversation & messaging tools
│ ├── calendars.ts # 10 calendar & appointment tools
│ ├── opportunities.ts # 8 pipeline & deal tools
│ ├── workflows.ts # 2 workflow & campaign tools
│ ├── locations.ts # 16 location settings tools
│ ├── payments.ts # 12 payment & invoice tools
│ ├── social.ts # 8 social, media & trigger link tools
│ ├── emails.ts # 9 email builder & campaign tools
│ ├── funnels.ts # 3 funnel tools
│ ├── phone_numbers.ts # 5 phone number tools
│ ├── surveys.ts # 2 survey tools
│ └── knowledge_base.ts # 14 knowledge base, FAQ & web crawler tools
├── dist/ # Compiled output (generated by npm run build)
├── .env.example # Environment variable template
├── package.json
├── tsconfig.json
└── README.mdAdding a new tool
Find the relevant module in
src/tools/Add a new entry to the exported array following the existing pattern:
{ name: "ghl_your_tool_name", description: "What this tool does and when to use it", inputSchema: z.object({ param: z.string().describe("Description of this parameter"), }), handler: async (args, config) => { try { const result = await ghlRequest("GET", "/your/endpoint", { token: config.token, params: { locationId: config.locationId, ...args }, }); return JSON.stringify(result, null, 2); } catch (e) { return formatError(e); } }, }Run
npm run typecheckto verify no type errorsSubmit a PR!
Troubleshooting
The server isn't showing up in my AI client
Make sure you ran
npm run buildand thedist/folder existsDouble-check the absolute path to
dist/index.jsin your configRestart your AI client after changing MCP config
Getting "GHL_PIT_TOKEN is not set" errors
Verify your
.envfile exists in theghl-mcp-server/directoryOr pass the env vars directly in your MCP client config (see setup instructions above)
Getting 401 Unauthorized from the API
Your PIT token may have expired or been revoked — generate a new one in GHL Settings → Private Integrations
Make sure the token is for the correct sub-account
Getting 422 or 400 errors
Check the
detailsfield in the error response — GHL usually explains what's wrongCommon causes: missing required fields, invalid phone number format (use E.164:
+15551234567), invalid date format (use ISO 8601)
Rate limit errors (429)
GHL enforces 100 requests per 10 seconds
For bulk operations, add a small delay between calls or process in batches
Contributing
Pull requests are welcome! Please:
Fork the repo
Create a feature branch (
git checkout -b feature/my-new-tool)Make your changes and run
npm run typecheckCommit and push, then open a PR
When adding new tools, follow the existing patterns in src/tools/ and keep the tool names prefixed with ghl_.
License
MIT © Business AI Specialist
Related
This server cannot be installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/NerdSnipe-Inc/ghl-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server