Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GoHighLevel MCP Serversearch for contacts with email containing '@example.com'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GoHighLevel MCP Server
A Model Context Protocol (MCP) server that provides seamless integration with the GoHighLevel API v2. This server enables AI assistants to interact with GoHighLevel's CRM functionality, starting with comprehensive contact management.
Features
π OAuth 2.0 Authentication: Full OAuth flow with automatic token management
π’ Agency or sub-account scope: An agency (Company) token manages every sub-account via automatic agencyβlocation token exchange; a sub-account (Location) token is used directly and is locked to that one sub-account
π₯ Curated domains: Contacts, conversations & messaging, opportunities & pipelines, calendars & appointments, forms, custom fields & values, notes & tasks, users, and workflows β typed tools that handle API quirks
π Full-surface gateway:
ghl_list_endpoints+ghl_requestreach the entire GoHighLevel v2 API (the long tail beyond the curated tools), with automatic token routing, quirk normalization, and confirmation gating on destructive/high-impact writesπ Automatic Token Refresh: Handles token expiration seamlessly
π οΈ MCP Tools & Resources: Both tools and resources for flexible integration
Prerequisites
Python 3.12+
uvpackage manager (or pip)One of the following:
Standard Mode Configuration: Access via our hosted GoHighLevel app (coming soon)
Custom Mode Configuration: Your own GoHighLevel Marketplace App credentials
Getting Started - Installation
Clone the repository:
git clone https://github.com/basicmachines-co/open-ghl-mcp.git
cd open-ghl-mcpInstall dependencies:
uv venv
source .venv/bin/activate
uv pip install -r requirements.txtStart the server:
python -m src.main1. Configuration
Basic Machines team members: skip this β use the shared app credentials from 1Password and follow Team Setup instead of creating your own app.
For external/self-hosted use, create your own GoHighLevel Marketplace App:
Create your own GoHighLevel Marketplace App
Set the redirect URL to:
http://localhost:8080/oauth/callbackEnable the scopes you want for the tools below (the server requests its full
ALL_SCOPESset at authorization; the granted token is the intersection of that and the scopes your app enables)
2. Usage
Running the MCP Server
Start the server:
python -m src.mainComplete the setup wizard.
Configure your LLM to use the MCP server
First-time Authentication
Custom Mode Setup
The server will ask you for your GHL Marketplace App Client ID and Secret
Install your App to generate an OAuth Token
Team Setup (Basic Machines)
For internal team members. The goal is Admin access to a single sub-account (no agency-wide access): you authorize as a Sub-Account Admin and receive a Location token that is locked to your one sub-account β the server will refuse any other location.
You point your coding agent at this repo and ask it to install the server. The agent can do every step except the browser consent β that one is yours (you have to click "Allow" while signed in as the right GHL user).
Prerequisites
Python 3.12+ and the
uvpackage managerA GoHighLevel Sub-Account Admin login on the sub-account you'll manage (ask an agency admin to create one β not an agency-level user)
Access to the team 1Password vault item "GoHighLevel MCP β App Credentials" (holds
GHL_CLIENT_IDandGHL_CLIENT_SECRETfor the shared Basic Machines app β do not create your own marketplace app)
Steps
Clone & install
git clone https://github.com/basicmachines-co/open-ghl-mcp.git cd open-ghl-mcp uv venv && source .venv/bin/activate uv pip install -r requirements.txtCreate
.envfrom the template, filling the two secrets from 1Password:cp .env.example .env # then set GHL_CLIENT_ID and GHL_CLIENT_SECRET from the 1Password itemAuthorize (interactive β the human step)
In your browser, sign in to GoHighLevel as your Sub-Account Admin user (use an incognito window if you're also logged in as an agency user β the logged-in user determines the token you get).
Run the OAuth flow:
uv run python -m src.main --reauthApprove in the browser and select your sub-account. You'll get a Location token scoped to just that sub-account; the command prints the number of granted scopes.
Register the server with your MCP client
Claude Code (replace the path with your clone's absolute path):
claude mcp add ghl -s user -- uv run --directory /absolute/path/to/open-ghl-mcp python -m src.mainClaude Desktop β add to
claude_desktop_config.json:{ "mcpServers": { "ghl": { "command": "uv", "args": ["run", "--directory", "/absolute/path/to/open-ghl-mcp", "python", "-m", "src.main"] } } }
Restart your MCP client so it loads the
ghltools (a server added mid-session isn't picked up until restart).
Notes
Re-authorize anytime (e.g. after the app's scopes change):
uv run python -m src.main --reauthβ it backs up your existing token first.Sub-account isolation: your token only works for your own sub-account; requests to any other location are refused with a clear error.
Agency owners who authorize get a Company token instead, which manages all sub-accounts via automatic location-token exchange.
API Reference
This MCP server provides comprehensive access to GoHighLevel API v2 through both Tools (for actions) and Resources (for data browsing). All endpoints are fully tested and validated.
π οΈ MCP Tools (Actions)
π₯ Contact Management
Tool | GoHighLevel Endpoint | Description |
|
| Create a new contact |
|
| Update existing contact |
|
| Delete a contact |
|
| Get a single contact |
|
| Search contacts with filters |
|
| Add tags to a contact |
|
| Remove tags from a contact |
π¬ Conversations & Messaging
Tool | GoHighLevel Endpoint | Description |
|
| Search and list conversations |
|
| Get a single conversation |
|
| Get messages from a conversation |
|
| Send messages (SMS β , Email β , WhatsApp, IG, FB, Custom, Live_Chat) |
|
| Update message delivery status |
π― Opportunities & Sales Pipeline
Tool | GoHighLevel Endpoint | Description |
|
| Search opportunities with filters |
|
| Get a single opportunity |
|
| Create new opportunity |
|
| Update existing opportunity |
|
| Delete opportunity |
|
| Update opportunity status |
|
| List all pipelines |
π Calendar & Appointments
Tool | GoHighLevel Endpoint | Description |
|
| List all calendars for location |
|
| Get calendar details (54+ fields) |
|
| Get appointments for contact |
|
| Get available time slots |
π Forms & Submissions
Tool | GoHighLevel Endpoint | Description |
|
| List all forms (basic info: id, name, locationId) |
|
| Get all submissions with filtering |
|
| Upload file to custom field |
Note: Limited API support for forms. The following are NOT available:
GET /forms/{id}(401 "Route not supported")
GET /forms/{id}/submissions(404 Not Found)
POST /forms/submit(401 Unauthorized)
π MCP Resources (Data Browsing)
π₯ Contact Resources
Resource URI | GoHighLevel Endpoint | Description |
|
| Browse all contacts for location |
|
| View single contact details |
π¬ Conversation Resources
Resource URI | GoHighLevel Endpoint | Description |
|
| Browse all conversations for location |
|
| View conversation with messages |
π― Opportunity Resources
Resource URI | GoHighLevel Endpoint | Description |
|
| Browse all opportunities for location |
|
| View single opportunity details |
|
| Browse all pipelines with stages |
π Calendar Resources
Resource URI | GoHighLevel Endpoint | Description |
|
| Browse all calendars for location |
|
| View calendar details |
|
| Browse appointments for contact |
π Authentication Requirements
All endpoints require proper authentication:
Company Token: Used for location token exchange
Location Token: Required for all location-specific operations (expires every 24 hours)
Automatic Refresh: The MCP server handles token refresh automatically
π Example Usage
# Get all contacts for your location
contacts://YOUR_LOCATION_ID
# Get specific contact details
contact://YOUR_LOCATION_ID/YOUR_CONTACT_ID
# Browse appointments for a contact
appointments://YOUR_LOCATION_ID/YOUR_CONTACT_ID
# Browse opportunities for your location
opportunities://YOUR_LOCATION_ID
# View conversation details
conversation://YOUR_LOCATION_ID/YOUR_CONVERSATION_IDDevelopment
Testing
For local testing with real GoHighLevel accounts, you'll need:
A GoHighLevel account with API access
At least one sub-account (location) for testing
Test contacts and data in your GoHighLevel instance
Create your own testing guidelines and keep sensitive data like location IDs and contact IDs in local files that are not committed to the repository.
Running Tests
# Run all tests
uv run pytest
# Run tests with coverage report
uv run pytest --cov=src --cov-report=term-missing
# Run specific test file
uv run pytest tests/test_api_client.py -vCode Quality
This project uses automated code quality tools. Before committing changes:
# Format code with Black
uv run black src/ tests/
# Check linting with flake8
uv run flake8 src/ tests/
# Run type checking with mypy
uv run mypy src/ --ignore-missing-imports
# Run all checks at once
uv run black src/ tests/ && uv run flake8 src/ tests/ && uv run mypy src/ --ignore-missing-importsPre-commit Hook (optional)
To automatically format code before commits:
# Create a git pre-commit hook
echo '#!/bin/sh
uv run black src/ tests/
uv run flake8 src/ tests/
' > .git/hooks/pre-commit
chmod +x .git/hooks/pre-commitContinuous Integration
The project uses GitHub Actions for CI/CD:
Tests run automatically on all pushes and pull requests
Tested with Python 3.12 and 3.13
Includes linting, type checking, and test coverage
Coverage reports are uploaded to Codecov (if configured)
Architecture
The server follows a modular architecture:
OAuth Service: Handles authentication and token management
API Client: Manages communication with GoHighLevel API
MCP Server: FastMCP-based server exposing tools and resources
Data Models: Pydantic models for data validation
License
This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
For issues and feature requests, please use the GitHub issues tracker.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/basicmachines-co/open-ghl-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
