Repository avatar
Developer Tools
v0.1.2
active

axeos-mcp

io.github.frenchchoco/axeos-mcp

Monitor and safely tune Bitaxe and NerdQAxe AxeOS miners, and read ckpool solo stats.

Documentation

axeos-mcp

CI npm Node License: MIT axeos-mcp MCP server

MCP server that lets any MCP-capable LLM — Claude Desktop, Cursor, or a local llama.cpp / Open WebUI stack — monitor and carefully tune AxeOS Bitcoin miners (the Bitaxe family and NerdQAxe++, which runs an AxeOS fork) and read ckpool solo-pool stats.

Write tools are off by default. Nothing changes frequency, voltage, fans, or power-cycles a miner unless you set AXEOS_MCP_ALLOW_WRITE=1.

Features

  • Live status: hashrate, chip and VR temperatures, power, efficiency (J/TH), best difficulty, shares, uptime, fan speed
  • Current settings snapshot from the same info endpoint: frequency, core voltage, fan and auto-fan, screen, overheat mode, and the other user-adjustable fields AxeOS reports
  • Multi-miner fleet summary from MINERS or a JSON config file
  • Historical telemetry where the firmware actually exposes it
  • ASIC frequency / voltage option lists, used as a safety check before tuning
  • ckpool pool and user stats from a local logs directory or an HTTP base URL
  • stdio transport (default) and optional Streamable HTTP (GET /health, optional bearer token on /mcp)

Try it on Glama

The server is listed on Glama. You can browse its tools, check its quality score, and test it online with MCP Inspector.

Requirements

  • Node.js 20 or later
  • Miners reachable from the machine that runs this server (AxeOS and NerdQAxe++ APIs are typically limited to RFC 1918 / local clients)
  • Optional: a ckpool log directory, or HTTP access to a ckpool stats host

Install

npm install -g axeos-mcp
# or, without a global install:
npx -y axeos-mcp

From a clone:

git clone https://github.com/frenchchoco/axeos-mcp.git
cd axeos-mcp
npm install
npm run build

Quick start

Configure a fleet with placeholder-style locators (name@host):

export MINERS=gamma@192.168.1.50,nerdqaxe@192.168.1.51
axeos-mcp

Or point at a config file (see examples/miners.example.json):

export AXEOS_MCP_CONFIG=/home/you/.config/axeos-mcp/miners.json
axeos-mcp

Claude Desktop

Add an entry to the Claude Desktop MCP config (claude_desktop_config.json):

{
  "mcpServers": {
    "axeos": {
      "command": "npx",
      "args": ["-y", "axeos-mcp"],
      "env": {
        "MINERS": "gamma@192.168.1.50,nerdqaxe@192.168.1.51"
      }
    }
  }
}

To allow tuning and restarts, add "AXEOS_MCP_ALLOW_WRITE": "1" to that env block. Prefer a local install ("command": "axeos-mcp" or "command": "node", "args": ["/path/to/axeos-mcp/dist/index.js"]) if you do not want npx on every launch.

Cursor

Add the same server to .cursor/mcp.json in your project, or to your user MCP config:

{
  "mcpServers": {
    "axeos": {
      "command": "npx",
      "args": ["-y", "axeos-mcp"],
      "env": {
        "MINERS": "gamma@192.168.1.50,nerdqaxe@192.168.1.51"
      }
    }
  }
}

llama.cpp / Open WebUI

Both can attach an MCP server over stdio (the default) or Streamable HTTP:

# stdio: point the host at the axeos-mcp executable
# HTTP:
AXEOS_MCP_HTTP=1 AXEOS_MCP_HTTP_PORT=8765 MINERS=gamma@192.168.1.50 axeos-mcp
# then use http://127.0.0.1:8765/mcp
# liveness: GET http://127.0.0.1:8765/health  (no auth)

Bind HTTP to 127.0.0.1 unless you have a clear reason not to. If you bind a non-loopback address, set AXEOS_MCP_HTTP_TOKEN and send Authorization: Bearer <token> on /mcp. Without a token, a startup warning is printed. GET /health stays unauthenticated and does not expose secrets.

Ask an LLM for your miner stats

