Skip to main content

rigol-mcp

rigol-mcp is an unofficial, community-maintained Model Context Protocol (MCP) server for RIGOL oscilloscopes. The server is open source under the MIT License.

This community project is independent of RIGOL and carries no endorsement from the company.

Use Claude, Codex, Cursor, or another MCP client to configure the scope, take measurements, inspect the displayed waveform, and save a triggered acquisition for offline analysis.

Choose how to connect

Your MCP client connects to the rigol-mcp server, and the server connects to the oscilloscope. Choose each connection independently. For example, a laptop can reach a bench computer over HTTPS while that computer reads the scope over USB.

Client to server

You can use a single PC connected directly to your scope, or where you wish to have multiple clients, use a remote shared server (e.g. Raspberry Pi with 1GB RAM) to manage requests.

Setup How it works Instructions
Local server (stdio) Your MCP client launches rigol-mcp on the same computer that's connected to the scope. Install the server · Configure your local client
Remote shared server (Streamable HTTP) One server stays running for one or more clients. To use an existing server, configure your client with the server's HTTP or HTTPS /mcp URL and any required token. Connect to an existing server · Host a shared server

Server to scope

If you host rigol-mcp, configure the instrument connection on the server computer.

Connection On the scope In the server's settings file Instructions
Ethernet (LAN) Connect Ethernet and find the scope's IP in its LAN settings. Set RIGOL_USB=0 and RIGOL_IP to the scope's IP address. LAN setup
USB Connect the scope's USB Device port to the server computer. Set RIGOL_USB=1. A single Rigol scope is discovered automatically. USB drivers and scope selection

Installation

Install uv on the computer that will run rigol-mcp. The server requires Python 3.11 or later. The examples select Python 3.13 to use the project's bundled USB backend.

Run a published release

Save your USB or LAN settings in a file such as rigol.env on the server computer. For one USB scope, the file needs just RIGOL_USB=1. Use the file's absolute path when launching the pinned package with uvx.

uvx --python 3.13 --env-file "/absolute/path/to/rigol.env" rigol-mcp@0.1.1 --transport stdio

For a local MCP client, put this command in the client configuration below so the client starts the server itself. If you supply the connection settings in the process environment, you can omit --env-file and its path.

Run from a checkout

git clone https://github.com/erebusnz/rigol-mcp.git
cd rigol-mcp
uv sync --locked

Create a .env file beside pyproject.toml with the settings for your scope connection. You can also copy .env.example, which starts with USB selected. Variables already set in the server process take precedence over the file.

Before starting the server, check the instrument connection from the checkout. The connection example prints the instrument's manufacturer, model, serial number, and firmware, then releases the connection.

uv run python examples/check_connection.py

MCP client setup

The examples below launch a local server over stdio. For a running HTTP or HTTPS server, use the client configurations for connecting by URL.

Replace /absolute/path/to/rigol.env with your settings file. On Windows, forward slashes work in paths such as C:/config/rigol.env. If a desktop client cannot find uvx, use its absolute executable path. To launch from a checkout, use uv as the command and ["--directory", "/absolute/path/to/rigol-mcp", "run", "rigol-mcp", "--transport", "stdio"] as its arguments.

Claude Desktop and Cursor

Both clients accept the following JSON. Merge the rigol entry into mcpServers if you already have other servers configured.

Client Configuration file
Claude Desktop On macOS, ~/Library/Application Support/Claude/claude_desktop_config.json. On Windows, %APPDATA%\Claude\claude_desktop_config.json. Claude Desktop setup
Cursor .cursor/mcp.json in the project, or ~/.cursor/mcp.json for all projects. Cursor MCP guide
{
  "mcpServers": {
    "rigol": {
      "command": "uvx",
      "args": ["--python", "3.13", "--env-file", "/absolute/path/to/rigol.env", "rigol-mcp@0.1.1", "--transport", "stdio"]
    }
  }
}

Restart Claude Desktop after saving. In Cursor, open MCP settings and check that rigol is enabled.

Claude Code

Run this in the project where you want to use the scope, then check the server with /mcp. Claude Code MCP guide

claude mcp add --transport stdio rigol -- uvx --python 3.13 --env-file "/absolute/path/to/rigol.env" rigol-mcp@0.1.1 --transport stdio

Codex

Add this table to ~/.codex/config.toml. You can check the entry with codex mcp list. Codex MCP guide

[mcp_servers.rigol]
command = "uvx"
args = ["--python", "3.13", "--env-file", "/absolute/path/to/rigol.env", "rigol-mcp@0.1.1", "--transport", "stdio"]

