Λογότυπο Open Ghl MCP

Open Ghl MCP

Οργανισμός
basicmachines-co

An open source Model Context Protocol server for GoHighLevel API v2 with OAuth

Εκδότηςbasicmachines-co
Αποθετήριοopen-ghl-mcp
ΓλώσσαPython
Forks
31
Αστέρια
52
Διαθέσιμα εργαλεία
0
Τύπος μεταφοράςstdio
Άδεια χρήσηςAGPL-3.0
Σύνδεσμοι
  • Συνδέστε εργαλεία σε ροές εργασίας AI

    Το Open Ghl MCP παρέχει δυνατότητες MCP που μπορούν να χρησιμοποιηθούν από συμβατές εφαρμογές-πελάτες AI και πράκτορες AI.

  • 0 διαθέσιμα εργαλεία

    Περιηγηθείτε παρακάτω στις ενέργειες που μπορούν να κληθούν, μαζί με τα ονόματα και τις περιγραφές τους, όταν παρέχονται από τον διακομιστή.

  • Ρυθμίσεις έτοιμες για αντιγραφή

    Χρησιμοποιήστε τα αποσπάσματα εγκατάστασης για να ρυθμίσετε αυτόν τον διακομιστή στην εφαρμογή-πελάτη MCP που προτιμάτε.

  • Δείκτες ενδιαφέροντος για τον ανοιχτό κώδικα

    52 αστέρια και 31 διακλαδώσεις στο συνδεδεμένο αποθετήριο.

Automated Tests

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_request reach 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+
  • uv package 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

  1. Clone the repository:
bash
git clone https://github.com/basicmachines-co/open-ghl-mcp.git
cd open-ghl-mcp
  1. Install dependencies:
bash
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt
  1. Start the server:
bash
python -m src.main

1. 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:

  1. Create your own GoHighLevel Marketplace App
  2. Set the redirect URL to: http://localhost:8080/oauth/callback
  3. Enable the scopes you want for the tools below (the server requests its full ALL_SCOPES set at authorization; the granted token is the intersection of that and the scopes your app enables)

2. Usage

Running the MCP Server

  1. Start the server:
bash
python -m src.main
  1. Complete the setup wizard.

  2. Configure your LLM to use the MCP server

First-time Authentication

Custom Mode Setup

  1. The server will ask you for your GHL Marketplace App Client ID and Secret
  2. 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 uv package manager
  • A 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_ID and GHL_CLIENT_SECRET for the shared Basic Machines app — do not create your own marketplace app)

