Agent tools

MCP Server

Return concise agent instructions.

MCP contract

Give agents tools instead of a long deployment checklist.

The STATICX MCP server runs locally over stdio and wraps the existing /api/v1 API. Agents can list sites, upload ZIPs, deploy, manage variables, and read logs through the documented product contract.

Transport

stdio

Auth

API token

Contract

/api/v1

Client config

Add this server to your MCP client.

Create an API token first. A site token plus STATIC_MANAGER_PROJECT_ID is the safest default when the MCP client only needs one site, but the server can also run with a workspace token or a global token.

MCP JSON
{
    "mcpServers": {
        "static-manager": {
            "command": "node",
            "args": [
                "/var/www/html/static/mcp/static-manager-server.mjs"
            ],
            "env": {
                "STATIC_MANAGER_API_BASE_URL": "https://staticx.site/api/v1",
                "STATIC_MANAGER_API_TOKEN": "paste-token-here",
                "STATIC_MANAGER_PROJECT_ID": "optional-project-id"
            }
        }
    }
}

Run npm install before using the MCP server. The server entrypoint is mcp/static-manager-server.mjs, and the local command is npm run mcp:static-manager.

STATIC_MANAGER_PROJECT_ID is optional. It only provides a default site for project-scoped tools. It does not grant access by itself, widen a token, or replace the normal scope checks on the API token.

Token scope rules

Pick the token that matches the MCP job.

Site token

Best when one MCP client deploys or inspects one site.

Typical fit: static_manager_deploy_zip, logs, and one-site release bots.

Workspace token

Use when one MCP client must create or manage several sites inside one workspace.

Typical fit: client workspaces, multi-site release tools, or one team runner.

Global token

Reserve for broad internal tooling that must cross workspace boundaries.

Typical fit: operator dashboards, workspace listings, and admin-controlled creation flows.

Environment variables

What each MCP variable actually does.

Variable Required Purpose
STATIC_MANAGER_API_BASE_URL Yes Points the MCP server at the STATICX API, usually https://staticx.site/api/v1.
STATIC_MANAGER_API_TOKEN Yes Provides the real permissions. The API token decides whether the MCP client behaves as global, workspace-scoped, or site-scoped.
STATIC_MANAGER_PROJECT_ID No Sets a default site for project tools. Helpful for one-site workflows, but commands can still pass a project id explicitly when this is omitted.

Tools

Agent-ready STATICX actions.

Tool static_manager_config Check the configured MCP environment without exposing the token.
Tool static_manager_auth_check Verify that the API token is valid.
Tool static_manager_list_workspaces List accessible workspaces.
Tool static_manager_create_workspace Create a workspace.
Tool static_manager_list_projects List accessible projects, optionally by workspace.
Tool static_manager_get_project Read one project.
Tool static_manager_create_project Create an empty project.
Tool static_manager_upload_zip Upload a built ZIP archive.
Tool static_manager_import_url Queue a public URL import.
Tool static_manager_deploy_project Publish a project.
Tool static_manager_list_deployments List published deployment versions.
Tool static_manager_get_logs Read recent project logs.
Tool static_manager_deploy_zip Upload ZIP, deploy, and return state in one flow.
Tool static_manager_set_environment_variables Sync project variables.
Tool static_manager_agent_guide Return concise agent instructions.
Prompt deploy-static-site Reusable MCP prompt for agents that need a short deployment instruction.

Best path

Use one tool for the normal release flow.

Tool: static_manager_deploy_zip
Arguments:
{
  "project_id": "81",
  "zip_path": "/absolute/path/to/site.zip",
  "overwrite_confirmed": true
}

The tool uploads the ZIP, deploys a new version, reads project state, reads deployments, reads logs, and returns the live URL when the API confirms success. The ZIP root must contain index.html or index.htm plus 404.html.

Failure handling

MCP errors stay visible.

Tool errors include the API status and response payload. The server does not fabricate success, retry silently, or bypass the STATICX API. If a deployment fails, the agent should return the exact message and inspect static_manager_get_logs.