rigol-dho-mcp
MCP server for controlling and reading Rigol DHO800/DHO900 oscilloscopes over LAN via SCPI commands.
README
Rigol DHO800/DHO900 MCP Server
An MCP (Model Context Protocol) server for controlling and reading Rigol DHO800/DHO900 series oscilloscopes over LAN, built on the SCPI command set from the official programming guide. It talks directly to the scope's raw SCPI socket on port 5555, so there's no VISA install to deal with.
Tools
| Tool | Purpose |
|---|---|
identify |
*IDN?, for verifying connectivity and grabbing model/serial/firmware |
get_status |
Trigger state, sample rate, memory depth, timebase, per-channel settings |
run_control |
run / stop / single / autoset / clear / force_trigger |
configure_channel |
Enable, V/div, offset, coupling, probe ratio, BW limit, invert |
configure_timebase |
Main timebase scale and offset |
configure_trigger_edge |
Edge trigger source, slope, level, sweep mode |
configure_acquisition |
Memory depth, acquisition type, averages |
get_measurement |
Automatic measurements (VPP, VRMS, FREQuency, RTIMe, etc.) |
get_waveform |
Scaled voltage/time data from screen or deep memory, with stats |
get_screenshot |
PNG of the scope's display |
scpi_command |
Raw SCPI escape hatch for anything else in the guide |
configure_cursors |
Set cursor mode (OFF/MANual/TRACk), type, source, and positions |
get_cursor_values |
Read cursor positions and delta/frequency readouts |
measure_between |
Delay or phase between two channels (RRDelay, FFPHase, etc.) |
Scope setup
- Connect the scope to your LAN and grab its IP address under
Utility > IOon the scope. - That's really it. The raw SCPI socket on port 5555 is open by default.
Run locally (stdio)
pip install .
RIGOL_HOST=192.168.1.100 rigol-dho-mcp
This starts the server on stdio, ready for any MCP client to spawn and talk to it directly.
Testing SCPI commands locally (CLI)
rigol-dho-cli talks straight to the scope over the same SCPI client the MCP server uses — no MCP client required. Handy for checking a command works, or debugging the connection before wiring it up as a tool.
pip install .
# one-shot: run one or more commands and print the result, then exit
RIGOL_HOST=192.168.1.100 rigol-dho-cli "*IDN?" ":CHANnel1:SCALe?"
# interactive REPL: omit the commands
RIGOL_HOST=192.168.1.100 rigol-dho-cli
scpi> *IDN?
RIGOL TECHNOLOGIES,DHO814,...
scpi> :RUN
OK (system error queue: 0,"No error")
scpi> :DISPlay:DATA? PNG
binary response (34521 bytes) -> saved to capture_00001.png
scpi> quit
It reads the same RIGOL_HOST / RIGOL_PORT / RIGOL_TIMEOUT env vars as the server (or pass --host / --port / --timeout directly). Queries (commands ending in ?) print the response; writes are followed by a :SYSTem:ERRor? check so a typo shows up immediately. Binary responses (screenshots, waveform data) are saved to a file in the current directory instead of being dumped to the terminal.
Run with Docker
HTTP transport (recommended for containers)
docker build -t rigol-dho-mcp .
docker run -d --name rigol-dho-mcp \
-p 8000:8000 \
-e RIGOL_HOST=192.168.1.100 \
rigol-dho-mcp
This exposes the MCP endpoint at http://<docker-host>:8000/mcp (streamable HTTP).
Using Docker Compose
Alternatively, you can use docker-compose.yml:
# Copy the example environment file and edit it with your scope's IP address:
cp .env.example .env
# Edit .env to set your scope's IP address under RIGOL_HOST
# Then start the service:
docker compose up -d
# View logs:
docker compose logs -f
# Stop the service:
docker compose down
stdio inside Docker
docker run -i --rm \
-e RIGOL_HOST=192.168.1.100 \
-e MCP_TRANSPORT=stdio \
rigol-dho-mcp
The container needs to be able to reach the scope's IP. On Linux the default bridge network usually works fine; if your scope only sits on the host's LAN segment and bridge routing doesn't reach it, add
--network host. For docker-compose, you can uncomment thenetwork_mode: "host"line indocker-compose.yml.
Using it with an MCP client
This is a standard MCP server, so any client that speaks MCP over stdio or streamable HTTP can use it. The config shape is basically the same everywhere: point the client at the rigol-dho-mcp command (stdio) or the running HTTP endpoint, and pass RIGOL_HOST.
stdio:
{
"mcpServers": {
"rigol-dho800": {
"command": "rigol-dho-mcp",
"env": { "RIGOL_HOST": "192.168.1.100" }
}
}
}
Streamable HTTP (pointing at the Dockerized server from above):
{
"mcpServers": {
"rigol-dho800": {
"url": "http://localhost:8000/mcp"
}
}
}
If your client doesn't support remote MCP servers natively, use mcp-remote as a bridge instead:
{
"mcpServers": {
"rigol-dho800": {
"command": "npx",
"args": ["mcp-remote", "http://localhost:8000/mcp"]
}
}
}
Check your client's docs for exactly where this config goes; the values themselves don't change.
Environment variables
| Variable | Default | Meaning |
|---|---|---|
RIGOL_HOST |
— (required) | Scope IP address or hostname |
RIGOL_PORT |
5555 |
SCPI socket port |
RIGOL_TIMEOUT |
10 |
I/O timeout, seconds |
MCP_TRANSPORT |
stdio (local) / streamable-http (Docker) |
Transport |
MCP_HOST / MCP_PORT |
0.0.0.0 / 8000 |
HTTP bind address/port |
RIGOL_ENABLE_SCPI_RAW |
0 |
Set to 1 to expose scpi_command (off by default) |
Notes
- Deep-memory reads (
get_waveformwithmode="memory") need the scope in the STOP state, so callrun_control("stop")first. Data comes back in chunks and gets decimated tomax_pointsbefore returning. - Waveform samples are scaled to volts using the preamble:
V = (raw − YORigin − YREFerence) × YINCrement. - A measurement value near
9.9e37just means it's invalid for the current signal.get_measurementflags this for you. scpi_commandis opt-in (setRIGOL_ENABLE_SCPI_RAW=1). It checks:SYSTem:ERRor?after write-only commands, so a typo in raw SCPI shows up right away instead of failing silently.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。