Sigrok Mcp Server

Created By
KenosInc3 months ago
A Model Context Protocol (MCP) server for sigrok — enables AI agents like Claude Code, Codex, and Cursor to capture, decode, and analyze signals from logic analyzers and measurement devices. Supports I2C, SPI, UART, CAN, and 100+ protocols via sigrok-cli.
Overview

sigrok-mcp-server

CI Go Version License: MIT GitHub Release

A Model Context Protocol (MCP) server for sigrok — enables AI agents like Claude Code, Codex, and Cursor to capture, decode, and analyze signals from logic analyzers and measurement devices. Supports I2C, SPI, UART, CAN, and 100+ protocols via sigrok-cli.

Documentation | Getting Started

Tools

ToolDescription
list_supported_hardwareList all supported hardware drivers
list_supported_decodersList all supported protocol decoders
list_input_formatsList all supported input file formats
list_output_formatsList all supported output file formats
show_decoder_detailsShow detailed info about a protocol decoder (options, channels, documentation)
show_driver_detailsShow detailed info about a hardware driver (functions, scan options, devices)
show_versionShow sigrok-cli and library version information
scan_devicesScan for connected hardware devices
capture_dataCapture communication data from a device and save to file
decode_protocolDecode protocol data from a captured file using protocol decoders
check_firmware_statusCheck firmware file availability in sigrok firmware directories

Quickstart

Docker

docker pull ghcr.io/kenosinc/sigrok-mcp-server
docker run -i ghcr.io/kenosinc/sigrok-mcp-server

From source

Requires Go 1.25+ and sigrok-cli installed on your system.

go build -o sigrok-mcp-server ./cmd/sigrok-mcp-server
./sigrok-mcp-server

The server communicates over stdio (stdin/stdout JSON-RPC).

Configuration

Configuration is via environment variables:

VariableDefaultDescription
SIGROK_CLI_PATHsigrok-cliPath to the sigrok-cli binary
SIGROK_TIMEOUT_SECONDS30Command execution timeout in seconds
SIGROK_WORKING_DIR(empty)Working directory for sigrok-cli execution

MCP Client Configuration

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "sigrok": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "ghcr.io/kenosinc/sigrok-mcp-server"]
    }
  }
}

To access USB devices from the container:

{
  "mcpServers": {
    "sigrok": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "--privileged", "ghcr.io/kenosinc/sigrok-mcp-server"]
    }
  }
}

To also provide firmware files for devices that require them (e.g. Kingst LA2016):

{
  "mcpServers": {
    "sigrok": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm", "--privileged",
        "-v", "/path/to/sigrok-firmware:/usr/local/share/sigrok-firmware:ro",
        "ghcr.io/kenosinc/sigrok-mcp-server"
      ]
    }
  }
}

Claude Code

claude mcp add sigrok -- docker run -i --rm ghcr.io/kenosinc/sigrok-mcp-server

With USB access and firmware:

claude mcp add sigrok -- docker run -i --rm --privileged -v /path/to/sigrok-firmware:/usr/local/share/sigrok-firmware:ro ghcr.io/kenosinc/sigrok-mcp-server

Firmware

Some hardware drivers require firmware files that cannot be bundled with this server due to licensing restrictions. The server works without firmware for devices that don't need it (e.g. demo, protocol-only analysis). For devices that require firmware (e.g. Kingst LA2016, Saleae Logic16), mount your firmware directory into the container at /usr/local/share/sigrok-firmware.

Use the check_firmware_status tool to verify firmware availability and diagnose device detection issues.

See the sigrok wiki for firmware extraction instructions for your device.

Architecture

MCP Client (LLM)
    |  stdio (JSON-RPC)
    v
sigrok-mcp-server (Go)
    |  exec.Command
    v
sigrok-cli
    |
    v
libsigrok / libsigrokdecode
  • Transport: stdio (stdin/stdout JSON-RPC)
  • No C bindings: sigrok-cli is the sole interface to sigrok
  • Capture & decode: capture_data acquires data from devices; all other tools are read-only queries
  • Structured output: Raw sigrok-cli text output is parsed into JSON

Workflow Example

A typical signal analysis workflow using Claude:

  1. scan_devices — Discover connected hardware
  2. show_driver_details — Check driver capabilities
  3. capture_data — Capture communication data to file
  4. decode_protocol — Decode captured data with protocol decoders
  5. Claude analyzes the decoded output and explains the communication

Development

# Build
go build ./...

# Test
go test ./... -race

# Lint
golangci-lint run ./...

Project Structure

cmd/sigrok-mcp-server/     Entry point
internal/
  config/                  Environment-based configuration
  sigrok/
    executor.go            sigrok-cli command execution with timeout
    parser.go              Output parsing (list, decoder, driver, version, scan)
    testdata/              Real sigrok-cli output fixtures
  tools/
    tools.go               MCP tool definitions and registration
    handlers.go            Tool handler implementations

License

MIT (Kenos, Inc.)

Server Config

{
  "mcpServers": {
    "sigrok": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--privileged",
        "ghcr.io/kenosinc/sigrok-mcp-server"
      ]
    }
  }
}
Project Info
Created At
3 months ago
Updated At
3 months ago
Author Name
KenosInc
Star
-
Language
-
License
-
Category

Recommend Servers

View All
Demand Chain - AI Agent native demand matching platform
@文明天梯

让你的Agent来跟全世界对接需求,你的AI助理帮你把需求传达出去,又帮你接受别人给你的需求。 需求链平台是将整个人类联结在一起的一个工具,组成一个网络。 告诉你的AI助理,你的需求,Agent会在需求链平台上寻找到能解决你需求的人。 别人也会将他的需求传达给你,你接受你能处理的需求,你也可以将这个需求拆分,变成数个小的需求,继续放在需求链上传递下去。 比如说你想要一种技术的创新,一个人工智能的新算法,或者是需要一种新材料,想要一种新的解决方案,去解决工作生活中的真实痛点。 你或许有一个天才的想法,需要有人与你一起去验证是否可行。 或者你已经有一套成功的技术,需要让全世界都知道你的方案。 总之每个人都有各种需求需要解决,而需求链平台,就是帮你解决各种需求而存在的机制。 赶快打开你的Agent,告诉他,你的需求吧。 此需求链平台是地球人类共有的基础设施,永久开源,中立,免费。 Let your Agent connect with demands from across the globe. Your AI assistant will forward your requests and receive demands from others for you. The Demand Chain Platform is a tool that unites all humanity into a connected network. Simply tell your AI assistant what you need, and your Agent will find people on the platform who can address your requirements. Others will also send their demands to you. You may take on tasks you are capable of handling, or split a single demand into several smaller ones to keep them circulating on the Demand Chain. For instance, you may seek technological innovation, a new AI algorithm, advanced new materials, or practical solutions to real problems in work and daily life. You might have a brilliant idea and need partners to verify its feasibility. Or you possess proven technologies and wish to share your solutions with the whole world. Everyone has various needs to fulfill, and the Demand Chain Platform is built precisely for this purpose. Launch your Agent and submit your demands right away. As a shared infrastructure for all people on Earth, this Demand Chain Platform is permanently open-source, neutral and free of charge.

a day ago
Sellerguide

11 hours ago
Sellerguide

11 hours ago