CallBackCode/ghlMCP
3.2
If you are the rightful owner of ghlMCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The GoHighLevel MCP Server is a robust Model Context Protocol server designed to interface with the GoHighLevel API, providing efficient tools for managing contacts.
Tools
7
Resources
0
Prompts
0
GoHighLevel MCP Server
A robust Model Context Protocol (MCP) server for the GoHighLevel API, providing tools for managing contacts.
Installation
-
Clone the repository:
git clone https://github.com/CallBackCode/ghlMCP.git cd ghlMCP
-
Install dependencies:
npm install
-
Set your GoHighLevel API key and location ID:
-
Create a
.env
file in the project root:cat <<EOF > .env # --- Required: Agency Token or Location Token and Location ID --- GHL_API_KEY=your_api_key_here GHL_LOCATION_ID=your_location_id_here # --- Optional: Test Only Variables --- GHL_TEST_BUSINESS_ID=your_business_id_here GHL_TEST_CONTACT_ID=your_contact_id_here EOF
-
4. **Build the project:**
```sh
npm run build
-
Run the MCP server:
npm start
-
Run tests:
npm test
Environment Variables
GHL_API_KEY
(required): Your GoHighLevel API keyGHL_LOCATION_ID
(required): Your GoHighLevel location ID
Optional: Test Only
GHL_TEST_BUSINESS_ID
: Used for businessId-based contact testsGHL_TEST_CONTACT_ID
: Used for contactId-based tests (if needed)
Available MCP Endpoints (Tools)
Contacts
Endpoint | Description | Required Params | Optional Params |
---|---|---|---|
listContacts | List all contacts | locationId | |
getContact | Get a contact by ID | id , locationId | |
createContact | Create a new contact | locationId | firstName , lastName , email , phone |
updateContact | Update a contact by ID | id , locationId | firstName , lastName , email , phone |
deleteContact | Delete a contact by ID | id , locationId | |
upsertContact | Upsert (create/update) a contact | locationId , email | firstName , lastName , phone |
getContactsByBusinessId | Get contacts by businessId | businessId , locationId | limit , skip , query |
Project Structure
src/api/
— API wrappers for GoHighLevel endpointssrc/types/
— Centralized TypeScript typessrc/index.ts
— MCP server entry pointtest/
— Jest test suites for each endpoint
Notes
- All endpoints require a valid GoHighLevel API key and location ID.
- Responses are returned as pretty-printed JSON in text format for LLM compatibility.
- See GoHighLevel API Docs for more details.
Provided by CallBack