AI Developer Stack
How to Connect Claude Code to GoHighLevel
By Marnix Geerkens. Published 2026-05-30. Updated 2026-05-30.
In short
You connect Claude Code to GoHighLevel by adding the official GoHighLevel MCP server. Create a Private Integration Token in your GoHighLevel settings, then run one command in your terminal that points Claude Code at the MCP endpoint and passes the token. After that, Claude Code can read and write your CRM in plain English: find contacts, send messages, check calendars, and create opportunities. The setup takes about 15 minutes and works on any paid GoHighLevel plan.
- The MCP endpoint is https://services.leadconnectorhq.com/mcp/.
- You must use a Private Integration Token (it starts with pit-), not an old API key. The wrong key is the top cause of 401 errors.
- Claude Code stores the server config in ~/.claude.json. You can add it with one command.
Before you start
- A GoHighLevel account (start the 30-day free trial through our link if you do not have one).
- Claude Code installed and signed in (run "claude" in your terminal once to confirm).
- Admin access to the GoHighLevel sub-account you want to control.
Step by step
Step 1. Create a Private Integration Token in GoHighLevel
In the sub-account you want to control, go to Settings, then Private Integrations. Click Create New Integration.
Give it a name like "Claude Code" and select only the scopes you need. Scopes are permissions. For a first test, contacts, conversations, and calendars are enough. Add more later only when a prompt needs them.
Click create and copy the token. It starts with pit- and is shown only once, so paste it somewhere safe for the next step. This is a Private Integration Token, not a regular or legacy API key. The old v1 keys do not work with the MCP server.
Step 2. Find your location ID
The location ID tells the server which sub-account to act on. Open Settings, then Company, then Locations, and copy the ID for your sub-account. You can also read it from the sub-account URL.
This header is optional. The official docs let you pass the location in a prompt instead, but setting it once in the config is simpler and avoids mistakes.
Step 3. Add the MCP server to Claude Code
Run the command below in your terminal. It registers the GoHighLevel server over HTTP and passes your token and location as headers. Replace the two placeholder values with your real token and location ID.
The flags come before the server name. The transport is http, which the MCP spec also calls streamable HTTP.
Terminal claude mcp add --transport http ghl https://services.leadconnectorhq.com/mcp/ \ --header "Authorization: Bearer pit-YOUR_TOKEN" \ --header "locationId: YOUR_LOCATION_ID"Or edit ~/.claude.json directly { "mcpServers": { "ghl": { "type": "http", "url": "https://services.leadconnectorhq.com/mcp/", "headers": { "Authorization": "Bearer pit-YOUR_TOKEN", "locationId": "YOUR_LOCATION_ID" } } } }Step 4. Confirm the server connected
Run the command below to list your MCP servers. You want to see "ghl" with a connected status. If it shows failed, the token is the first thing to check (see Troubleshooting).
Inside a Claude Code session you can also type /mcp to see the server and the tools it exposes.
Terminal claude mcp listStep 5. Run three real prompts
Now talk to your CRM in plain English. Start a Claude Code session and try these. Claude Code asks before it writes anything, so a read prompt is the safe first test.
Read: "Find the contact for jane@example.com and show her recent conversation." Write a draft: "Draft a friendly follow-up text to that contact about her quote, but do not send it yet." Create a record: "Create an opportunity for that contact in the Sales pipeline worth 500 dollars."
The exact tools available depend on the scopes you picked. The official server covers contacts and tasks, conversations and messaging, calendars and appointments, opportunities and pipelines, payments and orders, and more. The tool count changes over time, so check the official docs for the current list rather than trusting a fixed number.
How to test it worked
Ask Claude Code to find a contact you know exists. If it returns the real name, email, and recent activity, the read path works.
Then ask it to add a tag or a note to a test contact, approve the action, and open that contact in GoHighLevel to confirm the change landed. If both work, your connection is live.
Troubleshooting
401 unauthorized: you almost certainly used the wrong kind of key. It must be a Private Integration Token that starts with pit-, not a legacy API key. Recreate the token under Settings, then Private Integrations, and update the header.
A prompt cannot do something: the scope is missing. Edit the integration in GoHighLevel, add the scope the task needs (for example payments), and save. Some scopes can delete data, so only grant what you actually use.
Server shows failed in claude mcp list: check the URL is exactly https://services.leadconnectorhq.com/mcp/ with the trailing slash, and that the Authorization header reads "Bearer " followed by your token.
Wrong sub-account: the location ID points at a different sub-account than you expect. Recheck it under Settings, then Company, then Locations.
You need a GoHighLevel account to use the MCP server. Start the 30-day free trial through our link, longer than the standard 14-day trial.
Frequently asked questions
Does connecting Claude Code to GoHighLevel cost extra?
No. Access to the GoHighLevel MCP server is included with a paid GoHighLevel plan, which starts at Starter ($97/mo). Claude Code is billed separately by Anthropic. There is no extra GoHighLevel charge for using the MCP connection itself.
Why do I get a 401 error when I connect?
A 401 means the token is wrong. The most common reason is using a regular or legacy API key instead of a Private Integration Token. The correct token is created under Settings, then Private Integrations, and it starts with pit-. Recreate it and update the Authorization header.
Is the location ID required?
No. The locationId header is optional. You can set it once in the config so every prompt acts on the same sub-account, or you can leave it out and name the location in your prompt when you need to.
Can Claude Code delete or break my CRM data?
It can only do what the token scopes allow, and Claude Code asks for approval before it writes. Grant the smallest set of scopes you need. If you never add a delete or destructive scope, the connection cannot perform that action.
Where is the Claude Code MCP config stored?
Claude Code keeps MCP server config in ~/.claude.json. You can add a server with the claude mcp add command or edit that file directly. Both produce the same result.
