Rigol DHO824 Oscilloscope

io.github.aimoda由 GitHub 帳號 aimoda 發布v0.1.143-main.2b177ae更新於 Oct 28, 2026

Control and query Rigol DHO824 oscilloscope for waveform capture and measurements

已驗證STDIO僅桌面檔案與儲存開發者工具

概覽

AI 產生的概覽

讓助理透過 VISA 控制並查詢 Rigol DHO824/DHO804 示波器,進行波形擷取、截圖與量測。

可以做什麼
  • 擷取示波器各通道的波形並存成暫存檔案
  • 對儀器畫面截圖,可選擇在每次工具呼叫後自動截圖
  • 透過 VISA 連線查詢與控制示波器,包括蜂鳴器設定
  • 將容器內路徑轉換為主機路徑,方便直接開啟擷取檔案
適用情境
當你的網路中有 Rigol DHO804/DHO824 示波器,並希望助理在實驗台除錯時自動抓取波形、截圖與讀取量測結果時使用。
執行需求
以 Docker(建議)或 Python 套件在本機執行。需要能連線到儀器的網路,以及 RIGOL_RESOURCE 指定的 VISA 資源字串(例如 TCPIP 位址)。Docker 方式還需 RIGOL_TEMP_DIR 與掛載的主機目錄一致;可選 VISA_TIMEOUT、RIGOL_BEEPER_ENABLED、RIGOL_AUTO_SCREENSHOT。示波器須刷成 DHO824 韌體 00.01.04。
安裝前請注意
它會對實體實驗硬體送出指令,工具呼叫會改變儀器狀態並觸發擷取。波形與截圖會寫入主機目錄且不會自動清理,需自行刪除舊檔案。僅支援 DHO804/DHO824 與已測試韌體,其他型號請自行承擔風險。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Rigol DHO824 Oscilloscope,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Rigol DHO824 MCP Server

[PyPI version] [GHCR]

An MCP (Model Context Protocol) server for controlling and querying the Rigol DHO824 oscilloscope.

[Demo of oscilloscope in action]

Built by ai.moda.

Hardware Requirements

Supported Models

This project only supports DHO804/DHO824 oscilloscopes (identical hardware). We recommend purchasing a DHO804.

Firmware Requirements

IMPORTANT: The DHO804 must be flashed to DHO824 firmware before using this MCP server. Use the rigol_vendor_bin project to flash your oscilloscope.

Supported Firmware Version: 00.01.04

This is the only firmware version we test and support. Other firmware versions may work but are not guaranteed.

Compatibility Note

Other Rigol oscilloscope models may work with this MCP server, but we have no way to test them or guarantee functionality. Use with other models at your own risk.

Installation

The recommended way to use this MCP server is via Docker, which eliminates dependency management and provides isolation.

Quick Start

Pull the pre-built image from GitHub Container Registry:

bash
docker pull ghcr.io/aimoda/rigol-dho824-mcp:latest

Using Environment Variables with Docker

IMPORTANT: You must provide the RIGOL_RESOURCE environment variable with your oscilloscope's IP address (e.g., TCPIP0::192.168.1.100::inst0::INSTR).

You can configure the Docker container with environment variables in two ways:

  1. Hardcoded values (shown in examples below): -e RIGOL_RESOURCE="TCPIP0::192.168.1.100::inst0::INSTR"
  2. Pass-through from host (recommended): -e RIGOL_RESOURCE (without =value)

When you use -e VARIABLE_NAME without a value, Docker automatically passes through the variable from your host environment. This is useful if you have environment variables already set in your shell (e.g., in ~/.bashrc or ~/.zshrc).

