Mcp Sigrok

io.github.daedalus由 GitHub 账号 daedalus 发布v0.1.0更新于 Nov 3, 2026

MCP server exposing sigrok-cli functionality for logic analyzer hardware and protocol decoding

已验证STDIO仅桌面开发者工具安全与监控

概览

AI 生成的概览

封装 sigrok-cli,让助手操作逻辑分析仪:列出驱动与协议解码器、扫描设备、采集样本并解码协议。

可以做什么
  • 查询 sigrok-cli 版本,列出支持的功能、硬件驱动以及输入/输出文件格式
  • 扫描已连接的设备并查看指定驱动的设备信息
  • 从逻辑分析仪硬件采集样本(含按时长采集),并设置驱动配置
  • 加载并处理采集文件,查看协议解码器文档
适用场景
当你使用逻辑分析仪硬件或 sigrok 采集文件,希望助手在对话中扫描设备、执行采集或解码 I2C 等协议,而不必手动运行 sigrok-cli 时适用。
运行要求
以本地 stdio 进程运行,从 PyPI 安装(pip install mcp-sigrok)。系统中必须已安装 sigrok-cli(apt、brew 或源码编译)。未声明账号、API 密钥或环境变量。
安装前请注意
它会操作真实硬件并写出文件,采集与文件处理会作用于本机与设备。它依赖系统中存在且可信的 sigrok-cli 可执行文件。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Sigrok,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

mcp-sigrok — MCP server for sigrok-cli

[PyPI] [Python]

MCP server that exposes all functionality of sigrok-cli as MCP tools. sigrok-cli is a cross-platform command-line utility for the sigrok software suite, used for hardware initialization, acquisition, protocol decoding, and saving logic analyzer sessions.

Install

bash
pip install mcp-sigrok

Requirements

  • sigrok-cli must be installed on the system

Installing sigrok-cli

Debian/Ubuntu:

bash
sudo apt install sigrok-cli

macOS:

bash
brew install sigrok-cli

From source:

bash
git clone git://sigrok.org/sigrok-clicd sigrok-cli./autogen.sh./configuremakesudo make install

Usage

As MCP Server

bash
# Run as stdio MCP servermcp-sigrok

Or configure in your MCP settings:

json
{  "mcpServers": {    "sigrok": {      "command": "mcp-sigrok"    }  }}

Python API

python
from mcp_sigrok import (    check_sigrok_cli,    get_version,    list_drivers,    scan_devices,    capture_samples,    load_input_file,)
# Check if sigrok-cli is availableif cli_path := check_sigrok_cli():    print(f"Found sigrok-cli at: {cli_path}")
# Get version infoinfo = get_version()
# List available driversdrivers = list_drivers()
# Scan for devicesdevices = scan_devices()
# Capture samplesresult = capture_samples("fx2lafw", samples=1000)

MCP Tools

ToolDescription
versionGet sigrok-cli version info
list_supportedList all supported features
list_hardware_driversList available hardware drivers
list_input_file_formatsList supported input formats
list_output_file_formatsList supported output formats
list_protocol_decodersList available protocol decoders
scan_for_devicesScan for detectable devices
show_device_infoShow device info for a driver
captureCapture samples from hardware
capture_for_timeCapture data for duration
load_fileLoad and process input file
show_decoder_docsShow protocol decoder docs
set_configSet driver configuration

Examples

Capture from logic analyzer

python
# Capture 1000 samples from fx2lafw deviceresult = capture(    driver="fx2lafw",    samples=1000,    channels="0-7",    output_format="hex")

Decode I2C protocol

python
# Load capture file and decode I2Cresult = load_file(    input_file="capture.sr",    protocol_decoders="i2c",    output_file="decoded.txt")

Scan for devices

python
# Find available devicesdevices = scan_for_devices()for device in devices.get("devices", []):    print(f"Found: {device}")

Development

bash
git clone https://github.com/daedalus/mcp-sigrok.gitcd mcp-sigrokpip install -e ".[test]"
# run testspytest
# formatruff format src/ tests/
# lintruff check src/ tests/
# type checkmypy src/

mcp-name: io.github.daedalus/mcp-sigrok

来源:README.md,提交 4c58b69

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分