Skip to main content
Glama
axeos-mcp

axeos-mcp

by frenchchoco
README.md
# axeos-mcp

[![CI](https://github.com/frenchchoco/axeos-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/frenchchoco/axeos-mcp/actions/workflows/ci.yml)
[![npm](https://img.shields.io/npm/v/axeos-mcp.svg)](https://www.npmjs.com/package/axeos-mcp)
[![Node](https://img.shields.io/node/v/axeos-mcp.svg)](https://nodejs.org)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

MCP server that lets any MCP-capable LLM — Claude Desktop, Cursor, or a local llama.cpp / Open WebUI stack — **monitor and carefully tune** [AxeOS](https://github.com/bitaxeorg/ESP-Miner) Bitcoin miners (the Bitaxe family and [NerdQAxe++](https://github.com/shufps/ESP-Miner-NerdQAxePlus), 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
- 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

## 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

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

From a clone:

```bash
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`):

```bash
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`](examples/miners.example.json)):

```bash
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`):

```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:

```json
{
  "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:

```bash
# 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
```

Bind HTTP to `127.0.0.1` unless you have a clear reason not to. This process is not an authenticated API gateway.

## Tools

| Tool | Access | What it does |
| --- | --- | --- |
| `list_miners` | Read | Lists miners from `MINERS` / `AXEOS_MCP_CONFIG`. Does not contact devices. Reports whether writes are enabled. |
| `get_miner_status` | Read | `GET /api/system/info` — hashrate, temps, VR temp, power, J/TH, best difficulty, shares, uptime, fan. |
| `get_fleet_summary` | Read | Polls every configured miner. Returns totals, average efficiency, hottest chip, and per-miner status (offline devices are isolated). |
| `get_miner_asic` | Read | Official AxeOS: `GET /api/system/asic`. NerdQAxe++: `GET /api/v2/settings`. Frequency and voltage option lists. |
| `get_miner_statistics` | Read | Official AxeOS: `GET /api/system/statistics` (needs `statsFrequency > 0`). NerdQAxe++: `GET /api/v2/dashboard` or `GET /api/system/info?ts&cur`. |
| `set_miner_settings` | Write | `PATCH /api/system` (AxeOS) or `PATCH /api/v2/settings` (NerdQAxe++). Frequency, core voltage, fan, auto-fan, temp target. |
| `restart_miner` | Write | `POST /api/system/restart`. |
| `get_ckpool_stats` | Read | Merges 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):

| Setting | Default range |
| --- | --- |
| Frequency | 200–800 MHz |
| Core voltage | 800–1400 mV |
| Fan speed | 0–100 % |
| Temperature target | 35–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.

## Configuration

| Variable | Purpose |
| --- | --- |
| `MINERS` | Comma-separated `name@host`, `name@host:port`, or `name@http://host:port` |
| `AXEOS_MCP_CONFIG` | JSON file with `miners` and optional `ckpool` (see examples) |
| `AXEOS_MCP_TIMEOUT_MS` | HTTP timeout, milliseconds (default `8000`) |
| `AXEOS_MCP_ALLOW_WRITE` | `1` to enable settings and restart |
| `AXEOS_MCP_ALLOW_OVERCLOCK` | `1` to allow values outside device option lists |
| `AXEOS_MCP_TOTP` / `AXEOS_MCP_OTP_SESSION` | NerdQAxe++ OTP headers for writes |
| `CKPOOL_LOG_DIR` | Local ckpool logs root (`pool/pool.status`, `users/<address>`) |
| `CKPOOL_URL` | HTTP base, e.g. `https://solo.ckpool.org` |
| `CKPOOL_USER` | Default payout address for `get_ckpool_stats` |
| `AXEOS_MCP_HTTP` | `1` to serve Streamable HTTP instead of stdio |
| `AXEOS_MCP_HTTP_HOST` / `AXEOS_MCP_HTTP_PORT` | Bind address (default `127.0.0.1:8765`) |

If both a config file and `MINERS` define the same miner name, the environment value wins.

## 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](docs/api-notes.md).

## Development

```bash
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](LICENSE) © 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.

TDQS

A3.8/5.0

Scored across 8 tools

Disambiguation4/5

Each tool targets a distinct resource/level: fleet-wide listing and summary, single-miner live status, ASIC capability/options, historical telemetry, write settings, restart, and external pool stats. The main overlap is between get_miner_status (live snapshot) and get_miner_statistics (historical telemetry), which for NerdQAxe++ both draw on /api/system/info, so an agent may hesitate over which to call first.

Naming Consistency5/5

All names follow a consistent snake_case verb_noun pattern (list_miners, get_miner_status, set_miner_settings, restart_miner, get_ckpool_stats) with the resource clearly embedded. The get_miner_* family is applied uniformly across status, ASIC, and statistics.

Tool Count5/5

Eight tools is a well-scoped surface for a miner fleet-monitoring/control server: one per core operation plus fleet aggregation and pool stats. No redundant or filler tools are present.

Completeness3/5

Read paths (list, live status, fleet summary, ASIC options, history) and write paths (set settings, restart) are covered, plus ckpool stats. However, there is no tool to read a miner's current configured settings (frequency, voltage, fan mode), so an agent cannot verify state before or after set_miner_settings — a notable gap for a write-capable server.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues