2026-04-29 08:30:43 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Mcp\Servers;
|
|
|
|
|
|
|
|
|
|
use App\Mcp\Tools\GetApplication;
|
|
|
|
|
use App\Mcp\Tools\GetDatabase;
|
|
|
|
|
use App\Mcp\Tools\GetInfrastructureOverview;
|
|
|
|
|
use App\Mcp\Tools\GetServer;
|
|
|
|
|
use App\Mcp\Tools\GetService;
|
|
|
|
|
use App\Mcp\Tools\ListApplications;
|
|
|
|
|
use App\Mcp\Tools\ListDatabases;
|
|
|
|
|
use App\Mcp\Tools\ListProjects;
|
|
|
|
|
use App\Mcp\Tools\ListServers;
|
|
|
|
|
use App\Mcp\Tools\ListServices;
|
|
|
|
|
use Laravel\Mcp\Server;
|
|
|
|
|
|
2026-06-04 09:03:06 +00:00
|
|
|
class CoolifyServer extends Server
|
|
|
|
|
{
|
|
|
|
|
protected string $name = 'Coolify';
|
|
|
|
|
|
|
|
|
|
protected string $version = '0.1.0';
|
|
|
|
|
|
|
|
|
|
protected string $instructions = <<<'MD'
|
2026-04-29 08:30:43 +00:00
|
|
|
Read-only MCP server for Coolify, scoped to the authenticated team token.
|
|
|
|
|
|
|
|
|
|
Recommended workflow:
|
|
|
|
|
1. get_infrastructure_overview — start here; single call returns all servers, projects with resource counts, and aggregates.
|
|
|
|
|
2. list_servers / list_projects / list_applications / list_databases / list_services — paginated summary listings (default 50 per page, cap 100).
|
|
|
|
|
3. get_server / get_application / get_database / get_service — full details for a single UUID.
|
|
|
|
|
|
|
|
|
|
Every response is `{ data, _actions?, _pagination? }`. `_actions` suggests the next tool + args; `_pagination.next` is the args to call again for the next page.
|
2026-06-04 09:03:06 +00:00
|
|
|
MD;
|
|
|
|
|
|
2026-04-29 08:30:43 +00:00
|
|
|
protected array $tools = [
|
|
|
|
|
GetInfrastructureOverview::class,
|
|
|
|
|
ListServers::class,
|
|
|
|
|
GetServer::class,
|
|
|
|
|
ListProjects::class,
|
|
|
|
|
ListApplications::class,
|
|
|
|
|
GetApplication::class,
|
|
|
|
|
ListDatabases::class,
|
|
|
|
|
GetDatabase::class,
|
|
|
|
|
ListServices::class,
|
|
|
|
|
GetService::class,
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
protected array $resources = [];
|
|
|
|
|
|
|
|
|
|
protected array $prompts = [];
|
|
|
|
|
}
|