Environment Variables

  • RIGOL_RESOURCE: Required - VISA resource string for connecting to the oscilloscope (e.g., TCPIP0::192.168.1.100::inst0::INSTR)
  • RIGOL_TEMP_DIR: Required for Docker - Host-side path for returned file paths. The container always writes to /tmp/rigol internally and translates paths to this value in responses. Must match the host path in your -v mount. Outside Docker, this sets the directory for temporary files (waveforms, screenshots); if not set, uses system default temp directory.
  • VISA_TIMEOUT: Communication timeout in milliseconds (default: 30000)
  • RIGOL_BEEPER_ENABLED: Enable/disable oscilloscope beeper sounds (default: false)
  • RIGOL_AUTO_SCREENSHOT: Automatically capture screenshot after each MCP tool execution for visualization/debugging (default: false). Screenshots are saved with human-readable timestamp format (e.g., auto_screenshot_20251030_143045_123.png) for chronological sorting.

MCP Client Configuration

Claude Code

Option 1: Using .mcp.json file

Create a .mcp.json file in your project directory (or copy from .mcp.json.example):

json
{  "mcpServers": {    "rigol-dho824": {      "type": "stdio",      "command": "docker",      "args": [        "run",        "-i",        "--rm",        "-v",        "/tmp/rigol-data:/tmp/rigol",        "-e",        "RIGOL_RESOURCE",        "-e",        "VISA_TIMEOUT",        "-e",        "RIGOL_BEEPER_ENABLED",        "-e",        "RIGOL_AUTO_SCREENSHOT",        "-e",        "RIGOL_TEMP_DIR",        "ghcr.io/aimoda/rigol-dho824-mcp:latest"      ],      "env": {        "RIGOL_RESOURCE": "TCPIP0::192.168.1.100::inst0::INSTR",        "VISA_TIMEOUT": "30000",        "RIGOL_BEEPER_ENABLED": "false",        "RIGOL_AUTO_SCREENSHOT": "false",        "RIGOL_TEMP_DIR": "/tmp/rigol-data"      }    }  }}

Option 2: Using CLI

bash
claude mcp add --scope local rigol-dho824 -- \  docker run -i --rm \  -v /tmp/rigol-data:/tmp/rigol \  -e RIGOL_RESOURCE="TCPIP0::192.168.1.100::inst0::INSTR" \  -e VISA_TIMEOUT=30000 \  -e RIGOL_BEEPER_ENABLED=false \  -e RIGOL_AUTO_SCREENSHOT=false \  -e RIGOL_TEMP_DIR=/tmp/rigol-data \  ghcr.io/aimoda/rigol-dho824-mcp:latest

Replace 192.168.1.100 with your oscilloscope's IP address.

Codex
bash
codex mcp add rigol-dho824 -- \  docker run -i --rm \  -v /tmp/rigol-data:/tmp/rigol \  -e RIGOL_RESOURCE="TCPIP0::192.168.1.100::inst0::INSTR" \  -e VISA_TIMEOUT=30000 \  -e RIGOL_BEEPER_ENABLED=false \  -e RIGOL_AUTO_SCREENSHOT=false \  -e RIGOL_TEMP_DIR=/tmp/rigol-data \  ghcr.io/aimoda/rigol-dho824-mcp:latest

Replace 192.168.1.100 with your oscilloscope's IP address.

