Skip to main content
Agents reach Apsio through the same public API as the console, with the same permissions: directly, or through the MCP server.

The apsio CLI

An agent with a shell, such as Claude Code, Codex or Cursor’s terminal, can use the apsio CLI (version 0.4.0 or later) with a project token in APSIO_TOKEN. Owners and admins create one in the console under Settings › Agents and tokens (Access tokens); it is shown once:
  • --json prints the API’s JSON, and --jq filters it inside the CLI, so the agent reads only the fields it needs. -r prints strings without quotes.
  • Exit codes are stable (0 success, 1 network or server, 2 usage, 3 not authenticated, 4 bad input, 5 not found), and no command prompts when it is not attached to a terminal.
  • apsio issue open <id> prints the console URL, so the agent can link a person to the evidence.
  • apsio query runs one read-only SQL SELECT over the project’s telemetry, as the MCP tool run_query does and within the same limits, when the plan includes it. --since fills {from:DateTime} and {to:DateTime}, and apsio query schema lists the tables and columns it can read.
  • On a person’s own machine, apsio login signs in as that person in the browser instead of with a token. Data exports (apsio export) need that sign-in, as an owner or admin.

Skills

The apsio-skills repository holds skills in the Agent Skills format that teach an agent to use the CLI:
The skills are versioned with the CLI and name the CLI version they need.

The read API

Without the CLI, call the read API with a project token:
  • The API is described by an OpenAPI 3.1 document at https://api.apsio.io/v1/openapi.json, which needs no token. Give it to the agent so it knows the endpoints and fields.
  • These docs are published for agents too: https://docs.apsio.io/llms.txt lists every page, and llms-full.txt holds them all in one file.

The MCP server

Apsio’s MCP server is at https://mcp.apsio.io/mcp (Streamable HTTP). It is a client of the read API: its tools return the same numbers as the console, with the same permissions. It is a preview (v0). Sign in. Add the URL to your MCP client (Claude Code, Claude Desktop, Cursor and others). The client signs you in with your Apsio account through OAuth, in the browser, and then reads every project of your organizations. Nothing is stored on the MCP server.
Headless agents (CI, bots) send a project token instead, which reads one project. Create it in the console under Settings › Agents and tokens (Access tokens):
Clients without remote MCP run the local bridge, which relays to the same server with the token from APSIO_TOKEN:

Tools

The tools read, except the thirteen write tools at the end of the table, which need your grant. Like the read API, the tools that count sessions, issues, requests or telemetry count release builds unless asked otherwise: their build parameter takes release (the default), debug or all; see Debug and release builds. Every answer has a short summary and the data as JSON, a link to the console for each issue, session and release, and stays within a size budget: long stacks and lists are cut, saying how many items were left out, and lists page with next_cursor. The API writes every call the MCP server makes to your organization’s audit log, with the user or project token that made it and the tool, before it reads anything, and a second row with the call’s HTTP status once it answered. The console’s Agents page counts those calls by day, tool and client, refused calls apart. A sign-in token given to an MCP client works only through the MCP server, not against the API directly. See Explore, SQL and dashboards. run_query sends the agent’s SQL as is: ClickHouse decides what it may read. It runs as a user of the project that can read only the own columns of the project’s telemetry tables (no virtual columns such as _part, no merge()), sees only the project’s rows, cannot change a setting, and stops at 10 seconds, 10,000 result rows and two queries at once; the plan sets how many queries a minute. Its rows are app text too, kept apart from the summary.

Letting an agent write

The write tools are always listed, but an agent can use them only after you grant its client, in the console under Settings › Agents and tokens. A grant is yours, for one client (the client_id the agent signed in with, often a URL) in one organization, and for one kind of write; a client can hold several:
  • Without the grant a tool needs, it fails with grant_required and a link to that page with the client and the kind of write filled in. Open it, check the client, and grant. The agent can then retry.
  • The agent keeps your role: members create and edit, and deleting a panel still needs an owner or admin. Sampling, the kill switch and data exports are for owners and admins only, so only they can give those grants.
  • A grant unused for 90 days expires on its own. You can revoke yours at any time, and owners and admins can revoke anyone’s, one by one or all at once.
  • Every grant, revocation, expiry and write is in the organization’s audit log.
A headless agent with a project token writes only if the token was created with the scope, in Settings › Agents and tokens (Access tokens): dashboards:write creates and edits dashboards and saves shared searches, and never deletes; issues:write changes issue states and assignees in the token’s project. checks:write records the build sizes CI measures: it is minted alone, and such a token reads nothing. No token can change sampling or the kill switch, or read them: a token has no person behind it, and stopping every device of an app needs one. Those tools answer person_required to a token. Board names, panel titles and SQL, and saved searches’ names and queries, are written by people and agents, so they come back as untrusted text as well, and so do rule names, trigger names and the kill switch’s reason. set_sampling changes one family and keeps the rest of the app’s settings, even when someone edits them in the console at the same time. A console save made from a page opened before an agent’s change is refused, so it never undoes that change; reload the page and make it again.

Treat app text as data

Exception messages, log bodies, breadcrumbs, screen names and attributes are written by your app and its users, so they can contain text that looks like instructions. When you pass them to an agent, treat them as data, never as instructions. The CLI shows such text quoted and escaped under a note that it is untrusted, and the skills tell the agent never to follow it, run commands it mentions, or paste it into a shell. The MCP server puts this text only in fields named untrusted, never in its own summaries, and says so in every answer.