Two simple paths, depending on the client you already use.

MCP-capable clients (Claude Desktop, Cursor, and others)

This is the most direct way: run npx -y axeos-mcp and add the short JSON snippet under Claude Desktop or Cursor above (or attach the server over stdio / Streamable HTTP, as in llama.cpp / Open WebUI). Then ask any MCP-capable LLM for your miner stats.

Home Assistant with a local LLM (REST sensors, no MCP)

If you use Home Assistant Assist and a local model (for example via llama.cpp) and you only need to read stats, you do not need this MCP server. Create built-in REST sensors that poll each miner's AxeOS API, expose them to Assist, and let the model read the states from its prompt.

Add one block per miner to configuration.yaml (if you already have a sensor: key, append only the - platform: rest entries):

sensor:
  - platform: rest
    name: Bitaxe 1 hashrate
    resource: http://<miner-ip>/api/system/info
    value_template: "{{ value_json.hashRate | round(1) }}"
    unit_of_measurement: "GH/s"

Replace <miner-ip> with that miner's LAN address (for example 192.168.1.50). Restart Home Assistant, then expose the sensor.*_hashrate entities to Assist (Settings → Voice assistants). You can also add them to a dashboard.

If your conversation agent is Extended OpenAI Conversation (or another agent with tool / function calling), clear the Functions field (or set it to []) and turn Use tools off. The model should read the entity states already included in the prompt. Many small local models and backends do not handle tool or function calling reliably; if tools stay enabled, the model may emit raw <tool_call> tags or fail with errors such as Action sensor.update not found. Reading states is enough for hashrate questions.

On a small CPU-only instruct model, a reply that lists every miner typically comes back in around 10 seconds. Expose only the entities you actually ask about; a long exposed-entity list slows local models down.

The Home Assistant add-on is a different path: it runs this server so Assist or a LAN MCP client can call miner tools (and, if you enable writes, carefully tune a device). See that repository's DOCS.md for the full Assist walkthrough.

Tools

ToolAccessWhat it does
list_minersReadLists miners from MINERS / AXEOS_MCP_CONFIG. Does not contact devices. Reports whether writes are enabled.
get_miner_statusReadGET /api/system/info — hashrate, temps, VR temp, power, J/TH, best difficulty, shares, uptime, fan.
get_fleet_summaryReadPolls every configured miner. Returns totals, average efficiency, hottest chip, and per-miner status (offline devices are isolated).
get_miner_asicReadOfficial AxeOS: GET /api/system/asic. NerdQAxe++: GET /api/v2/settings. Frequency and voltage option lists.
get_miner_settingsReadGET /api/system/info — the live configuration: frequency, core voltage (target and measured), nominal voltage, fan speed, manual fan speed, auto-fan, temperature target, screen invert/flip, rotation, display timeout, overheat mode, overclock, ASIC model, stats interval, hostname, and stratum endpoints. Does not change the device. Use it before or after set_miner_settings.
get_miner_statisticsReadOfficial AxeOS: GET /api/system/statistics (needs statsFrequency > 0). NerdQAxe++: GET /api/v2/dashboard or GET /api/system/info?ts&cur.
set_miner_settingsWritePATCH /api/system (AxeOS) or PATCH /api/v2/settings (NerdQAxe++). Frequency, core voltage, fan, auto-fan, temp target.
restart_minerWritePOST /api/system/restart.
get_ckpool_statsReadMerges ckpool pool.status (three JSON lines) and optional users/<address> from a log dir or HTTP URL.

Safety

Write tools refuse to run unless AXEOS_MCP_ALLOW_WRITE=1.

Default hard bounds (override with AXEOS_MCP_MIN_* / AXEOS_MCP_MAX_* if you must):

SettingDefault range
Frequency200–800 MHz
Core voltage800–1400 mV
Fan speed0–100 %
Temperature target35–85 °C

When the miner publishes frequencyOptions or voltageOptions, values outside those lists are rejected unless AXEOS_MCP_ALLOW_OVERCLOCK=1. Overclock still cannot exceed the hard bounds.

NerdQAxe++ firmware can require OTP on write endpoints. Set AXEOS_MCP_TOTP (or AXEOS_MCP_OTP_SESSION) in the server environment. Do not paste TOTP codes into chat or commit them.

