sigrok MCP Server
v0.2.0Wraps sigrok-cli for signal analysis: capture data, decode protocols, and query instruments.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
capture_data
Capture communication data from a connected device and save to file. Either 'samples' or 'time' must be specified.
| Parameter | Type | Description |
|---|---|---|
driver * | string | Hardware driver ID (e.g. 'fx2lafw', 'demo') |
channels | string | Channels to use (e.g. 'D0,D1,D2') |
config | string | Device configuration (e.g. 'samplerate=1M') |
conn | string | Connection string for serial/network devices (e.g. '/dev/ttyUSB0:serialcomm=115200/8n1') |
output_file | string | Output filename (auto-generated if omitted) |
samples | number | Number of samples to acquire |
time | number | How long to sample in milliseconds |
triggers | string | Trigger configuration (e.g. 'D0=r') |
wait_trigger | boolean | Wait for trigger before capturing |
check_firmware_status
Check firmware file availability in standard sigrok firmware directories. Returns which directories exist and what firmware files are present. Use this to diagnose device detection issues caused by missing firmware.
decode_protocol
Decode protocol data from a captured file using sigrok protocol decoders.
| Parameter | Type | Description |
|---|---|---|
input_file * | string | Input filename |
protocol_decoders * | string | Protocol decoders to apply (e.g. 'uart:baudrate=9600') |
annotations | string | Decoder annotation filter (e.g. 'uart=rx-data') |
input_format | string | Input format (e.g. 'vcd', 'binary') |
json_trace | boolean | Output in Google Trace Event JSON format |
meta_output | string | Decoder meta output filter (e.g. 'uart=baud') |
show_sample_numbers | boolean | Include sample numbers in output |
get_device_profile
Look up a device profile by name, model, manufacturer, or *IDN? response string. Returns connection settings (baudrate, parity, etc.), supported commands with examples, and device-specific notes. Use this before serial_query to get the correct settings for a device.
| Parameter | Type | Description |
|---|---|---|
query * | string | Device name, model, manufacturer, or *IDN? response string to match against |
list_input_formats
List all supported input file formats. Returns an array of {id, description} objects.
list_output_formats
List all supported output file formats. Returns an array of {id, description} objects.
list_supported_decoders
List all supported protocol decoders. Returns an array of {id, description} objects.
list_supported_hardware
List all supported hardware drivers. Returns an array of {id, description} objects.
scan_devices
Scan for connected hardware devices. Returns {devices, warnings, hint} where devices is an array of {driver, description} objects. Warnings indicate firmware-related issues for devices that could not be initialized. When driver and conn are provided, performs a targeted scan for a specific serial/network device (e.g. SCPI instruments). SCPI driver categories: 'scpi-dmm' (multimeters), 'scpi-pps' (power supplies), or vendor-specific drivers like 'rigol-ds' (oscilloscopes). Example: driver='scpi-dmm', conn='/dev/ttyUSB0:serialcomm=115200/8n1'.
| Parameter | Type | Description |
|---|---|---|
conn | string | Connection string for targeted scanning (e.g. '/dev/ttyUSB0:serialcomm=115200/8n1', 'tcp-raw/192.168.1.100/5555') |
driver | string | Hardware driver ID for targeted scanning (e.g. 'scpi-dmm', 'scpi-pps', 'rigol-ds') |
serial_query
Send a command string over a serial port and return the device response. Works with any serial-attached instrument that accepts text commands (e.g. SCPI). Independent of sigrok-cli.
| Parameter | Type | Description |
|---|---|---|
command * | string | Command to send (e.g. '*IDN?', 'MEAS:VOLT:DC?') |
port * | string | Serial device path (e.g. '/dev/ttyUSB0') |
baudrate | number | Baud rate (default 9600) |
databits | number | Data bits: 5, 6, 7, or 8 (default 8) |
parity | string | Parity: none, odd, even, mark, space (default 'none') |
stopbits | string | Stop bits: 1, 1.5, 2 (default '1') |
timeout_ms | number | Read timeout in milliseconds (default 1000) |
show_decoder_details
Show detailed information about a specific protocol decoder, including options, channels, annotation classes, and documentation.
| Parameter | Type | Description |
|---|---|---|
decoder * | string | Protocol decoder ID (e.g. 'uart', 'spi', 'i2c') |
show_driver_details
Show detailed information about a specific hardware driver, including supported functions, scan options, and connected devices.
| Parameter | Type | Description |
|---|---|---|
driver * | string | Hardware driver ID (e.g. 'demo', 'fx2lafw', 'rigol-ds') |
show_version
Show sigrok-cli version information, including library versions.