Coolify MCP Server

Coolify MCP Server

Enables management of Coolify instances to control applications, databases, and servers through the Model Context Protocol. It provides a comprehensive set of tools for deploying services and monitoring self-hosted infrastructure using natural language.

Category
访问服务器

README

Coolify MCP Server

A robust TypeScript MCP (Model Context Protocol) server for integrating with Coolify, the self-hostable alternative to Netlify and Vercel.

Features

  • Complete Coolify API Integration: Manage applications, databases, servers, projects, and services
  • Type-Safe: Full TypeScript support with comprehensive type definitions
  • MCP Protocol: Compatible with Claude and other MCP clients
  • Resource Access: Expose Coolify resources through MCP resource endpoints
  • Tool Support: Comprehensive set of tools for Coolify operations

Installation

npm install
npm run build

Configuration

Environment Variables

The server requires environment variables to connect to your Coolify instance:

export COOLIFY_API_URL="http://localhost:8000"
export COOLIFY_API_TOKEN="your-api-token-here"
export COOLIFY_TEAM_ID="optional-team-id"  # Optional

Or create a .env file:

COOLIFY_API_URL=http://localhost:8000
COOLIFY_API_TOKEN=your-api-token-here
COOLIFY_TEAM_ID=optional-team-id

MCP Client Configuration

Claude Desktop

Add the server to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "coolify": {
      "command": "node",
      "args": ["/path/to/coolify-mcp-server/dist/index.js"],
      "env": {
        "COOLIFY_API_URL": "http://localhost:8000",
        "COOLIFY_API_TOKEN": "your-api-token-here",
        "COOLIFY_TEAM_ID": "optional-team-id"
      }
    }
  }
}

Alternative: NPX Usage

If you publish to npm, users can run via npx:

{
  "mcpServers": {
    "coolify": {
      "command": "npx",
      "args": ["@joshuarileydev/coolify-mcp-server", "--yes"],
      "env": {
        "COOLIFY_API_URL": "http://localhost:8000",
        "COOLIFY_API_TOKEN": "your-api-token-here",
        "COOLIFY_TEAM_ID": "optional-team-id"
      }
    }
  }
}

Or use the executable name directly:

{
  "mcpServers": {
    "coolify": {
      "command": "npx",
      "args": ["coolify-mcp-server", "--yes"],
      "env": {
        "COOLIFY_API_URL": "http://localhost:8000",
        "COOLIFY_API_TOKEN": "your-api-token-here",
        "COOLIFY_TEAM_ID": "optional-team-id"
      }
    }
  }
}

Development Setup

For development, you can use the TypeScript source directly:

{
  "mcpServers": {
    "coolify": {
      "command": "npx",
      "args": ["tsx", "/path/to/coolify-mcp-server/src/index.ts"],
      "env": {
        "COOLIFY_API_URL": "http://localhost:8000",
        "COOLIFY_API_TOKEN": "your-api-token-here",
        "COOLIFY_TEAM_ID": "optional-team-id"
      }
    }
  }
}

Other MCP Clients

For other MCP clients that support environment variables, ensure the following variables are set:

  • COOLIFY_API_URL (required)
  • COOLIFY_API_TOKEN (required)
  • COOLIFY_TEAM_ID (optional)

Example shell script:

#!/bin/bash
export COOLIFY_API_URL="http://localhost:8000"
export COOLIFY_API_TOKEN="your-api-token-here"
export COOLIFY_TEAM_ID="your-team-id"

node /path/to/coolify-mcp-server/dist/index.js

Available Tools

Applications

  • list_applications - List all applications
  • get_application - Get application details
  • create_application - Create new application
  • start_application - Start an application
  • stop_application - Stop an application
  • restart_application - Restart an application
  • deploy_application - Deploy an application

Databases

  • list_databases - List all databases
  • create_database - Create new database

Servers

  • list_servers - List all servers
  • create_server - Create new server
  • validate_server - Validate server connection

Projects

  • list_projects - List all projects
  • create_project - Create new project

Services

  • list_services - List all services
  • start_service - Start a service
  • stop_service - Stop a service

System

  • get_version - Get Coolify version

Available Resources

The server exposes these MCP resources:

  • coolify://applications - All applications
  • coolify://databases - All databases
  • coolify://servers - All servers
  • coolify://projects - All projects
  • coolify://services - All services
  • coolify://teams - All teams

API Token Setup

  1. Log into your Coolify instance
  2. Navigate to "Keys & Tokens" > "API tokens"
  3. Click "Create New Token"
  4. Choose appropriate permissions:
    • read-only: Read data only
    • read:sensitive: Read with sensitive data
    • *: Full access (recommended for MCP server)
  5. Copy the generated token

Security Note

When using the MCP server with Claude Desktop or other clients, your API token will be stored in the configuration file. Ensure this file has appropriate permissions:

# macOS/Linux
chmod 600 ~/Library/Application\ Support/Claude/claude_desktop_config.json

# Or set environment variables in your shell profile instead
echo 'export COOLIFY_API_TOKEN="your-token-here"' >> ~/.bashrc

Development

# Install dependencies
npm install

# Run in development mode (requires env vars)
COOLIFY_API_URL=http://localhost:8000 COOLIFY_API_TOKEN=your-token npm run dev

# Build for production
npm run build

# Run built version
npm start

# Lint code
npm run lint

# Type check
npm run typecheck

Troubleshooting

Common Issues

  1. "COOLIFY_API_URL and COOLIFY_API_TOKEN environment variables are required"

    • Ensure environment variables are set before starting the server
    • Check that your .env file is in the correct location
    • Verify variable names are spelled correctly
  2. "Tool execution failed: Request failed"

    • Verify your Coolify instance is running and accessible
    • Check that the API URL is correct (include protocol: http:// or https://)
    • Ensure your API token has the necessary permissions
  3. MCP server not appearing in Claude Desktop

    • Restart Claude Desktop after updating configuration
    • Check the configuration file path is correct for your OS
    • Verify JSON syntax in the configuration file

Debug Mode

To see detailed error messages, run the server with debug output:

DEBUG=* node dist/index.js

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选