Tuning an ASIC can overheat or damage hardware. Stay inside the vendor lists unless you know why you are leaving them, watch VR and chip temperatures, and do not point this server at miners you do not own.

Options / Configuration

These are the options you will usually set, as environment variables (npm / Docker) or as fields in the Home Assistant add-on.

On the CLI, a fleet comes from MINERS or AXEOS_MCP_CONFIG (at least one of the two). In the Home Assistant add-on, MINERS is the only required option; everything else can stay at its default.

OptionRequired or optionalWhat it doesHow to set itWhy you'd want it
MINERSRequired on the add-on. On the CLI, required unless you set AXEOS_MCP_CONFIG instead.The list of miners the server should know about. Each entry is name@host, or name@host:port, or name@http://host:port. Official AxeOS (Bitaxe) and NerdQAxe++ are both supported; the firmware family is detected automatically when the server talks to the device.Comma-separated list, for example export MINERS=gamma@192.168.1.50,nerdqaxe@192.168.1.51. In Claude Desktop or Cursor, put the same value in the server env block. In the add-on, it is the Miners field.This is how the server finds your fleet. Without a list (or a config file on the CLI), read tools have no default miner to query.
AXEOS_MCP_HTTP_TOKENOptionalWhen set, every request to Streamable HTTP /mcp must include Authorization: Bearer <token> (compared in constant time). GET /health stays unauthenticated and returns only status and version. If this is unset, /mcp stays open, which is the default for a localhost bind.Generate a long random string (openssl rand -hex 32 or a password manager). Export it as AXEOS_MCP_HTTP_TOKEN, and configure the same string as the bearer token in your MCP client. Do not commit it or paste it into a public issue.Use it when HTTP is reachable beyond the local process — for example a Docker port mapping, or the Home Assistant add-on, which uses host networking on port 8765. It stops other devices on the LAN from calling miner tools, especially if you enable writes. Binding a non-loopback address without a token logs a startup warning.
AXEOS_MCP_ALLOW_WRITEOptional (default off / 0)Enables the write tools set_miner_settings and restart_miner. With the default 0, the server is read-only: it can list miners and read status and settings, but it will not change frequency, voltage, or fans, or reboot a device.Set AXEOS_MCP_ALLOW_WRITE=1 in the environment, or choose 1 in the add-on. Leave it unset or 0 unless you intend the LLM to change settings on a fleet you own.Leave it off for monitoring. Turn it on only when you want a conversation agent to tune or restart a miner. Watch chip and VR temperatures when writes are enabled.
AXEOS_MCP_ALLOW_OVERCLOCKOptional (default off / 0)Even with writes enabled, frequency or voltage values outside the lists published by the device are rejected unless this is 1. Hard safety bounds still apply either way (see Safety).Leave unset or 0. Set AXEOS_MCP_ALLOW_OVERCLOCK=1 only if you knowingly want a value the firmware does not list as an option.Keep this off unless you have a specific reason to step outside the vendor lists. Tuning outside those lists can overheat or damage an ASIC.
CKPOOL_URLOptionalHTTP base URL used by the get_ckpool_stats tool to read solo-pool stats.For example export CKPOOL_URL=https://solo.ckpool.org, or the stats URL of a pool you run yourself. Leave unset if you do not need pool stats.Set this when you solo-mine and want the LLM to read pool or user stats alongside miner status.
CKPOOL_USEROptionalDefault payout address (or worker user) used by get_ckpool_stats when the tool call does not name one.Your pool username or payout address, for example export CKPOOL_USER=bc1qexampleaddress0000000000000000000000. Leave unset if you will pass the user in the tool call, or if you are not using ckpool stats.Saves you from repeating the address on every stats request. Use it together with CKPOOL_URL (or CKPOOL_LOG_DIR below).

Other environment variables

These are available on the CLI and in Docker. They are not shown as add-on options.

