Skip to main content
Glama

rigol-remote

Control a Rigol DS1054Z oscilloscope on USB, from Claude Code sessions (MCP server) and from people and scripts (the rigol CLI). Linux only: it drives the kernel usbtmc driver directly, working around the scope's USB firmware bugs.

Setup

uv sync
# once, as root: let the plugdev group open the scope
echo 'KERNEL=="usbtmc[0-9]*", ATTRS{idVendor}=="1ab1", GROUP="plugdev", MODE="0660"' | sudo tee /etc/udev/rules.d/99-rigol.rules
sudo udevadm control --reload && sudo udevadm trigger --subsystem-match=usbmisc
# make the tools available to every Claude Code session on this machine
claude mcp add --scope user rigol -- "$PWD/.venv/bin/rigol-mcp"

Related MCP server: Rigol DHO824 MCP Server

CLI

Numbers take SI suffixes (500m, 20ns, 2.5V). Changes print each setting's requested, before and after values. The scope snaps to the steps it supports, so "after" is what you got.

# reading
uv run rigol idn
uv run rigol screenshot                  # prints the PNG's path
uv run rigol settings                    # channels, timebase, trigger, acquisition (JSON)
uv run rigol measure 1 VPP FREQ VRMS     # null = the scope couldn't measure it
uv run rigol waveform 1                  # on-screen trace → CSV, plus summary stats
uv run rigol query ':TRIGger:STATus?'    # any single read-only SCPI query
uv run rigol save-setup                  # whole setup → file

# changing (only the options given)
uv run rigol channel 2 --on --scale 500m --coupling AC --probe 10x
uv run rigol timebase --scale 20ns --offset 0
uv run rigol trigger --source 1 --slope rising --level 1.5 --sweep normal
uv run rigol acquisition --type averages --averages 16 --memory-depth 12k
uv run rigol run | stop | force
uv run rigol single --timeout 5          # arm, and wait up to 5 s for the capture

# whole-setup changes: each saves a backup first and prints its path
uv run rigol restore-setup FILE
uv run rigol autoscale --yes
uv run rigol reset --yes
uv run rigol write ':CHANnel1:VERNier ON'
uv run rigol clear-measurements [--item N]

Captures and backups go to ~/.local/share/rigol-remote/captures/ (override with RIGOL_CAPTURE_DIR). The scope is found automatically; set RIGOL_ADDR=/dev/usbtmcN to pick one explicitly. Concurrent users (sessions, scripts) take turns via a lock on the device.

MCP tools

Tier

Tools

Read-only

identify, screenshot (returns the image), get_settings, get_waveform, scpi_query, save_setup

Changes (undoable: pass the returned before-values back)

