MCP server for asic-rs, Bitcoin ASIC miner management
asic-rs-mcp
MCP server for Bitcoin ASIC miner management. Wraps asic-rs to expose miner discovery, data gathering, and control as MCP tools.
Install
cargo install --path .
Usage
asic-rs-mcp # uses ./asic-rs-mcp.toml if present
asic-rs-mcp --config /etc/asic-rs.toml # explicit config path
ASIC_RS_MCP_CONFIG=~/.config/asic-rs-mcp.toml asic-rs-mcp
The server communicates over stdio (stdin/stdout). Tracing logs go to stderr. Set RUST_LOG=debug for verbose output.
Claude Desktop
{
"mcpServers": {
"asic-rs": {
"command": "asic-rs-mcp",
"args": ["--config", "/path/to/asic-rs-mcp.toml"]
}
}
}
Configuration
Copy and edit asic-rs-mcp.toml:
[server]
data_timeout_secs = 30 # per-miner data calls
control_timeout_secs = 60 # control operations (restart, set_pools, etc.)
identification_timeout_secs = 10 # miner identification during discovery
scan_timeout_secs = 300 # total scan_network timeout
fleet_timeout_secs = 120 # total get_fleet_data timeout
fleet_concurrency_limit = 50 # max concurrent connections in fleet ops
[credentials.default]
username = "root"
password = "root"
# Per-firmware overrides
[credentials.antminer]
username = "root"
password = "root"
[credentials.whatsminer]
username = "admin"
password = "admin"
[credentials.vnish]
password = "admin"
[credentials.epic]
password = "letmein"
# Per-IP overrides (highest priority)
[credentials.miners."192.168.1.50"]
username = "custom_user"
password = "custom_pass"
Credential resolution order: per-IP > per-firmware > default.
Note: asic-rs v0.2.x hardcodes credentials in each backend and does not expose a credential injection API. The config is forward-compatible infrastructure -- credentials will be wired automatically once upstream adds support.
Tools (29)
Discovery
| Tool | Description |
|-|-|
| scan_network | Scan a subnet/range for miners. Supports make/firmware filters, configurable timeouts and concurrency. |
| get_miner | Connect to a single miner by IP. Returns device info and supported capabilities. |
| listen_for_miners | Passive UDP discovery (AntMiner port 14235, WhatsMiner port 8888). |
Data Gathering
| Tool | Description |
|-|-|
| get_miner_data | All data in one call (30 fields). |
| get_fleet_data | Concurrent get_miner_data across multiple IPs. |
| get_hashrate | Current hashrate with unit and algorithm. |
| get_expected_hashrate | Expected/nominal hashrate. |
| get_wattage | Current power consumption (watts). |
| get_wattage_limit | Configured power limit. |
| get_hashboards | Per-board temps, hashrate, chip details. |
| get_fans | Fan speeds. |
| get_psu_fans | PSU fan speeds. |
| get_fluid_temperature | Coolant temperature (immersion setups). |
| get_hostname | Network hostname. |
| get_mac | MAC address. |
| get_serial_number | Serial number. |
| get_api_version | Miner API version. |
| get_firmware_version | Firmware version string. |
| get_uptime | System uptime. |
| get_is_mining | Whether the miner is actively hashing. |
| get_light_flashing | Fault light status. |
| get_messages | Miner log messages with severity. |
| get_pools | Current pool configuration. |
Control
Each control tool checks supports_* before executing and returns { "supported": false } if the miner doesn't support the operation.
| Tool | Description |
|-|-|
| restart_miner | Restart the miner. |
| set_fault_light | Turn locate/fault LED on or off. |
| pause_mining | Pause mining (optional delay). |
| resume_mining | Resume mining (optional delay). |
| set_pools | Replace pool configuration (destructive). |
| set_wattage_limit | Set power limit in watts. |
Typical Workflow
scan_network("192.168.1.0/24") -> list of IPs
get_fleet_data([ips]) -> health data for all miners
get_hashboards("192.168.1.10") -> drill into a specific miner
set_fault_light("192.168.1.10", true) -> locate it physically
Supported Hardware
All miners supported by asic-rs: AntMiner, WhatsMiner, AvalonMiner, Bitaxe, NerdAxe, and firmware variants BraiinsOS, VNish, LuxOS, EPic, Marathon, HiveOS.
License
MIT