Model Context Protocol (MCP)
Let AI coding agents drive ZenSailor directly.
An MCP server is a lightweight program that implements the Model Context Protocol (MCP), enabling AI agents to securely interact with external systems — APIs, databases, or infrastructure tools.
ZenSailor exposes a secure MCP endpoint (/api/mcp, Streamable HTTP with
Bearer auth) that lets you control your PaaS from tools like Cursor,
Windsurf, Claude Desktop or Codex using natural language.
What the tools can do#
- List services — “What services are running?” or “Show me failed deployments”.
- Restart services — “Restart the Traefik router” or “Redeploy the payment service”.
- Operate — deployments, compose overrides, managed networks, service backups, platform DNS, diagnostics, logs and container management (platform-owner tools).
- Read the docs — the server exposes documentation as
zensailor://docs/{path}resources, so the agent answers from this manual.
Every request authenticates, binds the session to its API key, and applies the key owner's organization permissions to every tool.
Agent skill and persistent storage#
The platform ships a ready-to-paste Agent Skill — a formal SKILL.md
that teaches compatible agents how to operate your PaaS: every MCP tool, the
REST API syntax, permissions, and step-by-step workflows. Download it from
API Documentation → Download Agent Skill inside your instance. Install it
as .codex/skills/zensailor/SKILL.md, or reuse its instructions in
AGENTS.md or your editor's rules file.
The skill also teaches the one rule agents must know when writing compose
files: use the ${ZENSAILOR_DATA_PATH} variable for persistent volumes.
ZenSailor builds in a temporary folder, so relative paths like ./data are
wiped on every redeploy. The variable resolves to the service's permanent
directory (/opt/zensailor/volumes/<project>/<service>) and is also
available inside the container as an environment variable.
# docker-compose.yml — persistent volumes
volumes:
- ${ZENSAILOR_DATA_PATH}/pgdata:/var/lib/postgresql/dataConfiguration#
Connect your favorite AI code editor or agent with the configuration below. ZenSailor authenticates every request, binds each session to its API key, and applies the key owner's organization permissions to every tool.
Generate an API token inside your instance at Settings > Security.
[mcp_servers.zensailor]
url = "https://paas.example.com/api/mcp"
bearer_token_env_var = "ZENSAILOR_API_TOKEN"
default_tools_approval_mode = "writes"Add this to ~/.codex/config.toml, set ZENSAILOR_API_TOKEN to the token value above, then restart Codex. Write tools will require approval.
Review agent actions: redeploy and proxy-restart tools are marked destructive so compatible clients can request confirmation before changing running infrastructure.