renoblabs/coolify-mcp-server
If you are the rightful owner of coolify-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
Coolify MCP Server is a production-ready remote server designed for automating and managing Coolify infrastructure through AI assistants, mobile apps, or direct API calls.
Coolify MCP Server 🚀
Control your Coolify instance from any MCP-compatible AI client (Claude Desktop, Antigravity, Cline, Continue, etc.)
Deploy, manage, and monitor your applications through natural language commands. Works with both local STDIO (desktop AI tools) and remote SSE (mobile apps, remote access).
🎯 What It Does
- 🤖 AI-Powered Deployments: Deploy GitHub repos through natural conversation
- 📊 Application Management: List, deploy, restart, monitor all your Coolify apps
- 🌐 Multi-Server Support: Smart deployment across multiple servers
- 🔍 Intelligent Debugging: Get logs, diagnose issues, check health
- ☁️ Cloudflare Integration: Automated DNS and tunnel management
- 🔒 Secure: Bearer token auth, HTTPS support, Doppler secrets
⚡ Quick Start
For Desktop AI Tools (Antigravity, Claude Desktop, Cline, etc.)
1. Clone the repository:
git clone https://github.com/renoblabs/coolify-mcp-server.git
cd coolify-mcp-server
2. Install dependencies:
pip install -r requirements.txt
3. Get your Coolify API token:
- Go to your Coolify instance → Security → API Tokens
- Create a new token and copy it
4. Create your MCP config:
Create a file (e.g., mcp_config.json) with:
{
"mcpServers": {
"coolify": {
"command": "python",
"args": [
"/absolute/path/to/coolify-mcp-server/server_stdio.py"
],
"env": {
"COOLIFY_BASE_URL": "https://your-coolify-url.com",
"COOLIFY_API_TOKEN": "your-api-token-here"
}
}
}
}
Important:
- Use absolute paths for the
argsfield - Replace
https://your-coolify-url.comwith your actual Coolify URL - Replace
your-api-token-herewith your API token from step 3
5. Configure your AI client:
Antigravity (Google AI Studio)
- Open Antigravity settings
- Add the MCP server configuration from step 4
- Restart Antigravity
- Test: "List my Coolify applications"
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (Mac) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"coolify": {
"command": "python",
"args": ["/absolute/path/to/coolify-mcp-server/server_stdio.py"],
"env": {
"COOLIFY_BASE_URL": "https://your-coolify-url.com",
"COOLIFY_API_TOKEN": "your-token"
}
}
}
}
Restart Claude Desktop.
Cline / Continue (VS Code)
See for detailed VS Code setup.
For Remote/Mobile Access (SSE Mode)
See for setting up remote access via Cloudflare Tunnel or reverse proxy.
🛠️ Available Tools (17 Total)
Application Management
list_applications- List all apps with statusget_application_details- Get detailed app infodeploy_application- Deploy/redeploy an appget_application_logs- View deployment logsrestart_application- Restart an appstop_application- Stop an app
Environment & Configuration
get_application_environment- Get environment variablesupdate_application_environment- Update env vars
Multi-Server Management
list_servers- List all deployment serversget_server_details- Get server infoget_server_resources- Check CPU/RAM/diskdeploy_to_server- Deploy to specific serversmart_deploy- Auto-select best server based on requirements
Cloudflare Automation
create_dns_record- Create DNS recordsautomate_service_deployment- Full deployment automation
Diagnostics
diagnose_tunnel_issues- Debug connectivity issuesget_server_info- MCP server status
💬 Example Commands
Once connected, you can use natural language:
"List all my Coolify applications"
"Deploy the app called 'my-nextjs-app'"
"Show me the logs for my-api"
"What servers do I have available?"
"Deploy my-app to the server called 'production'"
"Restart the openhands application"
🧰 Helper Scripts
We've included Python scripts for quick testing and automation:
verify_connection.py
Test your MCP connection and list available tools:
python verify_connection.py
show_apps.py
Quick status overview of all applications:
python show_apps.py
deploy_app.py
Deploy a specific app by name or UUID:
# Deploy by name
python deploy_app.py my-app
# Force rebuild
python deploy_app.py my-app --force
list_servers.py
List available deployment servers:
python list_servers.py
📝 Configuration Options
Environment Variables
| Variable | Required | Description | Example |
|---|---|---|---|
COOLIFY_BASE_URL | ✅ Yes | Your Coolify instance URL | https://coolify.example.com |
COOLIFY_API_TOKEN | ✅ Yes | API token from Coolify | 3|abc123... |
MCP_AUTH_TOKEN | No | Bearer token for SSE mode | Auto-generated if not set |
MCP_PORT | No | Port for SSE server | 8765 (default) |
MCP_HOST | No | Host for SSE server | 0.0.0.0 (default) |
CLOUDFLARE_API_TOKEN | No | For DNS automation | Your CF token |
CLOUDFLARE_ZONE_ID | No | For DNS automation | Your zone ID |
Using .env File
Copy .env.example to .env and fill in your values:
cp .env.example .env
# Edit .env with your configuration
Using Doppler (Production)
For production deployments, use Doppler for secret management:
doppler setup
doppler secrets set COOLIFY_API_TOKEN="your-token"
doppler secrets set COOLIFY_BASE_URL="https://your-coolify.com"
See for details.
🚀 Deployment Modes
STDIO Mode (Local Desktop)
- Use case: Desktop AI tools (Antigravity, Claude Desktop, Cline)
- Transport: Standard input/output
- Setup: Add to your AI client's MCP config
- Security: Local only, no network exposure
SSE Mode (Remote/Mobile)
- Use case: Mobile apps, remote access, team sharing
- Transport: HTTP Server-Sent Events
- Setup: Run
python server.pyand expose via reverse proxy - Security: Bearer token auth + HTTPS recommended
See for SSE setup.
🔒 Security Best Practices
- Never commit secrets - Use
.envor Doppler - Use HTTPS - Always use SSL for remote access
- Rotate tokens - Change API tokens regularly
- Restrict access - Use Cloudflare Access or VPN for remote access
- Monitor logs - Check for unauthorized access attempts
🧪 Testing
Test your setup with the verification script:
python verify_connection.py
Expected output:
Connecting to server...
Connected! Found 17 tools.
- get_server_info
- list_applications
- deploy_application
...
📚 Additional Documentation
- - Client-specific setup guides
- - Remote/SSE deployment
- - Production secrets management
- - VS Code integration
- - DNS automation
🛠️ Troubleshooting
"Connection failed" or "Server not found"
- Check that
server_stdio.pypath is absolute - Verify Python is in your PATH
- Test manually:
python server_stdio.py(should wait for input) - Check your AI client's MCP logs
"Authentication failed" or "401 Unauthorized"
- Verify your
COOLIFY_API_TOKENis correct - Check token hasn't expired in Coolify
- Ensure
COOLIFY_BASE_URLis accessible
"All connection attempts failed"
- Verify
COOLIFY_BASE_URLis reachable - Check if Coolify is behind a firewall
- Test:
curl https://your-coolify-url.com/api/v1/applications -H "Authorization: Bearer YOUR_TOKEN"
Tools not showing up
- Restart your AI client completely
- Check MCP config syntax (valid JSON)
- Look for errors in AI client logs
- Run
python verify_connection.pyto test
🤝 Contributing
Contributions welcome! This is a practical tool for the Coolify community.
- Fork the repo
- Create a feature branch
- Make your changes
- Test with
verify_connection.py - Submit a PR
📄 License
MIT - Use it, improve it, automate all the things!
🔗 Quick Links
Made with ❤️ for the Coolify community
Having issues? Open an issue or check the docs!