Skip to main content
Glama
Rigol DS1202Z-E MCP

Rigol DS1202Z-E MCP

by billwestrup

Rigol DS1202Z-E MCP

Ask an AI for a measurement without making it manage SCPI commands, transfer formats or instrument sequencing. This Linux MCP server gives the Rigol DS1202Z-E a compact default interface and discoverable advanced operations.

AI client -- SSH / Wi-Fi -- Linux instrument host -- USB -- DS1202Z-E

Version 0.5.1. The 0.5.0 baseline was physically tested on one DS1202Z-E running firmware 00.06.03.SP2. Version 0.5.1 adds software-verified corrective changes; it has not been deployed to or requalified on hardware. Other models and firmware are not qualified. Independent community software; no vendor affiliation.

What it does

  • Inspect enabled channels with units, unavailable readings and acquisition context.

  • Configure channels/edge triggers and acquire screenshots or full waveform memory.

  • Capture single events, save supported setups and restore with readback checks.

  • Configure scope serial decoders, or capture/decode supported UART, I2C and SPI formats on the host and restore the prior core setup.

  • Analyze saved waveforms with FFT and retrieve bounded samples/events on demand.

Ten top-level tools stay fixed. Start with inspect_signal(); use discover_operations(query="capture decode") for advanced tasks and request the selected operation's schema before calling it. No arbitrary SCPI endpoint exists.

Related MCP server: pyMSO5000 MCP Server

Quick start without hardware

Linux and Python 3.12+ are required. A virtual environment keeps system Python intact.

python3 -m venv .venv
.venv/bin/python -m pip install --require-hashes -r requirements.lock
.venv/bin/python -m pip install --no-deps -e .
.venv/bin/rigol-mcp --simulate --identify
.venv/bin/python -m pytest -q

The lock includes development/test dependencies. Build tools may need separate installation. Start .venv/bin/rigol-mcp --simulate --allow-control from an MCP client to exercise simulated operations; it speaks stdio, not a terminal prompt. Simulation does not verify physical hardware or calibration.

Connect a real scope

Follow host and SSH setup. Use rigol-mcp --list-usb to discover the actual VISA address, then pass --resource or set RIGOL_RESOURCE. Controls require --allow-control. Physical probe ratio must match configuration. Review wiring and operation prerequisites before changing acquisition/settings.

Documentation

Historical validation: 193 automated tests and 12 live host-decode/restore runs. Those counts describe 0.5.0; see the validation guide for the corrective release. This is functional evidence, not calibration or compliance certification. Private raw captures and machine configuration are excluded; the validation summary states tested conditions and gaps. Source catalog evidence paths refer to those historical private records; they are provenance labels, not downloadable public artifacts.

Completed artifacts persist on the host, subject to retention. Active operations are synchronous: continuing through SSH loss and durable background jobs are planned, not implemented. Ordinary setting changes do not automatically roll back.

Version 0.5.1 rejects legacy artifacts without metadata checksums: archive important evidence, complete any old-version restoration before upgrading, and take new snapshots after checking the actual state. No automatic migration is performed. The decode planner now caps legal dual-channel allocations at 600,000 points; impossible rounded window/rate combinations fail before instrument access.

License and dependencies

Project code is covered by MIT. Dependencies retain their own licenses and are installed separately. No vendor firmware, manuals, private flash backups, credentials or captured user data are distributed.

References: Rigol programming guide, MCP Python SDK, PyVISA-py.

Available Tools

10 tools
acquisitionA

Start, stop, or arm a single acquisition. Requires --allow-control.

Run/single may replace an existing captured waveform. Single returns before triggering.

Inputs: action (required). Returns: object

advanced_controlA
Destructive

Execute a discovered control or full-memory capture, requiring --allow-control.

Validates before writing; returns actual settings and any partial failure. Changes may invalidate a retained capture. Inspect readback before retrying. Settings changes do not generally roll back; decode.capture explicitly restores the previous core setup. Full-memory capture performs its documented transfer/acquisition cleanup.

Inputs: arguments (required), operation (required).

advanced_readA
Read-only

Execute a discovered read operation. Exact parameters come from discover_operations.

Screenshots return a saved artifact receipt; artifact.image explicitly retrieves the image. Cannot change acquisition or channel/trigger settings.

Inputs: operation (required), arguments.

discover_operationsA
Read-only

Find advanced capabilities by task. Supply an operation ID to get its exact schema and effects.

No instrument access. Planned entries cannot execute; search results stay compact.

Inputs: query, operation. Returns: object

identifyA
Read-only

Read model, serial, firmware, and whether this is a simulator.

Inputs: no named parameters. Returns: object

inspect_signalA
Read-only

Start here: inspect all enabled channels, or one channel, in one call.

Returns acquisition freshness, frequency/amplitude readings with units, probe ratios, unavailable readings and concrete next actions. No setup, identify, or status call needed. Does not change acquisition or settings. Null readings are not proof of no signal.

Inputs: channel. Returns: object

measureB
Read-only

Read a built-in measurement. Invalid/no-signal readings return null with valid=false.

Inputs: channel (required), measurement (required). Returns: object

set_timebaseA

Change horizontal scale in YT mode and read back the actual setting.

Requires --allow-control. Scope may round to a supported 1-2-5 scale.

Inputs: seconds_per_division (required). Returns: object

statusA
Read-only

Read acquisition status, timebase, channel scales, units, and probe ratios.

Inputs: no named parameters. Returns: object

waveformA

Read a compact screen-waveform summary from a STOPPED scope.

Set include_samples=true only when the individual time/amplitude arrays are needed. Changes waveform transfer source/format/range; does not stop or restart acquisition. Leaves transfer settings at BYTE/NORMAL. Not a full-memory capture.

Inputs: channel (required), include_samples. Returns: object

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 10 tools

    Disambiguation4/5

    Core read tools are mostly distinct, but inspect_signal deliberately overlaps status and measure by bundling acquisition freshness, probe ratios, and frequency/amplitude readings. The advanced_read/advanced_control pair is a generic extension surface that can also shadow core operations, though descriptions clarify intended use.

    Naming Consistency3/5

    All names use snake_case, but the set mixes noun names (status, waveform, acquisition), bare verbs (identify, measure), verb_noun (set_timebase, inspect_signal, discover_operations), and adjective_noun (advanced_read, advanced_control). It remains readable, but there is no single predictable pattern.

    Tool Count5/5

    Ten tools is appropriate for an oscilloscope MCP: core identification, status, timebase, acquisition, measurement, and waveform tools plus a compact discovery/advanced escape hatch. The count is well-scoped with no obvious bloat.

    Completeness4/5

    The surface covers identity, status, timebase, acquisition lifecycle, built-in measurement, waveform summary, and advanced read/control via discovery. Direct vertical-channel and trigger configuration plus explicit screenshot/save operations are not first-class tools, but advanced_control and advanced_read are intended to fill those gaps.

    Related MCP Connectors

    Related MCP Servers

    • 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.
      27 PyPI
      7
      MIT
    • 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.
      8
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables LLMs to control RIGOL oscilloscopes over SCPI via LAN or USB, including configuring channels/timebase/trigger, taking measurements, capturing waveforms and screenshots, decoding serial protocols, running FFT analysis, and controlling the built-in AFG.
      64
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables MCP clients to discover tools, configure a Rigol oscilloscope over LAN, take measurements, and retrieve waveform captures via a containerized stdio server.
      21
      1
      MIT