ignitabull18/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 henry@mcphub.com.
Coolify MCP Server provides comprehensive access to the Coolify API, enabling AI assistants to manage various infrastructure components through a unified platform.
Coolify MCP Server š
A comprehensive Model Context Protocol (MCP) server that provides complete access to the Coolify API. This server enables AI assistants to manage applications, databases, services, servers, and more through Coolify's platform.
Features āØ
š ļø 90+ API Tools
Complete coverage of all Coolify endpoints with type-specific routing:
- Applications: Create, deploy, update, start/stop/restart, environment variables, logs
- Databases: PostgreSQL, MySQL, MariaDB, MongoDB, Redis, DragonFly, KeyDB, ClickHouse
- Services: One-click services, custom deployments, lifecycle management
- Servers: Validation, resource monitoring, domain management
- Projects: Organization, environments, team collaboration
- Deployments: Monitoring, history, automated deployments
- Teams & Access: User management, private keys, permissions
š 10+ Resources
Access Coolify data through standardized URIs:
coolify://applications/{uuid}
- Application detailscoolify://databases/{uuid}
- Database informationcoolify://services/{uuid}
- Service configurationscoolify://servers/{uuid}
- Server detailscoolify://projects/{uuid}
- Project informationcoolify://overview
- Complete instance overviewcoolify://status
- Health and status information
š” 8+ Workflow Prompts
Guided workflows for common DevOps tasks:
- deploy-application - Complete deployment workflow
- troubleshoot-deployment - Diagnostic and problem solving
- setup-new-project - Project setup guidance
- database-setup - Database configuration and best practices
- setup-monitoring - Monitoring and alerting setup
- maintenance-workflow - Safe maintenance procedures
- performance-optimization - Performance analysis and tuning
- disaster-recovery-plan - DR planning and procedures
Installation š¦
- Clone the repository:
git clone <repository-url>
cd coolify-mcp-server
- Install dependencies:
npm install
- Configure environment variables:
cp .env.example .env
Edit .env
with your Coolify details:
COOLIFY_BASE_URL=https://app.coolify.io/api/v1
COOLIFY_API_TOKEN=your_api_token_here
For self-hosted Coolify instances:
COOLIFY_BASE_URL=https://your-coolify-instance.com/api/v1
COOLIFY_API_TOKEN=your_api_token_here
- Build the server:
npm run build
Usage šÆ
Development Mode
npm run dev
Production Mode
npm start
Testing with MCP Inspector
npm run inspector
Remote HTTP Server (NEW!)
For hosting the MCP server remotely and connecting multiple clients:
# Install additional dependencies
npm install express @types/express
# Build and start HTTP server
npm run build
npm run start:http # Starts on http://localhost:3000
Access endpoints:
- Health:
http://localhost:3000/health
- Info:
http://localhost:3000/info
- MCP:
http://localhost:3000/mcp
(Server-Sent Events)
See DEPLOYMENT.md
for comprehensive remote hosting options including:
- š„ Deploy on Coolify (recommended)
- šÆ MCPHub Integration (see
MCPHUB_INSTALLATION.md
) - š³ Docker deployment
- āļø Cloud platforms (Vercel, Railway, Render)
- š„ļø VPS hosting with PM2
Getting Your API Token š
- Log into your Coolify instance
- Go to Security ā API Tokens
- Click Generate API Token
- Copy the token and add it to your
.env
file
MCP Client Configuration š±
Local Execution (Traditional)
Claude Desktop - Add to your claude_desktop_config.json
:
{
"mcpServers": {
"coolify": {
"command": "node",
"args": ["/path/to/coolify-mcp-server/build/index.js"]
}
}
}
VS Code - Add to your VS Code MCP settings:
{
"mcp": {
"servers": {
"coolify": {
"command": "node",
"args": ["/path/to/coolify-mcp-server/build/index.js"]
}
}
}
}
Remote HTTP Connection (NEW!)
Claude Desktop - Connect to remotely hosted server:
{
"mcpServers": {
"coolify-remote": {
"url": "https://your-mcp-server.com/mcp"
}
}
}
Development/Local HTTP:
{
"mcpServers": {
"coolify-local": {
"url": "http://localhost:3000/mcp"
}
}
}
Multiple Environments:
{
"mcpServers": {
"coolify-staging": {
"url": "https://staging-mcp.yourcompany.com/mcp"
},
"coolify-production": {
"url": "https://production-mcp.yourcompany.com/mcp"
}
}
}
MCPHub Integration (Recommended for Teams)
If you're using samanhappy/mcphub for centralized MCP server management:
Add to your mcp_settings.json
:
{
"mcpServers": {
"coolify": {
"url": "https://your-coolify-mcp.com/mcp",
"description": "Complete Coolify API integration",
"enabled": true,
"group": "infrastructure"
}
}
}
Benefits of MCPHub Integration:
- šŖ Web Dashboard - Manage servers through UI
- š„ Team Access - Role-based permissions and user management
- š·ļø Server Groups - Organize by environment or function
- š Smart Routing - AI-powered tool discovery
- š Monitoring - Real-time server health and usage analytics
- š Hot Reloading - Update configurations without restarts
Client connects to MCPHub instead:
{
"mcpServers": {
"mcphub": {
"url": "http://your-mcphub:3000/mcp"
}
}
}
See MCPHUB_INSTALLATION.md
for complete setup instructions.
API Coverage š
This MCP server provides complete coverage of the Coolify API:
Applications
- ā List applications
- ā Get application details
- ā Create new applications
- ā Update applications
- ā Delete applications
- ā Start/Stop/Restart applications
- ā Deploy applications
- ā Get application logs
- ā Manage environment variables
Databases
- ā Support for all database types
- ā Create, read, update, delete operations
- ā Start/Stop/Restart database instances
- ā Configuration management
Services
- ā One-click service deployment
- ā Custom service configuration
- ā Service lifecycle management
- ā Environment variable management
Servers
- ā Server validation and health checks
- ā Resource monitoring
- ā Domain management
- ā SSH key management
Projects & Teams
- ā Project organization
- ā Team collaboration features
- ā Access control and permissions
Example Usage š»
Deploy a New Application
// Using the deploy-application prompt
const deployment = await mcpClient.callPrompt('deploy-application', {
application_name: 'my-awesome-app',
environment: 'production'
});
Monitor System Health
// Access the overview resource
const overview = await mcpClient.readResource('coolify://overview');
console.log(JSON.parse(overview.content[0].text));
Create a Database
// Use the create-database tool
const database = await mcpClient.callTool('create-database', {
name: 'my-app-db',
type: 'postgresql',
project_uuid: 'project-uuid',
server_uuid: 'server-uuid'
});
Architecture šļø
āāā src/
ā āāā index.ts # Main server entry point
ā āāā api-client.ts # Coolify API client
ā āāā types.ts # TypeScript definitions
ā āāā tools.ts # MCP tools (API operations)
ā āāā resources.ts # MCP resources (data access)
ā āāā prompts.ts # MCP prompts (workflows)
āāā build/ # Compiled JavaScript
āāā package.json # Dependencies and scripts
Error Handling š”ļø
The server includes comprehensive error handling:
- API connection validation on startup
- Graceful error responses for failed operations
- Detailed error messages with context
- Automatic retry for transient failures
Security Considerations š
- API tokens are loaded from environment variables
- All API requests use bearer token authentication
- No sensitive data is logged or exposed
- Secure HTTPS communication with Coolify API
Contributing š¤
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Troubleshooting š§
Common Issues
Connection Errors:
- Verify your
COOLIFY_BASE_URL
is correct - Check that your
COOLIFY_API_TOKEN
is valid - Ensure your Coolify instance is accessible
Tool Execution Errors:
- Check the MCP client logs for detailed error messages
- Verify required parameters are provided
- Ensure you have proper permissions in Coolify
Debug Mode
Set NODE_ENV=development
for verbose logging.
License š
MIT License - see LICENSE file for details.
Support š¬
- Check the Coolify Documentation
- Review MCP Protocol Specification
- Open an issue for bugs or feature requests
Built with ā¤ļø for the Coolify and MCP communities# Trigger deployment Wed Aug 6 16:36:06 PDT 2025