Sponsored by Deepsite.site

🧠 GHL MCP Server – Anthropic LangGraph Agent Integration

Created By
JewelreyBoxAI6 months ago
GHL MCP server to GHL Demo Sub Account
Content

🧠 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 NameGHL EndpointDescription
get_contact_info/contacts/{id}Fetch contact details
list_opportunities/opportunities/List all open opps
trigger_webhookCustom workflow triggerHit custom workflow webhook
get_pipeline_info/funnels/Retrieve funnel/pipeline structure
create_note/contacts/{id}/notesCreate 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_KEYGHL → Settings → API Keys (create or use existing)
GHL_SUB_ACCOUNT_IDURL bar while inside the sub-account dashboard
Webhook Trigger URLsAutomations → Webhook → Copy full URL
Funnel / Pipeline IDsFunnels → Click → Copy from URL
Contact ID (for testing)Contacts → Click any → Copy ID from URL

🚀 Dev Startup

# 1. Create .env file from template
cp env.template .env
# Then edit .env with your real GHL credentials

# 2. Install deps
pip install -r requirements.txt

# 3. Run server
uvicorn mcp_server:app --host 0.0.0.0 --port 8000
# OR use the startup script:
python scripts/start_server.py

# 4. Test the server
python examples/simple_client.py

# 5. Try interactive mode
python examples/simple_client.py interactive

🧰 Stack

  • Python 3.11+
  • FastAPI
  • langchain-mcp-adapters
  • MCPServer + Claude LangGraph agent
  • Optional: NGROK or Azure App Service for public MCP endpoint

🎯 Goal

By running this repo, your Claude-powered agent can query GHL data and trigger workflows through MCP with zero coupling. Extend this to include new GHL tools as needed.

"Modular tools. Global reach. Absolute power."

⚡ Ready to connect your Claude agent to GoHighLevel!

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
CursorThe AI Code Editor
ChatWiseThe second fastest AI chatbot™
WindsurfThe new purpose-built IDE to harness magic
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Amap Maps高德地图官方 MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
DeepChatYour AI Partner on Desktop
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Tavily Mcp
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Serper MCP ServerA Serper MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright McpPlaywright MCP server