VariableRequired or optionalPurpose
AXEOS_MCP_CONFIGOptional (CLI alternative to MINERS)JSON file with miners and optional ckpool (see examples/miners.example.json). If both the file and MINERS define the same miner name, the environment value wins.
AXEOS_MCP_TIMEOUT_MSOptionalHTTP timeout for miner and ckpool requests, in milliseconds (default 8000).
AXEOS_MCP_TOTP / AXEOS_MCP_OTP_SESSIONOptionalNerdQAxe++ OTP headers for write calls when OTP is enabled on the device. Do not paste TOTP codes into chat or commit them.
CKPOOL_LOG_DIROptionalLocal ckpool logs root (pool/pool.status, users/<address>), used by get_ckpool_stats instead of or as well as CKPOOL_URL.
AXEOS_MCP_HTTPOptional1 to serve Streamable HTTP instead of stdio (or pass --http).
AXEOS_MCP_HTTP_HOST / AXEOS_MCP_HTTP_PORTOptionalBind address (default 127.0.0.1:8765 on the CLI; the Docker image binds 0.0.0.0:8765).

Firmware differences

Official AxeOS and NerdQAxe++ share /api/system/info, PATCH /api/system, and POST /api/system/restart. They diverge on history and on how settings are written:

  • AxeOS exposes /api/system/asic and /api/system/statistics. Fan writes use autofanspeed and manualFanSpeed.
  • NerdQAxe++ adds /api/v2/*. Option lists and writes go through /api/v2/settings (fans are a fans[] array). History is on /api/v2/dashboard (or info?ts=&cur=). /api/system/asic and /api/system/statistics are not documented there.
  • Upstream NerdQAxe++ is in feature freeze; new firmware work is aimed at nerd-os-rs.

Details, unit caveats, and the exact upstream documents are in docs/api-notes.md.

Docker

The process image listens on Streamable HTTP (0.0.0.0:8765 inside the container). The npm CLI default is unchanged (127.0.0.1). A multi-arch (linux/amd64, linux/arm64) image is published at ghcr.io/frenchchoco/axeos-mcp:

docker run --rm -p 8765:8765 \
  -e MINERS=gamma@192.168.1.50 \
  -e AXEOS_MCP_HTTP_TOKEN=change-me \
  ghcr.io/frenchchoco/axeos-mcp:0.1.4

To build locally instead:

# local single-arch build
docker build -t axeos-mcp:local .

docker run --rm -p 8765:8765 \
  -e MINERS=gamma@192.168.1.50 \
  -e AXEOS_MCP_HTTP_TOKEN=change-me \
  axeos-mcp:local

Then GET http://127.0.0.1:8765/health and point an MCP client at http://127.0.0.1:8765/mcp with the bearer token.

Home Assistant add-on

An experimental Home Assistant add-on that runs this image lives in frenchchoco/hassio-addons. It is for Home Assistant's MCP Client and MCP apps on your LAN. It does not create sensors.

If you only want Assist to read hashrate, the built-in REST sensors described in Home Assistant with a local LLM are enough. For richer dashboards and automations, you can also use a custom AxeOS integration.

The add-on DOCS.md walks through installing the add-on and connecting a conversation agent.

Multi-arch build and GHCR publish

Tags matching v* trigger .github/workflows/ghcr.yml, which builds linux/amd64 and linux/arm64 and pushes ghcr.io/frenchchoco/axeos-mcp:<version> and :latest with GITHUB_TOKEN. To build both architectures by hand:

docker buildx build --platform linux/amd64,linux/arm64 -t axeos-mcp:local .

Development

npm install
npm test
npm run lint
npm run build

CI runs lint, tests, typecheck, and build on Node 20 and 22. Please mock HTTP in tests; do not target a real miner from CI.

Roadmap

  • Optional pause/resume tools for official AxeOS (POST /api/system/pause and /resume)
  • Scoreboard tool (GET /api/system/scoreboard) and a compact “health” view
  • mDNS / Swarm-style fleet discovery
  • Compatibility notes for nerd-os-rs once its HTTP API settles
  • npm provenance and a signed release checklist

License

MIT © 2026 frenchchoco

AxeOS / ESP-Miner and NerdQAxe++ are upstream projects with their own licenses. This repository is an independent MCP client of their documented HTTP APIs.

NPM
axeos-mcp
Install Command
npm install axeos-mcp