wtree Cloud

MCP server

Let Claude, Cursor, VS Code and other MCP clients manage your wtree Cloud instance as tools.

Connect an AI assistant to wtree Cloud through the Model Context Protocol so it can create projects, deploy applications, read logs and manage databases and domains for you.

The server is published as @wtree/cloud-mcp and calls the API through the SDK.

Before you start

  • Node.js 20 or newer, or Bun.
  • An MCP client: Cursor, VS Code, Claude Desktop, Claude Code, Windsurf, Zed or another.
  • An API key from Profile (avatar menu) › API/CLI Keys.

The server acts with the permissions of the user who created the key. An assistant using an owner's key can delete projects. Create the key from a user whose role matches what the assistant may do.

Connect

Add the server to your client. Most clients use this JSON; replace the URL and key.

{
	"mcpServers": {
		"wtree-cloud": {
			"command": "npx",
			"args": ["-y", "@wtree/cloud-mcp"],
			"env": {
				"W3PANEL_URL": "https://your-wtree-cloud-server.com",
				"W3PANEL_API_KEY": "your-wtree-cloud-api-key"
			}
		}
	}
}
ClientLocation
Cursor~/.cursor/mcp.json, or .cursor/mcp.json in a project
Claude Desktopclaude_desktop_config.json
WindsurfThe Windsurf MCP config file
VS CodeThe MCP config file, with a top-level servers key and "type": "stdio"
Zedsettings.json, under context_servers

For Claude Code, use the CLI instead.

claude mcp add wtree-cloud \
  -e W3PANEL_URL=https://your-wtree-cloud-server.com \
  -e W3PANEL_API_KEY=your-wtree-cloud-api-key \
  -- npx -y @wtree/cloud-mcp

With Bun, use bunx @wtree/cloud-mcp in place of npx -y @wtree/cloud-mcp.

Environment variables

VariableRequiredDefaultWhat it does
W3PANEL_URLYesYour wtree Cloud server URL.
W3PANEL_API_KEYYesYour API key.
W3PANEL_TOOL_PRESETNoallToolset: all, minimal, core, deploy, databases or git.
W3PANEL_ENABLED_TAGSNoComma-separated API tags to load, such as project,application,postgres. Overrides the preset.
W3PANEL_DISABLED_TAGSNoComma-separated tags to exclude. Applied last.
W3PANEL_REDACT_ENVNotrueRedacts environment variables, compose files, passwords, tokens and keys from responses before they reach the model.
W3PANEL_CUSTOM_HEADERSNoJSON object of extra request headers, for instances behind Cloudflare Access or a similar proxy.
W3PANEL_TIMEOUTNo30000Request timeout in milliseconds.
W3PANEL_RETRY_ATTEMPTSNo3Extra attempts for read tools after a network or server error. 0 turns retries off. Other tools are never retried.
W3PANEL_RETRY_DELAYNo1000Milliseconds before the first retry, growing with each attempt.

Limit the tools

By default every API endpoint becomes a tool, several hundred in total. Some clients and models get slower or less reliable with that many, so start with a preset.

PresetIncluded tags
minimalproject, application
coreproject, server, application
deployproject, environment, server, application, compose, domain, deployment
databasespostgres, redis, mysql, mariadb, mongo, libsql
gitgithub, gitlab, bitbucket, gitea, gitProvider, registry, sshKey

Tools carry annotations so clients can confirm risky actions: readOnlyHint on reads, destructiveHint on deletes and on tools that stop, kill, clean, restart, reload or cancel something, and idempotentHint only on reads and on updates that set a value.

HTTP mode

The server uses stdio by default. To run it as an HTTP service, give it a token.

W3PANEL_MCP_TOKEN=$(openssl rand -hex 32) npx -y @wtree/cloud-mcp --http

It serves Streamable HTTP on /mcp, legacy SSE on /sse and a health check on /health.

Anyone who can reach the HTTP server can act with your API key, so HTTP mode is locked down by default.

VariableDefaultWhat it does
W3PANEL_MCP_TOKENrequiredBearer token clients send as Authorization: Bearer <token>. At least 16 characters; the server won't start without it.
W3PANEL_MCP_HOST127.0.0.1Address to listen on, for example 0.0.0.0 in a container behind a proxy.
W3PANEL_MCP_PORT3000Port to listen on. wtree Cloud uses 3000, so pick another when both run on one machine.
W3PANEL_MCP_ALLOWED_HOSTSloopback namesComma-separated Host values to accept, such as mcp.example.com. Include the port when it isn't 80 or 443.

Only known Host headers are accepted, which blocks DNS-rebinding from web pages. The default is localhost, 127.0.0.1 and [::1] on the server's port.

Next steps

On this page