Skip to content

Blog

Axiom MCP setup: query datasets and logs

Choose a known dataset and a small query. Compare the response with identical filters in the Axiom console.

Published on · by tracevero · Reading time 4 minutes (608 words)

A dataset name does not tell you which fields exist or which time range a query covers. Start with data that you can already inspect in the console. This guide describes the remote connection and proposes an independent control test. Keep a specific record as a reference so that a technically successful response can also be checked for meaning.

Connect Axiom over HTTP with OAuth

Axiom documents https://mcp.axiom.co/mcp as its remote endpoint with OAuth authentication. The example connects it in VS Code. The vendor documentation states that the hosted MCP service is in the US and routes query results through that infrastructure. Check whether this connection path suits your environment.

{
  "servers": {
    "axiom": {
      "type": "http",
      "url": "https://mcp.axiom.co/mcp"
    }
  }
}

Add the entry to .vscode/mcp.json, start it and complete sign-in. Select the intended organisation. The VS Code guide explains the file; multiple connections belong inside the same servers object.

Inspect the dataset and fields before querying

The tool reference distinguishes listDatasets, getDatasetFields and queryDataset. The last function queries event or trace datasets with APL. Metrics have separate functions, including queryMetrics. Choose the type of data first, followed by the appropriate query function.

Preparing a log query
StepWhat to recordControl point
DatasetExact name and organisationExists in the console
FieldsTime field and required propertyField name and type match
QueryBounded time window and result setThe known record appears
From dataset to evidence 1. Dataset Check organisation and name 2. Fields Inspect relevant properties 3. Query Compare a known record
Inspecting fields prevents similarly named sources from being treated as interchangeable.

Run the initial read test

  1. Open a familiar event in the Axiom console and record the dataset, timestamp and a distinctive field. Define a small time window around that event.

  2. Read the dataset list and fields through the connection. Confirm the field name before building a filter around it. Use the appropriate function for events or metrics.

  3. Run a bounded read query for the same slice. Keep the full query text so that you can reproduce the request instead of relying on a summary of what was requested.

  4. Run the same query in the console. If the results differ, check the organisation, data type, time boundaries and filters individually. Record the difference rather than hiding it with a broader query.

Limit changes and query scope deliberately

The tool reference includes changes to datasets, dashboards and monitors alongside read functions. For the first attempt, enable only the functions your chosen client can meaningfully restrict and check the account permissions. A small result set does not necessarily limit how much data is scanned to produce it. Also use a narrow time window and appropriate filters.

The permissions guide helps plan access. The monitoring comparison covers other data sources; the Axiom registry search lists recorded entries with their sources.

Is queryDataset the right function for metrics?
The tool reference separates event and trace queries from metrics. Check the dataset type and use the function documented for it.
Can I reuse a field name from another query?
Inspect the fields in the selected dataset first. Similar datasets do not necessarily share names or data types.
Does a small result automatically mean a small query?
No. Also limit the time window and filters. The number of returned rows alone does not describe the work involved in producing them.
Does the proposed first test modify my monitors?
The steps are read checks. Still inspect the actual requested tool operation before approving it in your client.

Documentation read on 3 October 2026. The tests described here are suggestions for your own environment.

  1. Axiom: MCP setup
    Show retrieval commandcurl -s https://axiom.co/docs/console/intelligence/mcp-server
  2. Axiom: MCP tools
    Show retrieval commandcurl -s https://axiom.co/docs/console/intelligence/mcp-server/tools
  3. VS Code: MCP configuration
    Show retrieval commandcurl -s https://code.visualstudio.com/docs/agent-customization/mcp-servers

Put it into practice

All posts

tracevero · https://tracevero.com/blog/axiom-mcp-setup