Rigol DHO824 MCP Server
Enables control and querying of Rigol DHO824 oscilloscopes, allowing users to capture waveforms, take screenshots, and interact with oscilloscope settings through natural language.
README
Rigol DHO824 MCP Server
An MCP (Model Context Protocol) server for controlling and querying the Rigol DHO824 oscilloscope.

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:
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:
- Hardcoded values (shown in examples below):
-e RIGOL_RESOURCE="TCPIP0::192.168.1.100::inst0::INSTR" - 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/rigolinternally and translates paths to this value in responses. Must match the host path in your-vmount. 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
<details> <summary>Claude Code</summary>
Option 1: Using .mcp.json file
Create a .mcp.json file in your project directory (or copy from .mcp.json.example):
{
"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
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.
</details>
<details> <summary>Codex</summary>
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.
</details>
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:
-
Create a directory on your host for storing temporary files:
mkdir -p /tmp/rigol-data -
Mount this directory as a volume and set
RIGOL_TEMP_DIRin your Docker configuration: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-datain examples) must exist before starting the server RIGOL_TEMP_DIRmust match the host-side path in your-vmount- 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 andscreenshot_<timestamp>.pngfor screenshots
Example: Manual cleanup
# Remove waveform captures older than 7 days
find /tmp/rigol-data -type d -name "waveform_capture_*" -mtime +7 -exec rm -rf {} \;
# Remove screenshots older than 7 days
find /tmp/rigol-data -type f -name "screenshot_*.png" -mtime +7 -delete
Troubleshooting
Container exits immediately
- Ensure you're using the
-iflag (interactive mode) - Verify
RIGOL_RESOURCEis 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_NAMEin the Docker args array - Set the actual values in the
envfield of.mcp.json
Building Locally
To build the Docker image yourself:
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
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
Install the package
# Install in editable mode for development
pip install -e .
# Or just install dependencies
pip 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:
claude mcp add --scope local rigol-dho824 -- <path-to-this-repo>/venv/bin/rigol-dho824-mcp
Codex CLI:
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 repository192.168.1.100with 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:
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
- Example:
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
# Set resource string via environment variable
export RIGOL_RESOURCE="TCPIP0::192.168.1.100::inst0::INSTR"
python -m rigol_dho824_mcp.server
HTTP Transport
# Default HTTP server (http://127.0.0.1:8000/mcp)
python -m rigol_dho824_mcp.server --http
# Custom host and port
python -m rigol_dho824_mcp.server --http --host 0.0.0.0 --port 3000
# Custom path
python -m rigol_dho824_mcp.server --http --path /api/mcp
<!-- mcp-name: io.github.aimoda/rigol-dho824-mcp -->
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。