Using the Avassa MCP Server with AI Assistants
avassa-mcp-server is a Model Context Protocol (MCP)
server that lets AI assistants connect directly to your Control Tower. Once configured, you
can ask your AI assistant to inspect cluster health, diagnose application failures, tail
recent alerts, and propose configuration changes - without manually running supctl commands
and pasting output.
The MCP server works with any MCP-compatible client, including Claude Code, Claude Desktop, ChatGPT, Codex, Cursor, Zed, and others.
avassa-mcp-server is supctl started under another name. It keeps its own profiles,
separate from those of supctl, so the AI assistant never uses your supctl credentials.
Instead it gets a token of its own, which you create for it with supctl or get by logging
in with avassa-mcp-server, and which only lets it read and propose changes. The changes it proposes are reviewed and applied by you with
supctl, with your credentials.
The MCP server is also available as supctl mcp start-server, which uses the active supctl
profile. See Running the MCP server from supctl.
A short demo
In this recording, Claude Code on the left stages an application and a deployment through
avassa-mcp-server. Its token can read and stage, but not write configuration. On the right,
the user reviews the staged changes and applies them with supctl.
Prerequisites
supctlinstalled (see Installing supctl)- A token for the AI assistant (see A token for the AI assistant)
- An MCP-compatible AI client (see Client setup below)
Installing avassa-mcp-server
supctl install installs avassa-mcp-server as a link to supctl in ~/.local/bin. If you
installed supctl some other way, create the link yourself next to supctl:
ln -s supctl avassa-mcp-server
A copy of supctl named avassa-mcp-server works as well.
To install only the MCP server, for example on a machine where the AI assistant runs without
supctl, download it from the Control Tower under its own name and let it install itself:
curl -O https://api.example.your-company.avassa.net/avassa-mcp-server
chmod +x avassa-mcp-server
./avassa-mcp-server install
This moves avassa-mcp-server to ~/.local/bin and, if needed, adds that directory to your
PATH. supctl is not installed.
A token for the AI assistant
Log in with supctl as yourself, and create a token for the AI assistant:
supctl mcp create-token
This creates the token with the create-mcp-token action of the Control Tower, and saves it
as a profile of avassa-mcp-server, named after your active supctl profile (or --name).
The profile becomes the default of avassa-mcp-server unless it already has one.
The token has the built-in policies view, which lets it read the configuration and state of
the tenant, and mcp-stage, which lets it stage changes. It cannot change the
configuration: it proposes changes, and you apply them with your own credentials. The changes
it stages are your own staged changes, which only your tokens can read.
If the assistant should see less, give it a policy of your own that allows reading only what
it needs, together with mcp-stage:
supctl mcp create-token --policy ai-read --policy mcp-stage
The policies must be dominated by your own: a token you create cannot do anything you cannot.
If you may not read all that view reads, create-mcp-token refuses view, and you give a
policy that reads less.
The token is revoked when your own supctl token expires, and at the latest when its TTL
runs out (--ttl). Create a new one with supctl mcp create-token after you have logged in
again.
The profiles of avassa-mcp-server are kept in ~/.config/avassa-mcp-server. It ignores
SUPCTL_CONFIG_DIR, SUPCTL_PROFILE_DIR, SUPCTL_TOKEN and SUPCTL_TOKEN_INFO, so an
environment set up for supctl does not hand its credentials to the AI assistant. The
-c, -d and -P options select its configuration directory and profile as for supctl.
avassa-mcp-server has only the commands to log in and out (do login, do logout and the
other login operations), to manage its profiles (profile), to update itself from the
Control Tower (update), and to start the server (start).
Logging in with avassa-mcp-server
Instead of creating the token with supctl, you can log in with avassa-mcp-server itself,
as yourself. Then supctl need not be installed where the AI assistant runs, such as in a
VM of its own:
avassa-mcp-server --host api.example.your-company.avassa.net do login you@example.com
Every login of avassa-mcp-server (do login, do oidc-login, do passkey-login and the
others) asks the Control Tower for a token with only view and mcp-stage. No token with
what you may do is created on the way. The changes it stages are your own staged changes,
as with supctl mcp create-token, and you review and apply them with supctl.
- The login is refused if what you may do does not cover
viewandmcp-stage. That is also so for a password login of a user who must log in with a passkey: usedo passkey-login. - Policies of your own (
--policy) are only available withsupctl mcp create-token. - The token lives as long as a token of that login does, and
avassa-mcp-server do logoutrevokes it. Log in again when it has expired.
An AI assistant in a separate VM or container
In a VM, the simplest is to install only avassa-mcp-server there and log in with it, as
described above. supctl and your own credentials then never are on that machine.
Where you cannot log in, such as in a container, give it a profile made on your own machine.
A profile of avassa-mcp-server is a directory: cfg holds the address and CA certificate
of the Control Tower, and user holds the token. Create the profile, copy the directory, and
remove your copy:
supctl mcp create-token --name vm
scp -rp ~/.config/avassa-mcp-server/profiles/vm vm:.config/avassa-mcp-server/profiles/
rm -r ~/.config/avassa-mcp-server/profiles/vm
If the profile became the default of avassa-mcp-server on your machine, remove the
~/.config/avassa-mcp-server/default link as well. On the other machine, install
avassa-mcp-server, and make the profile its default with
ln -s profiles/vm ~/.config/avassa-mcp-server/default, or select it with -P vm. Keep the
token file readable only by its owner.
In a container, mount the profile directory read-only and select it with -d:
avassa-mcp-server -d /mcp-profile start
The VM or container must reach the Control Tower at the address of the profile. A token from
supctl mcp create-token is still revoked when your own supctl token expires: log in again
and create a new profile before a session that should last longer.
Client setup
The MCP server is started by running avassa-mcp-server start. Each client has its own way of
configuring MCP servers, but the command is the same in all cases.
Claude Code
Add an .mcp.json file to your project root (or any working directory where you use Claude
Code):
{
"mcpServers": {
"supd": {
"type": "stdio",
"command": "avassa-mcp-server",
"args": ["start"]
}
}
}
When you open a project containing .mcp.json, Claude Code automatically spawns
avassa-mcp-server start as a background subprocess. Claude Code will prompt you to approve the
server the first time it is used.
Claude Desktop
Edit the Claude Desktop configuration file and add the supd server under mcpServers:
{
"mcpServers": {
"supd": {
"command": "avassa-mcp-server",
"args": ["start"]
}
}
}
The configuration file is located at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop after saving the file. The supd server will appear in the tools
panel (the hammer icon) when a conversation starts.
Note: Claude Desktop launches the MCP server using the environment of the desktop application, which may differ from your terminal environment. If
avassa-mcp-serveris not on the systemPATH, use the full path to it (e.g.~/.local/bin/avassa-mcp-server).
Codex
Add the server to your Codex configuration file (~/.codex/config.yaml):
mcpServers:
supd:
type: stdio
command: avassa-mcp-server
args:
- start
Codex spawns avassa-mcp-server start as a subprocess and communicates with it over
stdin/stdout. The tools are available automatically when you start a Codex session.
ChatGPT
ChatGPT uses the HTTP transport, so you need to start the MCP server manually before connecting:
avassa-mcp-server start --http --port 8765
Keep this process running while using ChatGPT. The server listens on
http://127.0.0.1:8765 by default; use --port to choose a different port and --bind
to listen on a different address.
In ChatGPT, go to Settings > Connectors (or the equivalent MCP configuration
section for your plan) and add a new MCP server pointing to the URL where your
avassa-mcp-server start --http process is reachable. For the ChatGPT desktop app, use
http://127.0.0.1:8765. For the web interface, the server must be reachable from
ChatGPT's servers - expose it via a reverse proxy or tunnel and use that public URL.
Authentication, TLS, and CORS
The HTTP server defaults to binding only on 127.0.0.1. To listen on a non-localhost
address, you must provide a Bearer token; the server refuses to start otherwise.
# Generate a random token and require it in the Authorization header:
TOKEN=$(openssl rand -hex 32)
avassa-mcp-server start --http --bind 0.0.0.0 --auth-token "$TOKEN"
# Or read the token from a file:
avassa-mcp-server start --http --bind 0.0.0.0 --auth-token-file /etc/avassa-mcp.token
# Serve TLS directly instead of using a reverse proxy:
avassa-mcp-server start --http --bind 0.0.0.0 \
--auth-token "$TOKEN" \
--cert /etc/ssl/private/mcp.pem \
--key /etc/ssl/private/mcp.key
# Allow a browser-based MCP client at a specific origin:
avassa-mcp-server start --http --allow-origin https://chat.example.com
Clients then send Authorization: Bearer <token> on every request.
Cursor
Add a .cursor/mcp.json file to your project root:
{
"mcpServers": {
"supd": {
"command": "avassa-mcp-server",
"args": ["start"]
}
}
}
Alternatively, configure it globally via Cursor Settings > MCP. Cursor picks up the server automatically and makes the tools available to the AI in the editor panel.
Zed
Add the server to your Zed settings.json under the context_servers key:
{
"context_servers": {
"supd": {
"command": {
"path": "avassa-mcp-server",
"args": ["start"]
}
}
}
}
Microsoft Copilot
Create a .mcp.json in the project directory.
{
"mcpServers": {
"supd": {
"type": "stdio",
"command": "avassa-mcp-server",
"args": ["start"]
}
}
}
Other MCP-compatible clients
Any client that supports MCP stdio servers can use avassa-mcp-server start. The general
pattern is to configure the client to run avassa-mcp-server start as a subprocess
communicating over stdin/stdout. Consult your client's MCP documentation for the exact configuration format.
Profiles
The MCP server uses the default avassa-mcp-server profile. If you work with several
Control Towers, create one profile for each and select it in the client configuration with
-P:
"args": ["-P", "production", "start"]
Running the MCP server from supctl
supctl mcp start-server starts the same MCP server with the active supctl profile, and
takes the same options as avassa-mcp-server start:
{
"mcpServers": {
"supd": {
"command": "supctl",
"args": ["mcp", "start-server"]
}
}
}
The AI assistant then has the credentials and permissions of that profile. Use it only when
that is what you want; avassa-mcp-server with a user of its own is the safer choice.
How it works
Stdio transport (Claude Code, Claude Desktop, Codex, Cursor, Zed): The AI client
spawns avassa-mcp-server start as a subprocess and communicates with it over stdin/stdout
using the MCP protocol.
HTTP transport (ChatGPT): You start avassa-mcp-server start --http manually as a
long-running process. The AI client sends JSON-RPC requests over HTTP POST to the
server's endpoint.
In both cases, the MCP server makes REST API calls to your Control Tower on the AI's behalf, with the token of its profile.
The connection is local to your machine - no Control Tower data is sent to the AI provider except what appears in the conversation itself.
The server reports the connected Control Tower host and tenant name in its initialization
response, so the AI knows the context without having to call a tool first. It supports MCP
protocol versions 2025-03-26 and 2024-11-05, negotiating with the client at connection
time.
Available tools
The MCP server exposes the following tools:
Observability
| Tool | Description |
|---|---|
show | Fetch any operational state or configuration path (use get_model or search_model first to discover the correct path) |
get_cluster_health | Per-site summary: hosts that have called home, hosts in distress, cluster establishment, connection state, CA certificate expiry. Needs a site provider tenant. |
get_sites | List all assigned sites with their connection state |
get_site_health | Per-site or all-sites: connected, degraded, deployed-application count. For a single site it also returns the site status and each host's distress (for example disk-threshold-reached), which is where the reason for a degraded site shows. The site status and hosts need a site provider tenant. |
get_application_status | Application health summary or per-application status |
get_application_health | Per-application operational status, error messages, and per-site breakdown |
get_deployment_status | Deployment stage, site counts, and deploying-status summary or per application |
get_alerts | Recent alerts from the system notifications stream (last hour by default, optional site filter) |
get_logs | Recent application log entries (last hour by default, optional site filter) |
get_container_logs | Container stdout/stderr (the actual logs the running container produced) for a given application on a given site. Returns each entry with time, site, host, service, service_instance, container, and payload. If empty, the response includes a diagnostic hint. |
list_app_containers | Discover the service-instance + container combinations that exist for an application by listing container-log topics. Call this when you do not yet know which services/containers an application has, or when get_container_logs returns empty. |
get_volga_topics | List available event stream topics for the current tenant (use before get_logs to discover topic names) |
get_acme_requests | ACME certificate requests with status, expiry, and errors |
Actions
| Tool | Description |
|---|---|
delete_acme_request | Delete a specific ACME certificate request |
Staging
| Tool | Description |
|---|---|
stage_change | Append a proposed configuration change to the staged changes on the Control Tower. Data is validated against the Control Tower schema before staging - an error is returned if the data is invalid. |
show_staged | Display the current staged changes |
delete_staged_change | Remove a single staged change by its 1-based index (use show_staged first to see the list) |
clear_staged | Discard all staged changes |
Model exploration
| Tool | Description |
|---|---|
get_model | Navigate the data model schema to a given path and list its children with their kinds and descriptions. Use this to discover what paths exist before calling show or stage_change. |
search_model | Search the full data model by keyword, matching path names and descriptions. Returns matching paths with {key} placeholders for list nodes to show where key values are required. |
Documentation
| Tool | Description |
|---|---|
get_docs | Search the Avassa documentation index by keyword and return matching topics with URLs. |
read_doc | Fetch the full markdown content of a docs.avassa.io page returned by get_docs. URLs outside https://docs.avassa.io/ are rejected. |
The staging tools never change the configuration - the staged changes are kept on the
Control Tower, apart from it, until you review and apply them yourself with supctl.
Slash commands
In addition to tools, the MCP server exposes a small set of prompts that appear as slash
commands in clients that support them (for example /diagnose-site in Claude Code):
| Prompt | Arguments | What it does |
|---|---|---|
diagnose-site | site (optional) | Walks site health, host distress for degraded or disconnected sites, application health, recent alerts, and container logs for one or all sites and summarises the findings. |
check-certificates | none | Audits ACME certificate requests for failures, expiring certificates, and unresolved errors. |
recent-alerts | since (optional, default 1h), site (optional) | Summarises recent alerts grouped by type and severity. |
deployment-status | application (optional) | Reports deployment health, highlighting stalls and per-site failures. |
Each prompt expands into a guided sequence of tool calls; the AI will explain what it finds rather than make any changes.
Resources
In clients that show MCP resources (subscribable read-only snapshots), the server exposes:
| URI | Description |
|---|---|
supd://state/sites | All assigned sites with connection state |
supd://state/alerts/recent | Alerts from the last hour |
supd://state/deployments | Deployment status across applications |
supd://state/cluster-health | Call-home state, versions, distress indicators |
Resources return JSON snapshots; the AI can use them as context without having to invoke a tool explicitly.
Proposing configuration changes
The staging workflow lets the AI propose configuration changes that you review before they are applied to the Control Tower.
The workflow works like this:
- You ask the AI to propose a configuration change - for example, "Update the default image
registry to
my-registry.example.comand stage it for me to review." - The AI calls
stage_change, which validates the proposed data against the Control Tower schema and adds the change to your staged changes on the Control Tower. - You review the proposals with
supctl mcp staged show. - When satisfied, you apply all changes at once with
supctl mcp staged apply, or discard them withsupctl mcp staged clear. The changes are applied with the credentials of your activesupctlprofile, not with those of the AI assistant.
How it works
When the AI calls stage_change, the data payload is first validated against the Control
Tower's schema, together with the changes already staged. If validation fails, the error is
returned to the AI so it can correct the data before staging. If the token of the AI assistant
is not allowed to make the change, the validation is skipped and the change is staged anyway,
since it is you who applies it.
Once validated, the change is added to your staged changes on the Control Tower, in
/v1/state/staged-changes. Each user has one set of staged changes, which only the user's
tokens can read and change: the token you logged in with, and the tokens it created, such as
the one from supctl mcp create-token. Each change records the display name of the token
that staged it, such as userpass-alice@example.com-mcp.
The staged changes are removed a week after they were last changed. They hold at most 200 changes and 1 MiB of data.
Reviewing and applying staged changes
Once the AI has staged its proposals, you review and apply them using supctl mcp staged
from a terminal:
# Review what the AI has proposed
supctl mcp staged show
# Apply all staged changes to the Control Tower
supctl mcp staged apply
# Discard staged changes without applying
supctl mcp staged clear
supctl mcp staged apply only applies changes you have seen. Run in a terminal, it shows
the staged changes and asks before it applies them. supctl mcp staged show also prints a
generation, which changes whenever the staged changes change. Pass it with --generation
to apply exactly the changes you reviewed, without the question: the command is refused if
the AI has changed them since. Without a terminal, for example in a script, --generation
is required. clear takes --generation as well.
supctl mcp staged apply sends all changes as a single transactional request - either all
changes are applied or none are. On full success it removes them from the staged changes;
any change the AI staged while they were applied is kept. The staged changes are kept if the
request fails, so you can inspect them and retry.
A staged change remembers the version of the object it was made for. If someone has
changed that object since the AI staged its change, apply fails with a conflict and
nothing is applied, instead of overwriting what the other person did. Ask the AI to stage
the change again, on the current configuration.
Example usage
Once configured, you can interact with your cluster conversationally. Some examples:
Checking site and application health:
"Are all sites connected? Which applications are currently failing?"
Diagnosing a problem:
"Show me the recent alerts and application logs for the last hour."
Diagnosing a certificate issue:
"Check the ACME certificate requests and tell me if any have errors."
Proposing a configuration change:
"Update the default image registry to
my-registry.example.comand stage the change for me to review."
The AI will call the appropriate tools, interpret the results, and explain what it finds - including suggesting follow-up actions and staging configuration changes where relevant.
Security considerations
The MCP server authenticates to the Control Tower with the token of its profile. It is
subject to the same access controls enforced by the Control Tower, including tenant isolation
and policy checks. Anything that profile can read, the AI can read. Give avassa-mcp-server
a token from supctl mcp create-token or from its own login, whose policies only let it read
and stage changes, so that it cannot change the configuration even through other means.
The MCP server only exposes read tools and staging tools. No configuration is changed on the
Control Tower until you explicitly run supctl mcp staged apply from your terminal.
The staged changes may contain secrets. They are your own, and only your tokens can read them, but the AI assistant staged them, and its conversation may be sent to the AI provider. Review the changes before you apply them.
The protection is the policy of the AI assistant's token, not the program. An AI assistant
that can run shell commands as your operating system user can run supctl too, and can read
any token file of that user, including those of your supctl profiles. To keep your own
credentials out of its reach, run the AI assistant as a separate operating system user or in
a separate VM or container, where only its own avassa-mcp-server profile exists (see
An AI assistant in a separate VM or container).
Logs and alerts may contain sensitive data. get_alerts, get_logs, and
get_container_logs return real cluster output; that output then becomes part of your
AI conversation and may be sent to the AI provider as conversation context. Only enable
the MCP server in environments where this is acceptable.
HTTP transport hardening. The --http mode binds to 127.0.0.1 by default. To expose
the server beyond localhost:
- Always pass
--auth-token(or--auth-token-file); the server refuses to start on a non-localhost bind without authentication. - Prefer
--cert/--keyfor direct TLS over running behind a reverse proxy when you need to terminate TLS yourself. - Only set
--allow-originfor trusted browser-based clients, and use a specific origin rather than*.
Troubleshooting
The supd server does not appear in the client
Check that the configuration file is valid JSON and saved in the correct location for your
client. For Claude Code, verify that .mcp.json exists in the project root. For Claude
Desktop, restart the application after editing the configuration file.
For Claude Code, you can reset the server approval state with:
claude mcp reset-project-choices
avassa-mcp-server not found
Desktop applications (Claude Desktop, Cursor, Zed) may use a different PATH than your
terminal. Use the full path to avassa-mcp-server in the configuration, for example:
"command": "/home/me/.local/bin/avassa-mcp-server"
Run which avassa-mcp-server in your terminal to find the full path.
Authentication errors from the MCP server
Run avassa-mcp-server profile show to check which profile it uses. A token from
supctl mcp create-token is revoked when your own supctl token expires; log in with
supctl and create a new one:
supctl mcp create-token
A token from a login of avassa-mcp-server has expired or been revoked; log in again with
avassa-mcp-server do login.
supctl mcp staged apply fails with an error
All changes are applied as a single transaction - if any change fails, none are applied.
The staged changes are kept so you can review and fix them, then run
supctl mcp staged apply again. If the error is conflict for <path>, the object at that
path was changed after the AI staged its change: clear the staged changes and ask the AI to
stage them again.
supctl mcp staged show says there are no staged changes, but the AI has staged some
The staged changes are those of the user whose token the AI assistant has. Check that it uses
a token from supctl mcp create-token, or from a login of avassa-mcp-server, of the same
user and tenant as your active supctl profile, with avassa-mcp-server do token-info.
Staged changes are also removed a week after they were last changed.