Note: After adding the server to your MCP client, restart the client to load the MCP server. The server will translate container paths (/tmp/rigol/*) to host paths (/tmp/rigol-data/*) in all returned file paths.

Your first prompt

Enter the following prompt in your MCP Client to verify your setup:

Capture a waveform from channel 1 of my oscilloscope

Your MCP client should connect to the oscilloscope and capture the waveform data.

Accessing Temp Files in Docker

The container writes temporary files (waveform captures, screenshots) to /tmp/rigol internally. To access these files from your host machine:

  1. Create a directory on your host for storing temporary files:

    bash
    mkdir -p /tmp/rigol-data
  2. Mount this directory as a volume and set RIGOL_TEMP_DIR in your Docker configuration:

    bash
    docker run -i --rm \  -v /tmp/rigol-data:/tmp/rigol \  -e RIGOL_TEMP_DIR=/tmp/rigol-data \  ...

The server automatically translates all returned file paths from the container path (/tmp/rigol/*) to the host path (/tmp/rigol-data/*), so you can directly access files at the paths shown in tool responses.

Important notes:

  • The host directory (/tmp/rigol-data in examples) must exist before starting the server
  • RIGOL_TEMP_DIR must match the host-side path in your -v mount
  • Temporary files are not automatically cleaned up
  • You are responsible for manually cleaning up old waveform and screenshot files
  • Files will be organized in subdirectories like waveform_capture_<timestamp>/ for waveforms and screenshot_<timestamp>.png for screenshots

Example: Manual cleanup

bash
# Remove waveform captures older than 7 daysfind /tmp/rigol-data -type d -name "waveform_capture_*" -mtime +7 -exec rm -rf {} \;
# Remove screenshots older than 7 daysfind /tmp/rigol-data -type f -name "screenshot_*.png" -mtime +7 -delete

Troubleshooting

Container exits immediately
  • Ensure you're using the -i flag (interactive mode)
  • Verify RIGOL_RESOURCE is set correctly
Cannot connect to oscilloscope
  • Verify oscilloscope IP address and network connectivity (ping <ip-address>)
  • Check oscilloscope's remote control settings are enabled
Environment variables not working
  • Ensure you're using -e VARIABLE_NAME in the Docker args array
  • Set the actual values in the env field of .mcp.json

Building Locally

To build the Docker image yourself:

bash
docker build -t rigol-dho824-mcp:local .

Then use rigol-dho824-mcp:local as the image name in your configuration.

Development Setup

For local development and contributions, you can install the MCP server in a Python virtual environment.

Create and activate virtual environment

bash
python3 -m venv venvsource venv/bin/activate  # On Windows: venv\Scripts\activate

Install the package

bash
# Install in editable mode for developmentpip install -e .
# Or just install dependenciespip install -r requirements.txt

Add to MCP Client

After completing the setup steps above, add the local development MCP server to your MCP client:

Claude Code:

bash
claude mcp add --scope local rigol-dho824 -- <path-to-this-repo>/venv/bin/rigol-dho824-mcp

Codex CLI:

bash
codex mcp add \  --env RIGOL_RESOURCE="TCPIP0::192.168.1.100::inst0::INSTR" \  --env VISA_TIMEOUT="30000" \  --env RIGOL_BEEPER_ENABLED="false" \  --env RIGOL_AUTO_SCREENSHOT="false" \  rigol-dho824 -- <path-to-this-repo>/venv/bin/rigol-dho824-mcp

Replace:

  • <path-to-this-repo> with the actual path to this repository
  • 192.168.1.100 with your oscilloscope's IP address

Note: Unlike Claude Code, Codex requires explicit environment variables via --env flags (before the server name) as it runs MCP servers in a sanitized environment.

Development Scripts

The scripts/ directory contains utilities for development:

  • convert_png_to_webp.sh - Convert PNG frame sequences to animated WebP (e.g., ./scripts/convert_png_to_webp.sh "~/screenshots/*.png" output.webp)

Development Configuration

The server can be configured using environment variables. Create a .env file from the example:

bash
cp .env.example .env

Then edit .env to set your configuration:

  • RIGOL_RESOURCE: VISA resource string for the oscilloscope (required)
    • Example: TCPIP0::192.168.1.100::inst0::INSTR
  • VISA_TIMEOUT: Communication timeout in milliseconds (default: 5000)

Running the Server (Development)

For local development and testing, you can run the server directly with Python:

STDIO Transport

bash
# Set resource string via environment variableexport RIGOL_RESOURCE="TCPIP0::192.168.1.100::inst0::INSTR"python -m rigol_dho824_mcp.server

HTTP Transport

bash
# Default HTTP server (http://127.0.0.1:8000/mcp)python -m rigol_dho824_mcp.server --http
# Custom host and portpython -m rigol_dho824_mcp.server --http --host 0.0.0.0 --port 3000
# Custom pathpython -m rigol_dho824_mcp.server --http --path /api/mcp

來源:README.md,提交 2b177ae

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.143-main.2b177ae最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分