MCP Server
The dashboard speaks the Model Context Protocol, so an assistant such as Claude can work with your estate the way an operator does: read the alerts, look at a host's history, find out what went wrong and propose a fix. It reads whatever it needs by itself. Anything that changes a host is proposed as a job and waits until a person approves it in the inbox.
Nothing is switched on by this feature. The endpoint answers only to an API token, and nothing happens until you create one and connect a client.
The endpoint
POST /api/mcp
The endpoint is MCP over Streamable HTTP, stateless: there is no session, every request
carries its own token and is answered with plain JSON. GET and DELETE answer 405.
What is accepted:
- an ordinary API token as
Authorization: Bearer selv_…; - a read-only token as well, although it answers
GETonly everywhere else: it is offered the read tools and nothing more; - no browser session, and no token the desktop app holds. Both are refused.
Setting it up
Give the assistant an account of its own rather than a person's token.
- Create an account for it under Settings → Users (see Users and Permissions), for example with the role Operator.
- Grant it the customers it should look after. It sees and may touch exactly what an account with that role and those grants may, and nothing beyond.
- Sign in as that account and create a token under Profile → API tokens (see API Tokens). Choose read only for an assistant that should only look, read and write for one that may propose changes.
With a dedicated account everything the assistant does is attributed to it: the audit log names it, and so do the job lists. Because it is the requester of its own jobs, a person other than the assistant has to approve them.
Connecting a client
The client needs the URL and the token. With Claude Code:
claude mcp add --transport http selvara https://<your-instance>/api/mcp \
--header "Authorization: Bearer <token>"
Any other MCP client that supports Streamable HTTP takes the same two things: the URL
https://<your-instance>/api/mcp and the header Authorization: Bearer <token>.
Tools
A read-only token is offered the read tools. A read-write token gets all of them, except
that get_audit_log is offered to administrator accounts only.
Naming hosts and customers
Wherever a tool takes systemId, it also takes host: an id, an exact name, a hostname,
an FQDN or an IP address the agent reports. systemId accepts the same references. Customers
are given as customer (id, exact name or exact code) next to customerId. A reference
that matches nothing, or several hosts, is answered with what to call next (search_hosts,
list_customers) and, when ambiguous, the candidates. Hosts and customers in answers appear as
host: {id, name} and customer: {id, name}.
Totals, hints and pages
Lists return total (or totalInScope, hasMore) and nextCursor; an empty result carries
a hint naming what the filters matched and what to loosen. Most lists return 100 rows per
page by default (list_scripts and the installs and package modes of search_software
25); limit goes up to 100. Tools that submit a job return approvePath, the dashboard page
where a person approves it; wait_for_job returns at once while a job still awaits approval.
| Tool | Kind | What it does |
|---|---|---|
get_fleet_overview | read | Hosts by state, open alerts and what needs attention, in total and per customer |
list_customers | read | Customers with their ids, codes and host counts, to turn a name into an id |
list_agents | read | Agents with their version, whether it is outdated, connection and rollout state |
list_clusters | read | Clusters with their members and whether they are healthy, and why not |
get_cluster | read | One cluster with each member's state and health values |
list_alerts | read | Open and recent alerts, filtered by customer, host, severity, metric, q or since; returns a total |
get_alert | read | One alert with its rule, host, self-healing attempts and a slice of the timeline |
search_hosts | read | Hosts by name, hostname, IP, customer or tag (q), and exact filters: OS, status, kind, service, region, alerts, outdated agent, cluster, attention |
get_host | read | A host's details, status, open alerts, latest jobs and a short inventory |
get_timeline | read | The events of a host, a customer or the fleet, since a given time, by kind or minimum severity |
search_software | read | Which hosts have a package installed, in which version, with pending updates; or the fleet's package list |
search_hardware | read | Hosts by hardware and OS facts: memory, CPU, virtualisation, OS version |
get_host_inventory | read | One host's hardware, disks, network and, on request, its packages |
get_current_metrics | read | The current value of each metric, from the live series |
get_metric_history | read | History from the 5-minute and 1-hour rollups, for a window of at most 7 days |
list_jobs | read | Jobs with their state, requester and approval state; filter by q and since; returns a total |
get_job | read | One job in full |
get_job_output | read | The end of a job's output |
wait_for_job | read | Waits for a job to finish, for up to 60 seconds, and returns its state and the end of its output |
list_scripts | read | The script library the account may see |
get_script | read | A script with its parameters and the body of its current version |
get_patch_overview | read | Pending and security updates, restarts and patch runs, in total and per customer |
list_patch_hosts | read | The patchable hosts with their updates, restart state, policy and latest run |
list_pending_updates | read | Pending updates across hosts, one row per package and version |
get_patches | read | Pending patches of a host |
list_patch_runs | read | Patch runs under way or finished |
get_patch_run | read | One patch run with what its dry run planned and what its apply changed |
get_vulnerabilities | read | Vulnerabilities of a host, of a customer, or of every host the account reaches; known exploited only on request |
list_certificates | read | Certificates by expiry, with expired, expiring, weak and self-signed ones |
get_compliance | read | Compliance checks, endpoint protection (antivirus, firewall, BitLocker) and the security overview |
list_maintenance_windows | read | Maintenance windows, whether open now, the next occurrence, and which cover a host |
list_alert_rules | read | Alert rules with metric, condition, threshold and scope, or those that apply to a host |
get_audit_log | read | Recent audit entries, filtered by host, customer, q or target; offered to administrator accounts only |
get_inbox | read | What is waiting for a person: approvals and questions |
acknowledge_alert | write | Acknowledges an alert, with a comment |
add_note | write | Adds a note to an alert or a host, such as the assistant's diagnosis |
run_script | write | Submits a library script as a job that waits for approval |
run_command | write | Submits a free command as a job that waits for approval |
manage_service | write | Submits a service start, stop or restart that waits for approval |
start_patch_run | write | Patches up to 50 hosts; the apply of each waits for approval |
reboot_host | write | Submits a restart of a host that waits for approval |
cancel_patch_run | write | Cancels a patch run that has not finished |
cancel_job | write | Withdraws a job that is still waiting |
request_shell | write | Asks for time-limited shell access to one host; a person must approve |
get_shell | read | The state of a shell grant: pending, active, expired, and its working directory |
list_shell_grants | read | The token's open shell grants, and recently ended ones on request |
shell_exec | write | Runs a command in an active shell grant, without per-command approval |
end_shell | write | Ends a shell grant now |
A typical pass: list_alerts with since at the assistant's own pace, get_alert, the
read tools to investigate, add_note with the diagnosis, then run_command or
run_script as a proposal. A person approves it in the inbox, and the assistant follows
the job with wait_for_job and checks with get_current_metrics that the fix worked.
The assistant asks; the dashboard never contacts it. There is no push to a client.
Commands
run_command submits a free command, written for bash, sh, powershell or python
to fit the host's operating system, as a script.run job. The approval dialog shows the
full command, its language and the reason the assistant gave.
- No agent update is needed. A host that allows
script.runin theactionslist of itsconfig.yaml(see Agent Settings) runs an approved command; a host that does not allow it rejects the job. - A command cannot be scheduled.
- A retry of a command job waits for approval again.
Shell access
For work that takes many commands, request_shell asks for a time-limited shell on one host instead
of one approval per command. A person approves it once, and shell_exec then runs commands on that host
until the grant ends. The tools need a token, not a browser session.
request_shellwithhost(orsystemId),reasonand optionallyminutes(30 by default, at most 240). It answers with agrantIdin statepending; if the token already has a grant on that host, it answers with that grant instead.list_shell_grantsshows the token's open grants.- The assistant polls
get_shelluntil the state isactive. A request nobody decides lapses after an hour. shell_execwithgrantId,command,language(bashby default;powershellon Windows) andtimeoutSeconds. It waits up to about a minute for the result and otherwise answersrunningwith the job id, whichwait_for_jobfollows. Each command starts in the directory the last one ended in; Python commands run without that tracking.end_shellwhen done.
How it is kept safe:
- Approval is always required, even for a customer whose policy asks for none from people. Without Require approval the token's account decides and is the only one notified; under it another account that may decide access at that customer does, and the token's account may not. The approver may shorten the duration, never extend it.
- Time limit. A grant is valid from approval until its end. Once the end has passed, commands are refused; nothing has to run for that to hold.
- One host, one token. Commands are refused when the grant belongs to another token or host, or is not active. The host must be an approved agent host, and the account still needs access.shell at the customer and the right to run scripts. At most one pending or active grant exists per token and host.
- Recorded. Each command is a
script.runjob that carries the grant, with its output, shown on the grant's page (/shell-grants/<id>). The audit log hasshell_grant.request,.approve,.deny,.command(job id and the first 200 characters),.end,.revokeand.expire, naming "Claude (Jane Admin)". - Revocation. The token's account or an administrator can revoke a grant from its page;
end_shellends it; revoking the token or losing access.shell ends it as well. Commands already running finish, new ones are refused.
See Shell Grants.
Patching
get_patch_overview answers "how many updates are pending" in one call, for every
customer the account reaches or for one of them; list_patch_hosts and
list_pending_updates go into detail.
start_patch_run starts a patch run on each host, as Patch now
does. The dry run goes ahead at once, because it only plans. The apply then waits
for a person under Patches → Approvals and in the inbox, whatever the dry run
found and whatever the customer's policy says, and the person sees the plan before
confirming. The run restarts the host only when asked: reboot is never unless
the assistant chooses if_needed or always, and the approval shows that choice.
With windowId the run follows a maintenance window, as
list_maintenance_windows names them. A host left waiting for a restart can be
restarted with reboot_host, which waits for approval as well.
Safety model
- Approval, always. Every job an MCP tool submits waits for approval in the inbox and
the jobs list, whatever the customer's policy says. That holds for
run_script,run_commandandmanage_servicealike, and for the apply of a patch run started withstart_patch_run, and forreboot_host. See Approval. - A reason for each. Every one of those tools needs a
reason. It is recorded in the audit log, prefixedvia MCP:, and shown beside the job. - Attribution. The account of the token is the requester, and the token is named with it: the bell, the mail and the audit log show "Claude (Jane Admin)", the token name and then the account. Its jobs carry that name in the lists. A request made before upgrading shows the account only.
- Who is asked. Without the customer's Require approval policy a held job is a confirmation by the requester: only the token's account is notified (bell and mail), and with the dashboard open a dialog pops up at once to approve or deny. Under Require approval the account cannot approve its own request, so the other accounts that may decide are notified. See Approving at once.
- Rights are the account's. The token carries only the account's identity. The role and the customer grants are read again on every request, so demoting the account or withdrawing a grant takes effect at once.
- No secrets through the assistant. A library script with a secret parameter cannot be
run through
run_script; run it from the dashboard. Everything the assistant is given passes through the provider of its model, and a password or key typed there would too. - What stays out. Tunnels, SSH keys, connections, users and settings have no tools: they hold access and secrets. The audit log is offered to an administrator account only, as in the dashboard.
- Read-only tokens. They are offered the read tools and cannot reach the write tools.
- Shell grants are the one exception to approval per command, and only for a granted host and time. See Shell access.
- Revocation. Revoking the token stops the assistant at the next request. See Expiry and revocation.
Limits
- Lists are paged with a cursor and return at most 100 entries per page; most default to 100.
- Job output is returned as a tail, the end of what the host sent, not all of it.
get_metric_historyaccepts a window of at most 7 days and reads the rollups. For the value right now useget_current_metrics: the last bucket of a rollup is an average and does not say how the host is at this moment.wait_for_jobblocks for up to 60 seconds. If the job is not finished by then, it answers with its current state; call it again.- The usual rate limits of the API apply to the token.