From your client, ask “Use idn to identify the scope, then show me which channels are enabled.”

Tools

Task Tools What you can do
Inspect the instrument idn, get_scope_state, get_acquisition_info Identify the scope, read channel and trigger settings, and check acquisition status and available transfer modes.
Control acquisition run, stop, single, autoscale, wait_for_trigger Run continuously, freeze the record, arm a single capture, autoscale, or wait for a running scope to report a trigger.
Set channels and timebase set_channel, set_timebase Set channel scale, offset, coupling and probe ratio, or change the time per division and horizontal offset.
Configure triggering and acquisition set_trigger, set_trigger_options, set_acquisition Configure the edge trigger, sweep, holdoff and coupling. Choose the acquisition type, average count and memory depth. Capture settings
Take measurements measure, measure_between Read voltage, frequency, rise time, and other single-channel measurements, or measure delay and phase between channels.
Displayed waveform (Screen) get_waveform Get a text analysis of one channel. Set return_points=true for its times_s and voltages_v arrays. Older clients can use the raw_data alias.
Acquisition record (Memory) export_acquisition Save the full stopped record for enabled channels as binary files and a JSON manifest on the server. Acquisition export and Python example
Use cursors set_cursors, get_cursor_values Position cursors in seconds and read their time and amplitude differences.
Capture the display screenshot Return a PNG image and save it under RIGOL_SCREENSHOT_DIR (default screenshots/).
Manage the connection check_error, disconnect Read the SCPI error queue or release the server's VISA connection. A later tool call can reconnect.
Send a SCPI command send_raw Enable this optional tool with RIGOL_ENABLE_SEND_RAW=1 in the server environment.

Supported hardware

Support depends on the exact oscilloscope model and covers analog channels. For the operations tested on individual instruments, see the hardware test results by model.

Rigol series Analog channels Implemented operations
DS1000Z / MSO1000Z 4 Control, measurements, screenshots, displayed waveforms, acquisition information, and full memory export
DHO800 / DHO900 / DHO1000 / DHO1000U / DHO4000 2 or 4 Control, measurements, screenshots, displayed waveforms, acquisition information, and full memory export
MHO900 / MHO98 4 Control, measurements, screenshots, displayed waveforms, and acquisition information
DS2000A / MSO2000A, MHO2000, DHO5000 / MHO5000, MSO/DS9000 2, 4, 6, or 8 Model and channel information only

Find your exact model in the hardware catalog. If you have access to a Rigol scope, we welcome pull requests with hardware test results.

Example prompts

Measure the frequency and peak-to-peak voltage on channel 1. Adjust the timebase until two complete cycles are visible, then describe the waveform.

Channel 1 is the input to an amplifier and channel 2 is the output. Measure the gain in dB.

The rising edge on channel 1 rings. Place the cursors on two adjacent peaks and measure the ringing period.

Oscilloscope trace with cursors on adjacent peaks of a damped oscillation

Screenshot from a RIGOL oscilloscope. Cursors A and B mark adjacent peaks to measure the ringing period.

Testing

Run the offline suite from the checkout. It uses simulated VISA instruments.

uv run --locked --extra test pytest

Maintainers can find the publishing steps in the release guide.

License

MIT

Metadata

Release files for rigol-mcp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rigol-mcp 0.1.1
File Size Uploaded Provenance Actions
rigol_mcp-0.1.1.tar.gz 201.5 kB Without provenance Details for rigol_mcp-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rigol-mcp 0.1.1
File Interpreter ABI Platform Actions
rigol_mcp-0.1.1-py3-none-any.whl Python 3 none any Details for rigol_mcp-0.1.1-py3-none-any.whl

Total release size: 264.7 kB

Release files / rigol_mcp-0.1.1.tar.gz

Download URL rigol_mcp-0.1.1.tar.gz
Size 201.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7ae62544e2d87d3939fc13499343019a21758e8265cdb984ba1993c506368d0a
BLAKE2b-256 checksum
How to use checksums
d2742cb6d9fd22fbfaec49633aceefb563f738f8fbc83c5d68b7393c5ff5e079
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / rigol_mcp-0.1.1-py3-none-any.whl

Download URL rigol_mcp-0.1.1-py3-none-any.whl
Size 63.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a4a05e245060b92813e516f942cc53c7525c1438f1a3dead7ff464c8a0f87a9
BLAKE2b-256 checksum
How to use checksums
5be3d800d2c5c217ab7b861df08ed905ce813d1d984b668d210d7e98b9c49ec0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for rigol-mcp 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page