measure (adds items to the scope's measurement bar), configure_channel, configure_timebase, configure_trigger, configure_acquisition

Destructive

run_control, clear_measurements, restore_setup, autoscale, reset, scpi_write (the last four back up the setup first)

The tools carry MCP read-only/destructive hints. In Claude Code you can allow the read-only ones without prompting, e.g. "mcp__rigol__screenshot" in permissions.allow, and keep the rest behind approval.

Tests

uv run pytest                    # unit tests, no scope needed
uv run pytest -m hardware        # read-only tests against the real scope
uv run pytest -m hardware_write  # changes settings on the scope, then restores the saved setup

Available Tools

17 tools
autoscaleA
Destructive

Let the scope choose scales, timebase and trigger for the connected signals, like the AUTO key. It replaces the user's setup, so it is backed up first. Returns the backup path and the new settings.

Inputs: no named parameters.

clear_measurementsA
Destructive

Remove one item (1-5, left to right) or, by default, all items from the measurement bar at the bottom of the scope's screen. That includes items the user added.

Inputs: item.

configure_acquisitionA
Idempotent

Change how the scope acquires; only the parameters given are changed. averages (a power of two, 2-1024) applies in AVERAGES mode. Valid memory depths depend on how many channels are on (1 channel: 12000 to 24000000; 2: 6000 to 12000000; 3-4: 3000 to 6000000). Returns requested/before/after.

Inputs: averages, memory_depth, acquisition_type.

configure_channelA
Idempotent

Change one channel's settings; only the parameters given are changed. channel: 1-4 or CHAN1-CHAN4. probe_ratio must match the probe's attenuation switch (1, 10, ...); it rescales the V/div. Returns requested/before/after for each setting.

Inputs: channel (required), invert, display, bw_limit, +4 more.

configure_timebaseB
Idempotent

Change the horizontal settings; only the parameters given are changed. offset_s moves the trigger point. Returns requested/before/after for each setting.

Inputs: mode, offset_s, scale_s_per_div.

configure_triggerA
Idempotent

Change the edge-trigger settings; only the parameters given are changed. source: 1-4, CHAN1-CHAN4 or AC (mains). Giving source, slope or level switches the trigger to EDGE mode. sweep AUTO free-runs without a trigger, NORMAL waits for one. Returns requested/before/after.

Inputs: slope, sweep, source, level_v, +2 more.

get_settingsA
Read-onlyIdempotent

Channel (on/off, V/div, offset, coupling, probe ratio), timebase, trigger and acquisition settings. Values are SI: volts, seconds, samples per second.

Inputs: no named parameters.

get_waveformA
Read-onlyIdempotent

Read one channel's on-screen trace (1200 points), save it as CSV (time_s,volts) and return summary statistics plus the CSV path. clipped: true means the trace ran off screen, so its extremes are unreliable. channel: 1-4 or CHAN1-CHAN4.

Inputs: channel (required).

identifyA
Read-onlyIdempotent

Manufacturer, model, serial number and firmware of the attached scope.

Inputs: no named parameters.

measureA
Idempotent

The scope's automatic measurements on one channel. channel: 1-4 or CHAN1-CHAN4. items: any of FREQ, FTIM, MAR, MPAR, NDUT, NEDG, NPUL, NSLEW, NWID, OVER, PDUT, PEDG, PER, PPUL, PRES, PSLEW, PVRMS, PWID, RTIM, TVMAX, TVMIN, VAMP, VARI, VAVG, VBAS, VLOW, VMAX, VMID, VMIN, VPP, VRMS, VTOP, VUP (long forms like FREQuency also accepted). A value of null means the scope could not measure it. Side effect: each item is added to the measurement bar on the scope's screen (it shows at most 5, so older ones scroll off).

Inputs: items (required), channel (required).

resetA
Destructive

Reset the scope to factory defaults (*RST). The setup is backed up first. Returns the backup path and the new settings.

Inputs: no named parameters.

restore_setupA
Destructive

Restore a whole setup saved by save_setup (or a backup from another tool). The current setup is backed up first. Takes about 6 s. Returns the backup path and the resulting settings.

Inputs: path (required).

run_controlA
Destructive

Start (run) or freeze (stop) acquisition, arm one acquisition (single), or force a trigger. run and single overwrite a stopped capture. For single, wait_s waits up to that long for it to complete. Returns the trigger status (RUN, WAIT, TD, AUTO or STOP) and sweep mode.

Inputs: action (required), wait_s.

save_setupA
Read-onlyIdempotent

Save the scope's whole setup to a file and return its path; restore_setup(path) brings it back.

Inputs: no named parameters.

scpi_queryA
Read-onlyIdempotent

Send one read-only SCPI query (its header must end in '?', e.g. ':TRIGger:STATus?' or ':CHANnel1:SCALe?') and return the reply. Commands that change settings are refused.

Inputs: command (required). Returns: result

scpi_writeA
Destructive

Send one raw SCPI command that expects no reply, for anything the other tools don't cover (e.g. ':CHANnel1:VERNier ON'). Use scpi_query for queries. The setup is backed up first. Fails if the scope reports an error.

Inputs: command (required).

screenshotA
Read-onlyIdempotent

Capture the scope's screen (800x480 PNG). Also saved to disk; the path is returned.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 17 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes (screenshot, identify, measure, get_waveform, the configure_* family). The only notable overlap is the generic scpi_query/scpi_write pair against the dedicated configure/get tools, but the descriptions explicitly frame them as escape hatches for uncovered functionality, which mitigates confusion.

    Naming Consistency4/5

    The set follows a mostly verb/verb_noun imperative pattern (get_settings, save_setup, restore_setup, configure_channel, clear_measurements, run_control) with readable single-word verbs (identify, measure, autoscale, reset). Minor deviations like the noun 'screenshot' and the prefix-ordered scpi_query/scpi_write keep it from being perfectly uniform.

    Tool Count4/5

    17 tools is slightly above the ideal 3-15 range but each one maps to a genuine, non-redundant oscilloscope capability (acquisition, trigger, channels, measurements, waveform, setup lifecycle). Nothing feels padded for a full instrument-control surface.

    Completeness4/5

    The surface covers the core lifecycle well: identity, settings/waveform/measurement reads, channel/timebase/trigger/acquisition configuration, run control, setup backup/restore, autoscale and reset. Gaps like math/FFT, cursors, or non-edge trigger modes are real but workable through the scpi_write escape hatch and setup backup protection.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      C
      maintenance
      Enables LLMs like Claude to interact with PicoScope oscilloscopes for signal acquisition, measurement, and analysis. Supports device management, data capture, triggering, and signal generation through natural language commands.
      24
      8
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables control and querying of Rigol DHO824 oscilloscopes, allowing users to capture waveforms, take screenshots, and interact with oscilloscope settings through natural language.
      62 PyPI
      7
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Control an OWON VDS1022/VDS1022i USB oscilloscope from Claude: configure channels, capture waveforms with images, measure signals, export data, and decode serial protocols.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to control Rigol MSO5000 oscilloscopes through VISA, including acquisition, channels, trigger, timebase, waveform generator, display, and front-panel controls, with risk-based permission gating for direct SCPI operations.
      4
      MIT