🧠 GHL MCP Server – Anthropic LangGraph Agent Integration

by JewelreyBoxAI

374 downloads
Not rated
GitHub

About

This server exposes GoHighLevel (GHL) sub-account tools to an Anthropic-powered LangGraph agent using the Model Context Protocol (MCP). It acts as a secure intermediary between the LangChain ecosystem and GHL APIs, designed for clean modular separation and zero-handoff latency.

Details

Author
JewelreyBoxAI
Downloads
374
Categories
AI

- FastAPI MCP server exposing GHL sub-account tools
- Dynamic tool registration via LangChain MCP adapters
- Secure credential loading through .env variables
- Pre-built tools for contacts, pipelines, and automations
- Supports Claude-based LangGraph Agents as MCP clients
- Zero-coupling between agent and GHL API

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name 🧠 GHL MCP Server – Anthropic LangGraph Agent Integration
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Create a .env file with your GHL API key, sub-account ID, and base URL. Install dependencies with pip install -r requirements.txt. Start the server using uvicorn mcp_server:app --host 0.0.0.0 --port 8000 or the startup script. Test connection with python examples/simple_client.py or run interactive mode.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "\ud83e\udde0 ghl mcp server \u2013 anthropic langgraph agent integration": {
            "MCP-GHL": {
                "command": "python",
                "args": [
                    "scripts/start_server.py"
                ]
            }
        }
    }
}

McpServers

{
    "MCP-GHL": {
        "command": "python",
        "args": [
            "scripts/start_server.py"
        ]
    }
}

🧠 GHL MCP Server – Anthropic LangGraph Agent Integration

🧭 Purpose

This project exposes GoHighLevel (GHL) sub-account tools to an Anthropic-powered LangGraph agent using the Model Connection Protocol (MCP). It acts as a secure intermediary layer between the LangChain ecosystem and GHL APIsβ€”designed for clean modular separation and zero-handoff latency.

This repo is built to support:
- πŸ”Ή Claude-based LangGraph Agents as MCP clients
- πŸ”Ή FastAPI MCP Server exposing GHL sub-account tools (contacts, pipelines, automations)
- πŸ”Ή Secure credential loading via .env
- πŸ”Ή Dynamic tool registration using LangChain MCP adapters

---

🧱 Architecture

 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚          LangGraph Agent           β”‚
 β”‚  (Claude, Anthropic, LangChain)    β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β”‚
         MCP Client (HTTP)
                β”‚
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚         GHL MCP Server (This)      β”‚
 β”‚   FastAPI + LangChain Tools        β”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                β”‚
        REST API β†’ GHL Sub-Account

MCP Server = FastAPI server exposing LangChain-compatible tools from GHL
LangGraph Agent = Claude-powered LangChain graph calling MCPClient.load_tools()
Secure Comm = All tool usage routed over HTTP via LangChain's MCP standard

---

πŸ“¦ Tool Endpoints to Expose

Each tool is implemented using @mcp_tool and automatically discoverable by any LangChain-compatible MCP client.

| Tool Name | GHL Endpoint | Description |
| -------------------- | ----------------------- | ---------------------------------- |
| get_contact_info | /contacts/{id} | Fetch contact details |
| list_opportunities | /opportunities/ | List all open opps |
| trigger_webhook | Custom workflow trigger | Hit custom workflow webhook |
| get_pipeline_info | /funnels/ | Retrieve funnel/pipeline structure |
| create_note | /contacts/{id}/notes | Create a note on contact |

---

πŸ” ENV VARS (.env)

Set the following variables in .env at the root of ghl_mcp_server/:

GHL_API_BASE_URL=https://rest.gohighlevel.com/v1
GHL_API_KEY=sk_your_primary_api_key_here
GHL_SUB_ACCOUNT_ID=abc123456789
ALLOWED_ORIGINS=

---

πŸ•΅οΈ GHL SCAVENGER HUNT CHECKLIST

To go live, collect these credentials:

| 🧩 What | πŸ“ Where to Find It |
| -------------------------- | -------------------------------------------------- |
| GHL_API_KEY | GHL β†’ Settings β†’ API Keys (create or use existing) |
| GHL_SUB_ACCOUNT_ID | URL bar while inside the sub-account dashboard |
| Webhook Trigger URLs | Automations β†’ Webhook β†’ Copy full URL |
| Funnel / Pipeline IDs | Funnels β†’ Click β†’ Copy from URL |
| Contact ID (for testing) | Contacts β†’ Click any β†’ Copy ID from URL |

---

πŸš€ Dev Startup

```bash

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.