A powerful Node.js client for interacting with the official GoHighLevel MCP (Model Context Protocol) server. This client provides a simple interface to manage contacts, conversations, calendars, opportunities, and payments in your GoHighLevel account.
- β Complete API Coverage: Access all 21+ tools from the official GoHighLevel MCP server
- π Secure Authentication: Uses Private Integration Tokens with scoped permissions
- π Easy to Use: Simple JavaScript/Node.js interface with async/await support
- π HTTP Server: Optional REST API server for web applications
- π§ͺ Built-in Testing: Comprehensive test suite to validate functionality
- π TypeScript Ready: Clean, well-documented code structure
- β‘ High Performance: Concurrent request support with proper error handling
# Clone from GitHub
git clone https://github.com/CryptoJym/gohighlevel-mcp.git
cd gohighlevel-mcp
# Install dependencies
npm install
# Run interactive setup
npm run setupThe setup wizard will guide you through configuration and test your connection.
For detailed team onboarding instructions, see INSTALL.md
If you prefer manual setup:
cp .env.example .envEdit .env file with your GoHighLevel credentials:
GHL_PRIVATE_INTEGRATION_TOKEN=pit-your-token-here
GHL_LOCATION_ID=your-location-id-here- Log into your GoHighLevel account
- Go to Settings > Private Integrations
- Click "Create New Integration"
- Select required scopes (see Required Scopes)
- Copy the generated token
- This is your sub-account ID in GoHighLevel
- You can find it in the URL when viewing your location
- Or use the client to retrieve it:
node index.js location
npm test
# or
node test.js# Test connection
node index.js test
# Get all contacts
node index.js contacts
# Get specific contact
node index.js contact <contact-id>
# Get location info
node index.js location
# List available tools
node index.js tools
# Start HTTP server
node index.js serverimport GoHighLevelMCPClient from './index.js';
const client = new GoHighLevelMCPClient();
// Get contacts
const contacts = await client.getContacts({ limit: 10 });
console.log(contacts);
// Create a new contact
const newContact = await client.createContact({
firstName: 'John',
lastName: 'Doe',
email: 'john@example.com',
phone: '+1234567890'
});
// Send a message
const message = await client.sendMessage(conversationId, 'Hello!');Start the server:
node index.js serverAvailable endpoints:
GET /health- Health checkGET /test- Test connectionGET /tools- List available toolsGET /contacts- Get contactsGET /contacts/:id- Get specific contactPOST /contacts- Create contactPUT /contacts/:id- Update contactGET /conversations- Search conversationsGET /conversations/:id/messages- Get messagesPOST /conversations/:id/messages- Send messageGET /location- Get location infoGET /location/custom-fields- Get custom fields
getContacts(params)- Get all contacts with optional filteringgetContact(contactId)- Get specific contact by IDcreateContact(contactData)- Create new contactupdateContact(contactId, contactData)- Update existing contactupsertContact(contactData)- Create or update contactaddTagsToContact(contactId, tags)- Add tags to contactremoveTagsFromContact(contactId, tags)- Remove tags from contactgetAllTasks(contactId)- Get all tasks for a contact
searchConversations(params)- Search and filter conversationsgetMessages(conversationId)- Get messages in a conversationsendMessage(conversationId, message)- Send a new message
getCalendarEvents(params)- Get calendar eventsgetAppointmentNotes(appointmentId)- Get appointment notes
searchOpportunities(params)- Search opportunitiesgetOpportunity(opportunityId)- Get specific opportunityupdateOpportunity(opportunityId, data)- Update opportunitygetPipelines()- Get all opportunity pipelines
getOrderById(orderId)- Get order detailslistTransactions(params)- List transactions with filtering
getLocation(locationId)- Get location/sub-account detailsgetCustomFields(locationId)- Get custom field definitions
testConnection()- Test connection to GoHighLevelgetAvailableTools()- List all available MCP tools
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"gohighlevel": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/gohighlevel-mcp/gohighlevel-mcp-proxy.mjs"],
"env": {
"GHL_PRIVATE_INTEGRATION_TOKEN": "pit-YOUR-TOKEN",
"GHL_LOCATION_ID": "YOUR-LOCATION-ID",
"DEBUG": "false"
}
}
}
}Restart Claude Desktop and you'll see 21 GoHighLevel tools available.
See INSTALL.md for detailed configuration examples for:
- VS Code with Claude Dev / Roo Cline
- Cursor
- Codex
- Other MCP-compatible tools
When creating your Private Integration Token, ensure you select these scopes:
- β View Contacts
- β Edit Contacts
- β View Conversations
- β Edit Conversations
- β View Conversation Messages
- β Edit Conversation Messages
- β View Opportunities
- β Edit Opportunities
- β View Calendars
- β Edit Calendar Events
- β Edit Calendars
- β View Payment Orders
- β View Payment Transactions
- β View Custom Fields
- β View Forms
- β View Locations
The client includes comprehensive error handling:
const result = await client.getContacts();
if (result.success) {
console.log('Data:', result.data);
} else {
console.log('Error:', result.error);
console.log('Status:', result.status);
}Run the test suite to validate your setup:
# Basic functionality tests
npm test
# Performance tests
node test.js performance
# All tests
node test.js all| Variable | Required | Description |
|---|---|---|
GHL_PRIVATE_INTEGRATION_TOKEN |
Yes | Your GoHighLevel Private Integration Token |
GHL_LOCATION_ID |
Recommended | Your GoHighLevel Location/Sub-account ID |
GHL_MCP_URL |
No | MCP server URL (defaults to official server) |
PORT |
No | HTTP server port (default: 3000) |
HOST |
No | HTTP server host (default: localhost) |
DEBUG |
No | Enable debug logging (default: false) |
-
"GHL_PRIVATE_INTEGRATION_TOKEN is required"
- Make sure your
.envfile exists and contains the token - Verify the token is correctly formatted (starts with
pit-)
- Make sure your
-
"Location ID is required"
- Some operations require a location ID
- Set
GHL_LOCATION_IDin your.envfile - Or pass it as a parameter to specific methods
-
Authentication errors
- Verify your token has the required scopes
- Check that the token hasn't expired
- Ensure you're using the correct location ID
-
Connection timeouts
- Check your internet connection
- Verify the MCP server URL is correct
- Try increasing the timeout in the client configuration
Enable debug logging to see detailed request information:
DEBUG=true node index.js test- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- Submit a pull request
MIT License - see LICENSE file for details.
For issues related to:
- This client: Open an issue in this repository
- GoHighLevel API: Contact GoHighLevel support
- MCP Protocol: Check the official MCP documentation
- Initial release
- Complete MCP client implementation
- HTTP server interface
- Comprehensive test suite
- Full documentation