Steps

  1. Clone & install

    bash
    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.txt
  2. Create .env from the template, filling the two secrets from 1Password:

    bash
    cp .env.example .env
    # then set GHL_CLIENT_ID and GHL_CLIENT_SECRET from the 1Password item
  3. Authorize (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:
      bash
      uv run python -m src.main --reauth
    • Approve 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.
  4. Register the server with your MCP client

    • Claude Code (replace the path with your clone's absolute path):
      bash
      claude mcp add ghl -s user -- uv run --directory /absolute/path/to/open-ghl-mcp python -m src.main
    • Claude Desktop — add to claude_desktop_config.json:
      json
      {
        "mcpServers": {
          "ghl": {
            "command": "uv",
            "args": ["run", "--directory", "/absolute/path/to/open-ghl-mcp", "python", "-m", "src.main"]
          }
        }
      }
  5. Restart your MCP client so it loads the ghl tools (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

ToolGoHighLevel EndpointDescription
create_contactPOST /contactsCreate a new contact
update_contactPUT /contacts/{id}Update existing contact
delete_contactDELETE /contacts/{id}Delete a contact
get_contactGET /contacts/{id}Get a single contact
search_contactsGET /contactsSearch contacts with filters
add_contact_tagsPOST /contacts/{id}/tagsAdd tags to a contact
remove_contact_tagsDELETE /contacts/{id}/tagsRemove tags from a contact

💬 Conversations & Messaging

ToolGoHighLevel EndpointDescription
get_conversationsGET /conversations/searchSearch and list conversations
get_conversationGET /conversations/{id}Get a single conversation
get_messagesGET /conversations/{id}/messagesGet messages from a conversation
send_messagePOST /conversations/{id}/messagesSend messages (SMS ✅, Email ✅, WhatsApp, IG, FB, Custom, Live_Chat)
update_message_statusPUT /conversations/messages/{messageId}/statusUpdate message delivery status

🎯 Opportunities & Sales Pipeline

ToolGoHighLevel EndpointDescription
get_opportunitiesGET /opportunities/searchSearch opportunities with filters
get_opportunityGET /opportunities/{id}Get a single opportunity
create_opportunityPOST /opportunitiesCreate new opportunity
update_opportunityPUT /opportunities/{id}Update existing opportunity
delete_opportunityDELETE /opportunities/{id}Delete opportunity
update_opportunity_statusPUT /opportunities/{id}/statusUpdate opportunity status
get_pipelinesGET /opportunities/pipelinesList all pipelines

📅 Calendar & Appointments

ToolGoHighLevel EndpointDescription
get_calendarsGET /calendars/?locationId={id}List all calendars for location
get_calendarGET /calendars/{id}Get calendar details (54+ fields)
get_appointmentsGET /contacts/{contactId}/appointmentsGet appointments for contact
get_free_slotsGET /calendars/{id}/free-slotsGet available time slots

📝 Forms & Submissions

ToolGoHighLevel EndpointDescription
get_formsGET /formsList all forms (basic info: id, name, locationId)
get_all_form_submissionsGET /forms/submissionsGet all submissions with filtering
upload_form_filePOST /forms/upload-custom-filesUpload 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 URIGoHighLevel EndpointDescription
contacts://{location_id}GET /contactsBrowse all contacts for location
contact://{location_id}/{contact_id}GET /contacts/{id}View single contact details

💬 Conversation Resources

Resource URIGoHighLevel EndpointDescription
conversations://{location_id}GET /conversations/searchBrowse all conversations for location
conversation://{location_id}/{conversation_id}GET /conversations/{id}View conversation with messages

🎯 Opportunity Resources

Resource URIGoHighLevel EndpointDescription
opportunities://{location_id}GET /opportunities/searchBrowse all opportunities for location
opportunity://{location_id}/{opportunity_id}GET /opportunities/{id}View single opportunity details
pipelines://{location_id}GET /opportunities/pipelinesBrowse all pipelines with stages

📅 Calendar Resources

Resource URIGoHighLevel EndpointDescription
calendars://{location_id}GET /calendars/Browse all calendars for location
calendar://{location_id}/{calendar_id}GET /calendars/{id}View calendar details
appointments://{location_id}/{contact_id}GET /contacts/{id}/appointmentsBrowse 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

bash
# 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_ID

Development

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

bash
# 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 -v

Code Quality

This project uses automated code quality tools. Before committing changes:

bash
# 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-imports

Pre-commit Hook (optional)

To automatically format code before commits:

bash
# 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-commit

Continuous 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.

Χρησιμοποιήστε το MCP Open Ghl MCP με πολλά μοντέλα AI

Το TypingMind συνδέει τα εργαλεία MCP σε επίπεδο χώρου εργασίας. Έτσι, μόλις συνδεθεί το Open Ghl MCP, μπορείτε να το χρησιμοποιείτε με διαφορετικά μοντέλα AI στο TypingMind, αντί να το ρυθμίζετε ξεχωριστά για κάθε μοντέλο. Αυτή η ενσωμάτωση MCP εκτελείται τοπικά στη συσκευή σας μέσω του συνδέσμου MCP του TypingMind.

Οδηγός ρύθμισης για τη χρήση του τοπικού συνδέσμου

Επιλέξτε αυτή τη μέθοδο όταν ο διακομιστής MCP χρειάζεται πρόσβαση σε τοπικά αρχεία, εφαρμογές ή ιδιωτικούς πόρους στον υπολογιστή σας.

1

Ανοίξτε τις ρυθμίσεις MCP

Στο TypingMind, μεταβείτε στις «Ρυθμίσεις», έπειτα στις «Σύνθετες ρυθμίσεις» και στο «Model Context Protocol» και επιλέξτε «Ρύθμιση συνδέσμου».

  1. Ανοίξτε το TypingMind στο πρόγραμμα περιήγησής σας.
  2. Κάντε κλικ στο εικονίδιο «Ρυθμίσεις».
  3. Μεταβείτε στις «Σύνθετες ρυθμίσεις».
  4. Ανοίξτε την ενότητα Model Context Protocol.
  5. Κάντε κλικ στην επιλογή «Ρύθμιση συνδέσμου» και επιλέξτε «Αυτή η συσκευή».
Οθόνη ρύθμισης συνδέσμου MCP του TypingMind με επιλεγμένη την επιλογή «Αυτή η συσκευή»
2

Εκτελέστε την εντολή του συνδέσμου

Επιλέξτε «Αυτή η συσκευή», αντιγράψτε την εντολή από το TypingMind και εκτελέστε την στο Τερματικό. Διατηρήστε τη διεργασία σε λειτουργία όσο χρησιμοποιείτε το MCP.

  1. Αντιγράψτε την εντολή ρύθμισης που εμφανίζεται στο TypingMind.
  2. Ανοίξτε το Τερματικό στο macOS ή το Windows Terminal στα Windows.
  3. Επικολλήστε και εκτελέστε την εντολή.
  4. Εγκρίνετε την εγκατάσταση του πακέτου, αν το Τερματικό σάς ζητήσει επιβεβαίωση για να συνεχίσει.
  5. Διατηρήστε ανοιχτό το παράθυρο του Τερματικού και τη διεργασία σε λειτουργία όσο χρησιμοποιείτε εργαλεία MCP.
3

Προσθέστε το Open Ghl MCP ως διακομιστή

Όταν η κατάσταση του συνδέσμου είναι «Έτοιμος», κάντε κλικ στο «Αλλαγή servers» και επικολλήστε τις ρυθμίσεις του διακομιστή MCP.

  1. Περιμένετε μέχρι η κατάσταση του συνδέσμου να εμφανιστεί ως «Έτοιμος».
  2. Κάντε κλικ στο «Αλλαγή servers».
  3. Επικολλήστε τις ρυθμίσεις του διακομιστή MCP Open Ghl MCP.
  4. Αποθηκεύστε τη λίστα διακομιστών.
  5. Κάντε ανανέωση αν θέλετε να επιβεβαιώσετε ότι ο σύνδεσμος παραμένει έτοιμος για χρήση.
Ρυθμίσεις MCP του TypingMind με ενεργό διακομιστή και το κουμπί «Αλλαγή servers»
{
  "mcpServers": {
    "open-ghl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Χρησιμοποιήστε τη σύνδεση με διαφορετικά μοντέλα

Αποθηκεύστε τη λίστα διακομιστών, ανοίξτε τα «Πρόσθετα», ενεργοποιήστε τα εργαλεία MCP του Open Ghl MCP και έπειτα επιλέξτε οποιοδήποτε υποστηριζόμενο μοντέλο AI στο TypingMind. Χρησιμοποιήστε τα εργαλεία στη συνομιλία ή αναθέστε τα σε έναν πράκτορα AI.

  1. Ανοίξτε τη σελίδα «Πρόσθετα» στο TypingMind.
  2. Ενεργοποιήστε τα εργαλεία MCP του Open Ghl MCP.
  3. Ξεκινήστε μια συνομιλία και επιλέξτε το μοντέλο AI που θέλετε να χρησιμοποιήσετε.
  4. Χρησιμοποιήστε τα εργαλεία MCP στη συνομιλία ή αντιστοιχίστε τα σε έναν πράκτορα AI.
  5. Μεταβείτε σε άλλο μοντέλο AI όποτε χρειάζεται, χωρίς να συνδέσετε ξανά το MCP.
Συνομιλία στο TypingMind με ενεργοποιημένα εργαλεία MCP και επιλεγμένο μοντέλο AI
Θα με βοηθήσετε σε αυτό μέσω Open Ghl MCP;
Open Ghl MCP
Βεβαίως. Το διάβασα.
Δείτε τι βρήκα μέσω του Open Ghl MCP.

Συχνές ερωτήσεις

Σε τι χρησιμεύει ο διακομιστής MCP Open Ghl MCP;

Το Open Ghl MCP είναι ένας διακομιστής MCP που επιτρέπει σε συμβατές εφαρμογές AI να συνδέονται με εξωτερικά εργαλεία και πληροφορίες πλαισίου. Στο TypingMind, μπορείτε να προσθέσετε αυτόν τον διακομιστή MCP μία φορά και να κάνετε τα εργαλεία του διαθέσιμα στον χώρο εργασίας AI σας.

Μπορώ να χρησιμοποιήσω το Open Ghl MCP MCP με πολλά μοντέλα AI στο TypingMind;

Ναι. Το TypingMind συνδέει τα εργαλεία MCP σε επίπεδο χώρου εργασίας, ώστε να μπορείτε να χρησιμοποιείτε το Open Ghl MCP με διαφορετικά μοντέλα AI, όπως τα Claude, ChatGPT, Gemini ή άλλα μοντέλα που έχετε ρυθμίσει στο TypingMind, χωρίς να ρυθμίζετε τον διακομιστή MCP ξεχωριστά για κάθε μοντέλο.

Γιατί να χρησιμοποιήσετε τον σύνδεσμο MCP Open Ghl MCP με το TypingMind;

Το TypingMind είναι ένα από τα καλύτερα περιβάλλοντα συνομιλίας με μεγάλα γλωσσικά μοντέλα, καθώς συγκεντρώνει πολλά μοντέλα AI, προτροπές, πρόσθετα, πράκτορες AI, κλειδιά API και εργαλεία MCP σε έναν χώρο εργασίας. Συνδέοντας το Open Ghl MCP, μπορείτε να χρησιμοποιείτε τα εργαλεία MCP του με τα μοντέλα που προτιμάτε, διατηρώντας οργανωμένη τη ροή εργασίας των συνομιλιών σας στο TypingMind.

Πώς συνδέω το Open Ghl MCP MCP στο TypingMind;

Το Open Ghl MCP λειτουργεί μέσω του τοπικού συνδέσμου MCP του TypingMind. Αυτή είναι η καλύτερη επιλογή όταν ο διακομιστής MCP χρειάζεται πρόσβαση σε τοπικά αρχεία, εφαρμογές υπολογιστή, εργαλεία γραμμής εντολών ή ιδιωτικούς πόρους στον υπολογιστή σας.

Ποια εργαλεία παρέχει το Open Ghl MCP MCP στο TypingMind;

Το Open Ghl MCP διαθέτει δυνατότητες MCP που μπορείτε να ενεργοποιήσετε από τη σελίδα Πρόσθετα του TypingMind και να χρησιμοποιήσετε σε συνομιλίες ή να αναθέσετε σε πράκτορες AI.

Χρειάζεται να κοινοποιήσω τα κλειδιά API μου στο TypingMind για να χρησιμοποιήσω το Open Ghl MCP MCP;

Όχι. Το TypingMind δίνει προτεραιότητα στην τοπική λειτουργία και σας επιτρέπει να διατηρείτε τον έλεγχο των παρόχων μοντέλων, των κλειδιών API, των προτροπών και των ρυθμίσεων MCP σας. Αν το Open Ghl MCP απαιτεί έλεγχο ταυτότητας, προσθέστε τις απαιτούμενες κεφαλίδες, τις ρυθμίσεις OAuth ή τις τοπικές ρυθμίσεις για τον συγκεκριμένο διακομιστή MCP κατά τη δημιουργία της σύνδεσης.

Σχετικοί διακομιστές MCP

Προβολή όλων

Στήστε δικό σας χώρο εργασίας AI τώρα

Εγγραφείτε στο ενημερωτικό μας δελτίο για να ενημερώνεστε για νέες λειτουργίες και μελλοντικές κληρώσεις δώρων 👇