rigol-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@rigol-mcp Take a screenshot of the scope and tell me what's on CH1 and CH2."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
rigol-mcp
An MCP server that lets AI agents (Claude Code, Claude Desktop, Cursor, and other MCP clients) read and control a Rigol DS1000Z oscilloscope over the network.
Ask your agent things like "take a screenshot of the scope and tell me what's on CH1" or "what's the ripple on CH2?". It reads measurements, downloads waveforms, captures the screen, and changes settings when you ask.
No drivers. Talks SCPI over the scope's raw TCP socket (port 5555). No VISA, no NI software.
Two ways to run. Locally over stdio for one agent, or in Docker over HTTP as a shared bridge for several agents and machines.
Screenshot history. Every screenshot and waveform is saved with a UTC timestamp. The last N are kept, and a web gallery shows them.
Careful by default. Settings change only through one explicit tool. Reset is blocked, and a read-only mode is available.

Claude Code asked to "take a screenshot of the scope and tell me what's on CH1 and CH2". It reads the screen and the measurements, then explains the event: a 24 V signal switching off, and a logic signal responding 5.86 ms later.
Things to ask
"Take a screenshot of the scope and tell me what's on each channel."
"What's the frequency and duty cycle on CH1?"
"Measure the delay between the CH2 falling edge and the CH1 rising edge."
"Download CH1 and check how much noise is on the high level."
"Show me the screenshot from 10 minutes ago and compare it with the scope now."
"Set CH1 to 1 V/div and arm a single trigger on CH2's rising edge." (changes settings)
Tested on a DS1104Z (firmware 00.04.04.SP3). Other DS1000Z and MSO1000Z models (DS1054Z, DS1074Z, DS1102Z-E, MSO1104Z and so on) use the same command set and should work. Reports welcome.
Contents
Related MCP server: rigol-oscilloscope-mcp
Tools
Tool | What it does | Touches the scope |
| Model, trigger, timebase, and per channel: V/div, offset, coupling, Vpp, Vavg, Vrms, frequency | reads |
| Any of the 20 built-in measurements on one channel (rise time, duty cycle, ...) | reads |
| The 1200 on-screen samples: stats, clipping warning, optional full CSV | reads |
| Captures the display as a PNG (the agent sees the image) and saves it | reads |
| Lists saved screenshots, newest first | no |
| Returns a saved screenshot ( | no |
| Lists saved waveform CSVs | no |
| Any read-only SCPI query (must end in | reads |
| Changes a setting (V/div, timebase, trigger, run/stop, ...) | writes |
Invalid measurements (the scope's 9.9E37 or measure error!, e.g. the frequency of a DC
signal) come back as null instead of a misleading number.
Before you start
Connect the scope to your network and note its IP address: Utility > IO Setting > LAN Conf.
Check that your machine can reach it:
echo '*IDN?' | nc -w 3 192.168.1.50 5555You should see something like
RIGOL TECHNOLOGIES,DS1104Z,DS1ZA...,00.04.04.SP3.Install uv for the local option, or Docker for the bridge.
Replace 192.168.1.50 with your scope's address everywhere below.
Option 1: Local (stdio)
Best for one person and one agent on a machine that can reach the scope. Your MCP client starts the server as a subprocess, so nothing listens on the network.
Claude Code
claude mcp add --scope user rigol -e RIGOL_HOST=192.168.1.50 -- \
uvx --from git+https://github.com/lfhohmann/rigol-mcp rigol-mcpClaude Desktop, Cursor, and other clients: add this to the client's MCP config
(for Claude Desktop, claude_desktop_config.json):
{
"mcpServers": {
"rigol": {
"command": "uvx",
"args": ["--from", "git+https://github.com/lfhohmann/rigol-mcp", "rigol-mcp"],
"env": { "RIGOL_HOST": "192.168.1.50" }
}
}
}Screenshots and waveforms are saved in ~/.local/share/rigol-mcp/ (set RIGOL_DATA_DIR to
change it). There is no gallery page in this mode, but the files are there to browse.
The scope handles only one network client well. Every agent session in stdio mode starts its own server process, so with several agents at once, use the Docker bridge instead.
Option 2: Docker (HTTP bridge)
Best when several agents or machines share one scope. The container is the scope's only client and takes turns for everyone. It serves MCP over HTTP with a token and hosts the screenshot gallery.
Claude Code (laptop) ─┐
Claude Code (server) ─┼─ HTTP + token ──► rigol-mcp container ── SCPI :5555 ──► scope
other MCP clients ────┘ :8790/mcp (gallery, history)The prebuilt image ghcr.io/lfhohmann/rigol-mcp runs on amd64 and arm64 (including the
Raspberry Pi 4 and 5). You don't need to clone the repo.
Make a folder with the compose file and the settings template:
mkdir rigol-mcp && cd rigol-mcp curl -fsSLO https://raw.githubusercontent.com/lfhohmann/rigol-mcp/main/compose.yaml curl -fsSL https://raw.githubusercontent.com/lfhohmann/rigol-mcp/main/.env.example -o .envEdit
.env: setRIGOL_HOST, a token (openssl rand -hex 24), andRIGOL_PUBLIC_URL(how clients reach this machine, e.g.http://192.168.1.10:8790). SetUIDandGIDto the output ofid -uandid -gso the saved files belong to you.Create the data folder and start the container:
mkdir -p data docker compose up -dTo update later, run
docker compose pull && docker compose up -d. To build from source instead, clone the repo and rundocker compose -f compose.yaml -f compose.build.yaml up -d --build.Check that it's up (no token needed):
curl http://localhost:8790/healthConnect each client. For Claude Code:
claude mcp add --scope user --transport http rigol http://192.168.1.10:8790/mcp \ --header "Authorization: Bearer <your-token>"Other clients that support streamable HTTP use the same URL and header.
Screenshots and waveforms are written to ./data/screenshots and ./data/waveforms on the host.
The container restarts automatically (restart: unless-stopped).
Option 3: HTTP without Docker
Same as the bridge, but run directly with uv:
RIGOL_HOST=192.168.1.50 RIGOL_MCP_TOKEN=<your-token> RIGOL_PUBLIC_URL=http://192.168.1.10:8790 \
uvx --from git+https://github.com/lfhohmann/rigol-mcp rigol-mcp --http --port 8790Screenshot history and gallery
Every
scope_screenshotcall saves a PNG named with its UTC time, e.g.screenshot_20261124T173058.934Z.png. The lastRIGOL_KEEP_SCREENSHOTS(default 100) are kept and older ones are deleted. Waveforms work the same way (RIGOL_KEEP_WAVEFORMS).Agents can look back without touching the scope:
scope_screenshot_historylists them andscope_screenshot_getreturns one (latestby default).In HTTP mode, open the gallery in a browser:
http://192.168.1.10:8790/screenshots?token=<your-token>
The token in the URL is stored as a cookie, so later visits to
/screenshotswork without it. Single files are at/screenshots/<file name>and/waveforms/<file name>, and/screenshots/latestalways gives the newest screenshot.
Configuration
All settings are environment variables. In Docker they go in .env.
Variable | Default | Meaning |
| (required) | Scope IP address or host name (or pass |
|
| Scope SCPI port |
|
| Seconds to wait for the scope |
|
| Where captures are saved |
|
| Screenshots to keep; |
|
| Waveform CSVs to keep; |
| off |
|
|
|
|
|
| HTTP bind address (or |
|
| HTTP port (or |
| (required for HTTP) | Token clients must send |
| off |
|
| none | Base URL used in links to screenshots and the gallery |
|
| Docker only: port published on the host |
Security
Writes are explicit. Only
scope_writechanges settings, and its description tells agents to use it only when you ask.*RSTis blocked.RIGOL_READ_ONLY=1turns writes off completely. Real circuits may be connected to the probes, so keep it that way.HTTP mode needs a token. It's checked in constant time on every request except
/health.The traffic is plain HTTP. On an untrusted network, put the server behind a VPN (WireGuard, NetBird, Tailscale) or an HTTPS reverse proxy such as Caddy or Traefik.
The scope itself has no authentication. Anyone who can reach port 5555 can control it. Keep it on a network you trust.
Troubleshooting
Symptom | Cause and fix |
| Wrong IP, or the scope's LAN is off. Check Utility > IO Setting, then run the |
Works, then hangs or times out | Another program (the scope's web page, UltraScope, a second server) is connected. Use one client at a time. |
A measurement is | The scope can't measure it: no edges, or the signal is off screen. Look at the screenshot. |
| The trace goes off screen, so min, max and Vpp are wrong. Change V/div or offset. |
HTTP clients get 401 | Missing or wrong |
Files in | Create |
Need a command the tools don't cover? scope_query and scope_write accept any SCPI command
from Rigol's MSO1000Z/DS1000Z Programming Guide (on Rigol's website).
docs/direct-scpi.md shows how to talk to the scope without this server.
Development
git clone https://github.com/lfhohmann/rigol-mcp.git
cd rigol-mcp
uv sync
uv run pytestThe tests use a fake scope (tests/fake_scope.py), so no hardware is needed. To try your changes
against a real scope:
RIGOL_HOST=192.168.1.50 uv run rigol-mcp # stdio
RIGOL_HOST=192.168.1.50 RIGOL_MCP_TOKEN=dev uv run rigol-mcp --httpLicense
Available Tools
9 toolsscope_measureA
Run the scope's built-in measurements on one channel (1-4). items: any of VMAX VMIN VPP VTOP VBASE VAMP VAVG VRMS OVER PRES MAR MPAR PER FREQ RTIM FTIM PWID NWID PDUT NDUT. Default: a common set. Times are in seconds, duty cycles are fractions (0.25 = 25%). Invalid results are null.
Inputs: channel (required), items.
scope_queryA
Send a read-only SCPI query (must end with '?') and return the reply, e.g. ':CHAN1:BWL?', ':ACQ:MDEP?', ':TRIG:EDG:SLOP?'.
Inputs: command (required). Returns: result
scope_screenshotA
Capture the scope's display as a PNG. Every screenshot is saved with a UTC timestamp (the last RIGOL_KEEP_SCREENSHOTS are kept); see scope_screenshot_history.
Inputs: no named parameters.
scope_screenshot_getA
Return a saved screenshot without touching the scope. id is 'latest' (default) or an id from scope_screenshot_history.
Inputs: id.
scope_screenshot_historyA
List saved screenshots, newest first (id, UTC timestamp, size, and URL when served over HTTP). Does not touch the scope. Use scope_screenshot_get to view one.
Inputs: limit.
scope_statusA
Overview of the scope: model, trigger, timebase, sample rate, and for each channel whether it is on, its V/div, offset, coupling, probe ratio, plus Vpp, Vavg, Vrms and frequency. Invalid measurements are null. Start here.
Inputs: no named parameters.
scope_waveformA
Download the on-screen waveform of one channel (1200 samples) and return summary stats plus up to max_points evenly spaced [time_s, volts] samples (0 = stats only, 1200 = every sample). include_csv=True also returns every sample as CSV text (~30 KB). Each download is saved with a timestamp; see scope_waveform_history.
Inputs: channel (required), max_points, include_csv.
scope_waveform_historyB
List saved waveform CSVs, newest first, with channel and UTC timestamp.
Inputs: limit.
scope_writeA
Change a scope setting with a SCPI command, e.g. ':CHAN1:SCAL 1', ':TIM:SCAL 0.001', ':RUN', ':STOP', ':SING', ':AUT'. ONLY use when the user asked to change the scope: real circuits may be connected. Returns the scope's error queue ('0,"No error"').
Inputs: command (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Status, measure, waveform, screenshot, and the history tools each have a clearly distinct target. The main soft overlap is that scope_query and scope_write are generic SCPI escape hatches that could in principle replicate status/measure/screenshot, but the descriptions scope them narrowly (read-only '?' / user-requested writes) so misselection risk is low.
All names share the scope_ prefix in consistent snake_case, which is highly predictable. There is a minor deviation in shape: some are noun-only (scope_waveform, scope_screenshot) while others are noun_verb (scope_status, scope_screenshot_get, scope_screenshot_history), but the pattern remains readable.
Nine tools is well within the sweet spot and each earns its place: a read/measure/capture core plus paired raw SCPI access and history retrieval. Nothing feels redundant or padded.
Core acquisition workflows (status, measure, waveform, screenshot, raw query/write) are covered, but the history surface is asymmetric: saved screenshots can be listed and fetched (scope_screenshot_history/get), yet saved waveform CSVs can only be listed with no tool to retrieve one. There is also no cleanup/delete operation and no dedicated trigger or channel-config helper, forcing agents into raw SCPI for common setup tasks.
Maintenance
Related MCP Connectors
Persistent memory, hybrid search and a goal graph for AI agents, over stdio or remote HTTP.
Memory, reflection and safety for AI agents. Hosted or local, no vector database.
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Protocol-native energy infrastructure orchestration for AI data centers. Provides 46 MCP tools across 8 grid protocols (IEC-61850, DNP3, Modbus, OCPP, OpenADR, IEEE 2030.5, IEC 60870-5-104, ICCP) with 5 core API primitives: connect, dispatch, settle, comply, and intel. Enables AI agents to programmatically interact with substations, grid interfaces, and energy assets for real-time workload-grid coordination.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAI-native oscilloscope control. A pure-Python MCP service that lets LLM agents control Keysight EDUX1052G oscilloscopes via a compact DSL.MIT
- AlicenseAqualityCmaintenanceEnables 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.38MIT
- AlicenseBqualityDmaintenanceEnables agentic coding harnesses to control benchtop test equipment — waveform generator, multimeter, oscilloscope, and power supply — over SCPI, with typed tools and raw passthrough for investigating circuits.761MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI clients to measure and control a Rigol DS1202Z-E oscilloscope through a Linux instrument host without managing SCPI commands, transfer formats or instrument sequencing. Exposes a fixed, discoverable tool set for inspecting channels, configuring channels and edge triggers, capturing screenshots and full waveform memory, decoding UART/I2C/SPI on the host, and analyzing saved waveforms with FFT and bounded sample retrieval.MIT