1.0.0 ⢠Published 8 months ago
@mastanley13/ghl-mcp-server v1.0.0
š GoHighLevel MCP Server
Transform ChatGPT into a GoHighLevel CRM powerhouse with 21 powerful tools
šÆ What This Does
This MCP (Model Context Protocol) server connects ChatGPT directly to your GoHighLevel account, enabling you to:
- š„ Manage Contacts: Create, search, update, and organize contacts
- š¬ Handle Communications: Send SMS and emails, manage conversations
- š Create Content: Manage blog posts, authors, and categories
- š Automate Workflows: Combine multiple actions through ChatGPT
ā” Quick Deploy to Vercel
1. One-Click Deploy
2. Add Environment Variables
GHL_API_KEY=your_ghl_api_key_here
GHL_BASE_URL=https://services.leadconnectorhq.com
GHL_LOCATION_ID=your_location_id_here
NODE_ENV=production3. Connect to ChatGPT
Use your deployed URL in ChatGPT:
https://your-app-name.vercel.app/sseš ļø Available Tools (21 Total)
šÆ Contact Management (7 Tools)
create_contact- Create new contactssearch_contacts- Find contacts by criteriaget_contact- Retrieve contact detailsupdate_contact- Modify contact informationadd_contact_tags- Organize with tagsremove_contact_tags- Remove tagsdelete_contact- Delete contacts
š¬ Messaging & Conversations (7 Tools)
send_sms- Send SMS messagessend_email- Send emails with HTML supportsearch_conversations- Find conversationsget_conversation- Get conversation detailscreate_conversation- Start new conversationsupdate_conversation- Modify conversationsget_recent_messages- Monitor recent activity
š Blog Management (7 Tools)
create_blog_post- Create blog posts with SEOupdate_blog_post- Edit existing postsget_blog_posts- List and search postsget_blog_sites- Manage blog sitesget_blog_authors- Handle authorsget_blog_categories- Organize categoriescheck_url_slug- Validate URL slugs
š® ChatGPT Usage Examples
Contact Management
"Create a contact for John Smith with email john@company.com and add tags 'lead' and 'hot-prospect'"Communication
"Send an SMS to contact ID abc123 saying 'Thanks for your interest! We'll call you within 24 hours.'"Blog Content
"Create a blog post titled 'Insurance Tips for 2024' with SEO-optimized content about life insurance benefits"Advanced Workflows
"Search for contacts tagged 'VIP', get their recent conversations, and send them a personalized email about our premium services"š§ Local Development
Prerequisites
- Node.js 18+
- GoHighLevel API access
- Valid API key and Location ID
Setup
# Clone repository
git clone https://github.com/your-username/ghl-mcp-server.git
cd ghl-mcp-server
# Install dependencies
npm install
# Create .env file
cp .env.example .env
# Add your GHL API credentials
# Build and start
npm run build
npm startTesting
# Test health endpoint
curl http://localhost:8000/health
# Test tools endpoint
curl http://localhost:8000/tools
# Test SSE endpoint
curl -H "Accept: text/event-stream" http://localhost:8000/sseš Deployment Options
Vercel (Recommended)
- ā Free tier available
- ā Automatic HTTPS
- ā Global CDN
- ā Easy GitHub integration
Railway
- ā Free $5 credit
- ā Simple deployment
- ā Automatic scaling
Render
- ā Free tier
- ā Easy setup
- ā Reliable hosting
š Project Structure
ghl-mcp-server/
āāā src/
ā āāā clients/ # GHL API client
ā āāā tools/ # MCP tool implementations
ā āāā types/ # TypeScript interfaces
ā āāā server.ts # CLI MCP server
ā āāā http-server.ts # HTTP MCP server
āāā tests/ # Comprehensive test suite
āāā docs/ # Documentation
āāā vercel.json # Vercel configuration
āāā Dockerfile # Docker support
āāā README.md # This fileš Security & Environment
Required Environment Variables
GHL_API_KEY=your_api_key # GoHighLevel API key
GHL_BASE_URL=https://services.leadconnectorhq.com
GHL_LOCATION_ID=your_location # Your GHL location ID
NODE_ENV=production # Environment modeSecurity Features
- ā Environment-based configuration
- ā Input validation and sanitization
- ā Comprehensive error handling
- ā CORS protection for web deployment
- ā No sensitive data in code
šØ Troubleshooting
Common Issues
Build Failures:
npm run build # Check TypeScript compilation
npm install # Ensure dependencies installedAPI Connection Issues:
- Verify GHL API key is valid
- Check location ID is correct
- Ensure environment variables are set
ChatGPT Integration:
- Confirm SSE endpoint is accessible
- Check CORS configuration
- Verify MCP protocol compatibility
š Technical Stack
- Runtime: Node.js 18+ with TypeScript
- Framework: Express.js for HTTP server
- MCP SDK: @modelcontextprotocol/sdk
- API Client: Axios with interceptors
- Testing: Jest with comprehensive coverage
- Deployment: Vercel, Railway, Render, Docker
š¤ Contributing
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
š License
This project is licensed under the ISC License - see the LICENSE file for details.
š Support
- Documentation: Check the
/docsfolder - Issues: Open a GitHub issue
- API Docs: GoHighLevel API documentation
- MCP Protocol: Model Context Protocol specification
š Success Story
This server successfully connects ChatGPT to GoHighLevel with:
- ā 21 operational tools
- ā Real-time API integration
- ā Production-ready deployment
- ā Comprehensive error handling
- ā Full TypeScript support
Ready to automate your GoHighLevel workflows through ChatGPT! š
Made with ā¤ļø for the GoHighLevel community
1.0.0
8 months ago