ghlMCP

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

  1. Clone the repository:

    git clone https://github.com/CallBackCode/ghlMCP.git
    cd ghlMCP
    
  2. Install dependencies:

    npm install
    
  3. 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
  1. Run the MCP server:

    npm start
    
  2. Run tests:

    npm test
    

Environment Variables

  • GHL_API_KEY (required): Your GoHighLevel API key
  • GHL_LOCATION_ID (required): Your GoHighLevel location ID

Optional: Test Only

  • GHL_TEST_BUSINESS_ID: Used for businessId-based contact tests
  • GHL_TEST_CONTACT_ID: Used for contactId-based tests (if needed)

Available MCP Endpoints (Tools)

Contacts
EndpointDescriptionRequired ParamsOptional Params
listContactsList all contactslocationId
getContactGet a contact by IDid, locationId
createContactCreate a new contactlocationIdfirstName, lastName, email, phone
updateContactUpdate a contact by IDid, locationIdfirstName, lastName, email, phone
deleteContactDelete a contact by IDid, locationId
upsertContactUpsert (create/update) a contactlocationId, emailfirstName, lastName, phone
getContactsByBusinessIdGet contacts by businessIdbusinessId, locationIdlimit, skip, query

Project Structure

  • src/api/ — API wrappers for GoHighLevel endpoints
  • src/types/ — Centralized TypeScript types
  • src/index.ts — MCP server entry point
  • test/ — 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