Connect Axiom to Claude Code

Query logs, traces and events with APL, and read datasets, monitors, dashboards and annotations in Axiom. Add Toolspoke to Claude Code once and it can use 15 Axiom actions. Your Axiom credential stays in Toolspoke, and you choose which actions Claude Code may call.

Set it up in Claude Code

Three steps, the first one once for every toolkit you will ever add.

  1. Add Toolspoke to Claude Code

    Run it in your project, then /mcp to sign in

    claude mcp add --transport http toolspoke https://toolspoke.com/mcp

    The sign-in opens in your browser, and Toolspoke asks you to approve it.

  2. Install Axiom and connect it

    Add Axiom to a project in your Toolspoke workspace.

    API token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.

    API token
    Axiom → Settings → API tokens → New API token. Give it Query and read access on the datasets it should see, plus read on monitors, notifiers, dashboards and annotations. Add Ingest only if agents should send events, and annotation create and delete only if they should mark deployments.
  3. Choose what Claude Code may do

    All 15 actions start on. Switch off any of the 3 actions that change something in Axiom, and Claude Code gets a refusal if it tries.

What you can ask Claude Code for

A few of the Axiom actions that only read, so they are safe to try first.

  • Fetch one dataset's settings by name
  • List the fields in a dataset with their types
  • Run an APL query and get tabular results
  • List saved (starred) APL queries, the queries a team already trusts

What Claude Code can do in Axiom

12 actions read, 2 write and one deletes or permanently changes something.

Reads

  • List datasets

    List the datasets this token can see, with their kind (events, otel traces, otel metrics), description and retention. Start here to find the dataset name a query needs. It is also the install's health check, because a token with no dataset access returns nothing useful anywhere else.

  • Get dataset

    Fetch one dataset's settings by name.

  • List dataset fields

    List the fields in a dataset with their types. Read this before writing APL against a dataset you have not queried, so the query names real fields.

  • Query apl

    Run an APL query and get tabular results. The dataset is named inside the query, e.g. ['http-logs'] | where status >= 500 | summarize count() by bin_auto(_time). Always set a time window and end with a limit or summarize. Results are your users' log lines. For a large result, set include_cursor and pass the returned cursor back to read the next page.

  • List starred queries

    List saved (starred) APL queries, the queries a team already trusts. Filter by dataset.

  • List monitors

    List monitors with their APL query, threshold, schedule and notifiers. Use get_monitor_history to see which ones fired.

  • Get monitor

    Fetch one monitor's full definition, including its query text.

  • Get monitor history

    Read when a monitor triggered and resolved over a time range.

  • List notifiers

    List notifiers, where monitor alerts go (Slack, email, PagerDuty, Opsgenie, webhooks). Webhook URLs, routing keys and tokens are masked.

  • List dashboards

    List dashboards by uid and name.

  • Get dashboard

    Fetch one dashboard with its charts and the APL behind each one.

  • List annotations

    List annotations, the deployment and incident markers shown on charts, optionally for some datasets and a time range.

Writes

  • Create annotation

    Mark an event, such as a deployment, on the charts of one or more datasets.

  • Ingest events

    Send events to a dataset as a JSON array of objects. Each object becomes one event; a _time field sets its timestamp. Ingested data cannot be edited afterwards, only trimmed by age, so send test events to a test dataset. Uses Axiom's ingest endpoint on api.axiom.co.

Deletes or permanently changes

  • Delete annotation

    Delete one annotation permanently.

Axiom in Claude Code: questions

Does Claude Code see my Axiom credential?

No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.

Can I stop Claude Code from changing things in Axiom?

Yes. Each of the 15 actions can be switched off for a project. Turn off the 3 that change something and Claude Code can only read.

Will 15 actions crowd Claude Code's context?

No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Axiom action it needs when it needs it. Adding more toolkits does not add more tools to its list.

Can I add it once for every project?

Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.

What does it cost?

Tool calls are free on every plan, and a Axiom call does not run in a sandbox, so it bills nothing.

Try Axiom in Claude Code

Free to start, and tool calls cost nothing on any plan.