Instrument MCP Server
This server is an MCP-based test instrument control server that lets AI assistants discover, connect to, and control laboratory instruments via natural language/commands.
Instrument connectivity: Connect/disconnect multiple instruments over VISA (SCPI), Modbus-RTU serial, direct USB, or LAN protocols, with alias-based session management.
Auto-discovery & identification: Automatically identify instrument models via
*IDN?and list available commands per instrument type.Keysight MXA/EXA spectrum analyzer control: Set frequency/span, RBW/VBW, reference level, attenuation, sweep modes, trace/detector/averaging, peak search, markers, harmonics, and read traces.
R&S CMW500 wireless tester control: Preset, configure LTE band/channel/bandwidth/attenuation/TPC, turn cell on/off, connect/disconnect UE, query status, run/abort measurements, and manage instrument state.
Keysight 66300 DC power supply control: Set/measure voltage/current/power, control outputs, set OVP/OCP, sensing/range, clear protections, and run health checks with verdicts.
Modbus chamber control: Read/set temperature and humidity, start/stop fixed-value runs, manage program tables, segments, cycles, and program execution.
DSLogic U3Pro16 logic analyzer control: Capture data, set thresholds, monitor channel levels/edges in stream mode, with direct USB access.
Smart plug control: Control mi_plug via LAN miIO/MIoT—status, on/off/toggle, loop timers, and arbitrary MIoT property read/write.
Generic SCPI commands: Send arbitrary SCPI write/query,
*OPC?,*CLS,*ESR?, and explore/learn new commands.AI self-learning: Explore instrument SCPI commands, save successful commands as reusable YAML tools, list/initialize project command files.
Session monitoring & debugging: List active sessions, view command history, debug last errors, and read instrument error queues.
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., "@Instrument MCP Server Set center frequency to 2.4 GHz and span to 100 MHz"
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.
Instrument MCP Server
A Model Context Protocol (MCP) server for controlling test instruments via SCPI, Modbus-RTU, or direct USB.
Supports Keysight MXA/EXA spectrum analyzers, R&S CMW500 wireless testers, Keysight DC power supplies, Modbus-RTU chambers, and the DreamSourceLab DSLogic U3Pro16 USB logic analyzer.
Features
Natural language instrument control - Control instruments through conversational AI
Auto-discovery - Automatically identifies instrument models via *IDN?
YAML-driven commands - Easy to add new instruments without code changes
Multi-instrument sessions - Connect and control multiple instruments simultaneously
Error handling - Automatic error queue reading and diagnostics
AI self-learning - AI can explore, learn, and save new instrument commands
USB logic analyzer support - Direct USB control of DSLogic U3Pro16 (no VISA required)
Related MCP server: instrument-mcp
Prerequisites
Before installing, ensure you have:
Python 3.10+
VISA Backend (one of the following):
NI-VISA (Windows/Linux)
Keysight IO Libraries Suite (Windows)
pyvisa-py (pure Python, limited support)
Notes:
Without a VISA backend, the package cannot communicate with VISA instruments.
The DSLogic U3Pro16 uses USB directly via
pyusb+libusb-1.0.dlland does not require VISA.
Supported Instruments
Instrument | Type | Connection |
Keysight MXA N9020A / N9010A / EXA | Spectrum Analyzer | VISA (TCP/IP/GPIB/USB) |
R&S CMW500 | Wireless Communication Tester | VISA (TCP/IP) |
Keysight 66311B / 66311 | DC Power Supply | VISA (GPIB) |
DreamSourceLab DSLogic U3Pro16 | USB Logic Analyzer | USB (pyusb + libusb-1.0) |
Generic SCPI instruments | Any | VISA |
Modbus-RTU 恒温恒湿试验箱 | Chamber | Serial (RS-232C) |
米家智能插座2 (chuangmi.plug.212a01) | Smart Plug | LAN (miIO/MIoT, UDP + token) |
米家智能插座2(mi_plug)
通过局域网 miIO/MIoT 协议控制(不经小米云端)。IP/token 默认从 cwd 下
mi_plug_config.json 读取(模板 mi_plug_config.example.json,token 提取见
docs/miplug_chuangmi_212a01.md),也可用 connect 的 token 参数覆盖。
Connection
connect(address="10.1.200.146", instrument_type="mi_plug", alias="plug")命令
命令 | 功能 |
| miIO 握手 + 设备信息(验证 token) |
| 读取全部关键属性(开关/温度/功率/电压/电流/循环配置等) |
| 开关控制(写后回读校验) |
| 设备端循环定时(siid=4) |
| 按 MIoT spec 读写任意 siid/piid 属性 |
| 扫码登录小米云端提取设备 token(最简单稳定的方式,无需连接插座;默认自动写入 |
Keysight 66300 系列直流电源
支持 66311B/D、66321B/D、66319B/D 等 66300 家族移动通信直流电源(共用同一套 SCPI 命令)。
Connection
connect(address="GPIB0::5::INSTR", instrument_type="keysight_ps", alias="ps")诊断命令
命令 | 功能 |
| 一键只读健康检查:自检 + 错误队列 + 状态寄存器解码 + 保护配置 + 测量有效性判定,返回 |
| 清除输出保护锁存( |
ps_health_check 的 verdict 判定:
NEEDS_SERVICE —
*TST?非零或错误队列含自检错误码(NVRAM 校验和失败等),按手册第 41 页需返修WARNING — 保护位置位或测量返回无效占位符
9.91e+37USABLE — 一切正常
Questionable 状态位映射依据手册 Table 8-5:bit0=OV, bit1=OCP, bit4=OT(过温), bit5=SD/OS(传感线开路), bit9=RI, bit10=UNR, bit14=MeasOvld。
66319D 双通道与耦合(Coupling)
66319D 具有主输出(output 1)与辅助输出(output 2)两路输出,通道命令用后缀 2 区分:
OUTP/OUTP2、VOLT/VOLT2、CURR/CURR2、MEAS:VOLT?/MEAS:VOLT2?。
注意:不支持 INST:NSEL 通道选择(报 -113 Undefined header)。
两路能否独立开关取决于输出耦合状态(INST:COUP:OUTP:STAT):
ALL(出厂默认):任意 OUTP 命令同时开关两路——即"关 CH1 连累 CH2"的根因NONE:OUTP1/OUTP2可独立控制;未耦合时裸OUTP只作用于主输出
耦合设置是易失的(OUTP:PON:STAT? 返回 RST 时断电重启恢复默认 ALL),持久化需三步:
INST:COUP:OUTP:STAT NONE → *SAV 0 → OUTP:PON:STAT RCL0(有覆盖寄存器/上电带电输出
两个副作用需确认)。完整流程、命令速查与本机实测记录见
docs/agilent_66319d_coupling_off.md,实验脚本 tests/ps_66319d_dual_channel_test.py。
Modbus 温箱(恒温恒湿试验箱)
Modbus-RTU 恒温恒湿试验箱,支持定值运行与程式(程序)控制。协议:9600 8N1, CRC-16/MODBUS, 站地址 1。
Connection
connect(address="COM30", instrument_type="modbus_chamber", alias="chamber")定值模式命令
命令 | 功能 |
| 读取当前温度 PV |
| 读取/设置设定温度 SV |
| 读取完整状态(温度/湿度/输出/运行标志) |
| 读取湿度 PV/SV |
| 设置目标湿度 SV |
| 启动/停止定值运行 |
程式控制命令
命令 | 功能 |
| 读取任意程式的完整段表(温度/湿度/时间/循环/TS1-4) |
| 读取指定程式的某一段 |
| 修改已有段的设定(温度/湿度/时间/TS) |
| 设置某段的循环次数 |
| 读取程式运行状态(程式号/段号/剩余时间) |
| 启动程式运行 |
| 清空段表 |
程式启动方法:先写 0x0064 选定程式号,再写 0x0065=1 启动(与定值运行同值,区别在选程式号)。
硬件限制(COM30 实测):段数寄存器(reg41)只读,无法通过 Modbus 新增段或新建程式。新增段/新建程式须在面板操作——推荐在面板上把已有程式复制到目标号,再用 mc_prog_write_seg / mc_prog_set_cycle 远程修改各段参数。
DSLogic U3Pro16 Logic Analyzer
The DSLogic U3Pro16 is supported as a first-class MCP instrument.
Prerequisites
Install a 64-bit
libusb-1.0.dlland ensure it is discoverable:Placed next to the package (
src/instrument_mcp/libusb-1.0.dll), orIn the current working directory, or
In a directory in your
PATH.
Windows uses the WinUSB driver for DSLogic (installed by DSView). Close DSView before connecting from MCP.
Connection
connect(address="USB", instrument_type="dslogic", alias="la")Commands
After connecting:
dslogic_get_status(alias="la")
dslogic_set_threshold(alias="la", vth=1.65)
dslogic_capture(alias="la", samplerate_mhz=100, samples=1024, output_path="capture.bin")
dslogic_monitor_level(alias="la", samplerate_mhz=1, duration=30, channel=-1, edge_type="both", debounce_us=0)dslogic_monitor_level runs in stream mode on the DSLogic U3Pro16 and reports edge transitions (rising, falling, or both) with optional debouncing. It prints the initial/final state of all 16 channels and a list of detected edge events. This command is specific to the DSLogic U3Pro16 and will not work with other logic analyzers.
Data Format
Stream mode (
dslogic_monitor_level): Uses the DSLogicLA_CROSS_DATAformat. Data arrives as 8-byte blocks per channel, where each block contains 64 consecutive samples for that channel. Channels are interleaved in the order CH0, CH1, ..., CH15, then repeated.Buffer mode (
dslogic_capture): Capture files are raw data from the device. With 16 channels enabled in buffer mode, each sample is typically a 2-byte little-endian word where bitnrepresents channeln(CH0= LSB).
Installation
Using uv (recommended)
# 从 PyPI 安装
uv tool install instrument-mcp
# 或从本地源码安装
uv tool install .
# 或开发模式安装
uv tool install --editable .Using pip
pip install instrument-mcpFrom source
git clone https://github.com/yourusername/instrument-mcp.git
cd instrument-mcp
pip install -e .Usage
As a standalone MCP Server
# 启动服务器(stdio 模式,用于 MCP 客户端)
instrument-mcp
# 或使用 Python 模块
python -m instrument_mcp.server
# 使用 uv 运行(无需全局安装)
uv run instrument-mcpConfigure in Claude Desktop
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"instrument": {
"command": "instrument-mcp"
}
}
}Or with uv (if not globally installed):
{
"mcpServers": {
"instrument": {
"command": "uv",
"args": ["run", "instrument-mcp"]
}
}
}Or with full path:
{
"mcpServers": {
"instrument": {
"command": "python",
"args": ["-m", "instrument_mcp.server"]
}
}
}Using with Claude Code
# Add to your project
claude mcp add instrument instrument-mcpExample Commands
Once connected, you can use natural language:
"Connect to the MXA at 192.168.1.100"
"Set center frequency to 2.4 GHz with 100 MHz span"
"Run a peak search and read the marker"
"Configure harmonic measurement with 7 harmonics"
"Fetch the harmonic amplitude values"Or with the CMW500:
"Connect to CMW500 at 172.22.1.3"
"Preset the instrument"
"Set LTE Band 7, 20MHz bandwidth"
"Turn on the cell"
"Check UE connection status"Development
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest
# Lint
ruff check .
# Debug with MCP inspector
mcp dev src/instrument_mcp/server.pyProject Structure
instrument-mcp/
├── src/instrument_mcp/
│ ├── server.py # MCP Server entry point
│ ├── instruments.py # Instrument abstraction layer (VISA, Modbus, USB)
│ ├── dslogic_usb.py # Low-level DSLogic U3Pro16 USB controller
│ ├── commands/ # YAML command definitions + Python handlers
│ │ ├── __init__.py # YAML command loader
│ │ ├── keysight_ps.yaml # Power supply commands (incl. diagnostics)
│ │ ├── keysight_ps_handler.py
│ │ └── ...
│ └── diagnostics/ # 诊断与健康检查模块
│ └── keysight_ps_diag.py # 66300 系列电源健康检查 + 保护清除
├── pyproject.toml
└── README.mdAdding New Instruments
Create a new YAML file in
src/instrument_mcp/commands/Define
instrument_type,model_keywords, andcommandsRestart the server - commands are loaded automatically
Example YAML structure:
instrument_type: my_instrument
description: My Test Instrument
model_keywords:
- "MYMODEL"
- "MYBRAND"
commands:
- name: my_command
description: Does something useful
params:
- name: param1
type: string
description: A parameter
default: "default_value"
scpi_template:
query: "MY:CMD? {param1}"Troubleshooting
"No module named 'pyvisa'" or VISA errors
Install a VISA backend:
# Option 1: NI-VISA (recommended for Windows)
# Download from https://www.ni.com/en-us/support/downloads/drivers/download.ni-visa.html
# Option 2: pyvisa-py (pure Python, limited support)
pip install pyvisa-pyConnection timeout
Verify instrument is powered on and network reachable:
ping 192.168.1.100Check instrument is not locked by another software
Verify VISA address format:
TCPIP::IP::INSTR,GPIB0::5::INSTR
DSLogic U3Pro16 "Access denied" or USB errors
Close DSView before connecting from MCP. DSView holds the USB device open.
Ensure a 64-bit
libusb-1.0.dllis available next to the package, in the working directory, or inPATH.On Windows, DSLogic uses the WinUSB driver installed by DSView. Reinstall the driver if needed.
Commands not found after saving
Restart the MCP Server to reload commands from .instrument_mcp/ directory.
Release Checklist (for maintainers)
Before publishing to PyPI:
Update version in
pyproject.tomlUpdate
CHANGELOG.mdRun tests:
pytestRun lint:
ruff check .Build package:
python -m buildTest installation:
pip install dist/*.whlUpload to PyPI:
twine upload dist/*
License
MIT License
Available Tools
110 toolsclsC
[GENERIC] 清除仪器状态(*CLS)
Inputs: alias, params_json. Returns: result
cmw_abort_measurementC
[CMW] 中止测量
Inputs: alias, params_json. Returns: result
cmw_cell_offC
[CMW] 关闭 LTE 小区信号
Inputs: alias, params_json. Returns: result
cmw_cell_onC
[CMW] 打开 LTE 小区信号
Inputs: alias, params_json. Returns: result
cmw_cell_stateCRead-only
[CMW] 查询小区状态
Inputs: alias, params_json. Returns: result
cmw_cell_state_allBRead-only
[CMW] 查询小区完整状态(含调整状态)
Inputs: alias, params_json. Returns: result
cmw_clsC
[CMW] 清除仪器状态
Inputs: alias, params_json. Returns: result
cmw_connect_ueB
[CMW] 连接 UE(建立 RRC 连接)
Inputs: alias, params_json. Returns: result
cmw_disconnect_ueC
[CMW] 断开 UE 连接
Inputs: alias, params_json. Returns: result
cmw_get_errorCRead-only
[CMW] 读取 CMW 错误队列
Inputs: alias, params_json. Returns: result
cmw_init_measurementD
[CMW] 触发测量
Inputs: alias, params_json. Returns: result
cmw_memory_catalogCRead-only
[CMW] 查询仪器内部文件目录
Inputs: alias, params_json. Returns: result
cmw_opcCRead-only
[CMW] 等待操作完成
Inputs: alias, params_json. Returns: result
cmw_optCRead-only
[CMW] 读取仪器选项列表
Inputs: alias, params_json. Returns: result
cmw_presetCDestructive
[CMW] 恢复 CMW500 到预设状态
Inputs: alias, params_json. Returns: result
cmw_query_connection_stateCRead-only
[CMW] 查询 UE 连接状态
Inputs: alias, params_json. Returns: result
cmw_query_dl_frequencyCRead-only
[CMW] 查询下行频率
Inputs: alias, params_json. Returns: result
cmw_query_ul_frequencyCRead-only
[CMW] 查询上行频率
Inputs: alias, params_json. Returns: result
cmw_recall_stateBDestructive
[CMW] 从文件加载仪器状态
Inputs: alias, params_json. Returns: result
cmw_set_bandC
[CMW] 设置 LTE 频段(如 OB1, OB3, OB7, OB38, OB40, OB41)
Inputs: alias, params_json. Returns: result
cmw_set_bandwidthC
[CMW] 设置 LTE 信道带宽(RB数格式:B100=20MHz, B50=10MHz, B25=5MHz, B15=3MHz, B6=1.4MHz)
Inputs: alias, params_json. Returns: result
cmw_set_dl_channelC
[CMW] 设置下行信道号
Inputs: alias, params_json. Returns: result
cmw_set_input_attenuationD
[CMW] 设置输入衰减
Inputs: alias, params_json. Returns: result
cmw_set_meas_portC
[CMW] 设置测量信号路径/端口
Inputs: alias, params_json. Returns: result
cmw_set_sign_portC
[CMW] 设置信令信号路径/端口
Inputs: alias, params_json. Returns: result
cmw_set_tpc_modeC
[CMW] 设置上行功率控制模式
Inputs: alias, params_json. Returns: result
cmw_set_ul_channelC
[CMW] 设置上行信道号
Inputs: alias, params_json. Returns: result
cmw_tstCRead-only
[CMW] 自检
Inputs: alias, params_json. Returns: result
connectA
连接 VISA 仪器。必须先连接才能使用其他命令。
使用示例:
连接 MXA: connect(address="TCPIP::192.168.1.100::INSTR", alias="mxa")
连接 CMW500: connect(address="TCPIP::172.22.1.3::INSTR", alias="cmw")
连接电源: connect(address="GPIB0::5::INSTR", alias="ps")
Args: address: VISA 地址,如 "TCPIP::IP::INSTR" 或 "GPIB0::5::INSTR" instrument_type: 仪器类型,设为 "auto" 自动识别,或指定 "mxa"/"cmw"/"keysight_ps" alias: 会话别名,后续命令通过此别名引用仪器,如 "mxa"/"cmw"/"ps"
Inputs: address (required), instrument_type, alias. Returns: result
debug_last_errorB
调试最后一个失败的命令,读取仪器错误队列。
使用场景: 命令执行失败后排查原因
Inputs: alias. Returns: result
disconnectA
断开指定别名的仪器连接。
Args: alias: 要断开的仪器别名,如 "mxa"/"cmw"/"ps"
Inputs: alias. Returns: result
discover_my_instrumentB
识别已连接仪器的型号,并推荐可用命令。
使用场景: 连接后确认仪器型号,查看推荐命令
Inputs: alias. Returns: result
esrCRead-only
[GENERIC] 读取事件状态寄存器(*ESR?)
Inputs: alias, params_json. Returns: result
explore_scpiA
探索性发送 SCPI 命令,用于学习和发现仪器支持的命令。
使用场景:
仪器型号未知,需要探索支持的命令
内置命令不够用,需要发现新功能
命令语法不确定,需要验证
工作流程:
先用 explore_scpi(command="*IDN?", query=True) 确认通信
尝试发送各种命令探索功能
成功的命令用 save_learned_command() 保存
Args: alias: 已连接仪器的别名,如 "mxa"/"cmw" command: SCPI 命令字符串,如 "FREQ:CENT?" 或 "*OPT?" query: 是否为查询命令(命令以 ? 结尾时自动识别)
Inputs: alias, command, query. Returns: result
get_available_toolsA
列出当前可用的所有仪器命令。
使用场景:
连接仪器后查看支持哪些命令
确认某个命令是否存在
Args: instrument_type: 指定仪器类型过滤,如 "mxa"/"cmw",留空显示全部
Inputs: instrument_type. Returns: result
get_historyA
查看最近的命令执行历史,用于调试。
Args: limit: 返回最近多少条记录
Inputs: limit. Returns: result
idnCRead-only
[CMW] 读取仪器标识信息
Inputs: alias, params_json. Returns: result
init_project_commandsA
初始化项目命令目录,复制内置 YAML 到当前项目的 .instrument_mcp/。
使用场景:
新项目开始使用 instrument-mcp
需要自定义或扩展仪器命令
团队协作时统一命令配置
执行后:
创建 .instrument_mcp/ 目录
复制所有内置 YAML 文件(mxa.yaml, cmw.yaml 等)
可直接编辑这些文件添加自定义命令
新命令会追加到对应文件
Inputs: no named parameters. Returns: result
list_learned_commandsA
列出当前项目中已保存的自定义命令文件。
Inputs: no named parameters. Returns: result
list_sessionsA
列出当前所有已连接的仪器别名。
Inputs: no named parameters. Returns: result
mxa_clsC
[MXA] 清除仪器状态(*CLS)
Inputs: alias, params_json. Returns: result
mxa_config_harmonicsC
[MXA] 配置谐波测量模式
Inputs: alias, params_json. Returns: result
mxa_fetch_harmonicsBRead-only
[MXA] 读取谐波幅度值(返回 10 个值,H1 为 dBm,其余为 dBc)
Inputs: alias, params_json. Returns: result
mxa_get_errorCRead-only
[MXA] 读取仪器错误队列
Inputs: alias, params_json. Returns: result
mxa_marker_offC
[MXA] 关闭所有标记点
Inputs: alias, params_json. Returns: result
mxa_marker_table_onC
[MXA] 打开标记表显示
Inputs: alias, params_json. Returns: result
mxa_opcCRead-only
[MXA] 等待操作完成
Inputs: alias, params_json. Returns: result
mxa_optimize_rangeB
[MXA] 优化功率范围(自动调整衰减和参考电平)
Inputs: alias, params_json. Returns: result
mxa_peak_leftCRead-only
[MXA] 搜索左侧峰值
Inputs: alias, params_json. Returns: result
mxa_peak_nextDRead-only
[MXA] 搜索下一个峰值
Inputs: alias, params_json. Returns: result
mxa_peak_rightCRead-only
[MXA] 搜索右侧峰值
Inputs: alias, params_json. Returns: result
mxa_peak_searchCRead-only
[MXA] 执行峰值搜索并返回峰值幅度
Inputs: alias, params_json. Returns: result
mxa_presetBDestructive
[MXA] 恢复仪器到预设状态(*RST),会清除所有当前设置和测量数据
Inputs: alias, params_json. Returns: result
mxa_query_frequencyCRead-only
[MXA] 查询频率参数
Inputs: alias, params_json. Returns: result
mxa_query_sweep_timeDRead-only
[MXA] 查询扫描时间
Inputs: alias, params_json. Returns: result
mxa_read_marker_xBRead-only
[MXA] 读取当前标记点的频率值
Inputs: alias, params_json. Returns: result
mxa_read_marker_yBRead-only
[MXA] 读取当前标记点的幅度值
Inputs: alias, params_json. Returns: result
mxa_read_traceBRead-only
[MXA] 读取当前迹线的数据点(ASCII 格式)
Inputs: alias, params_json. Returns: result
mxa_recall_stateCDestructive
[MXA] 从寄存器调用仪器状态
Inputs: alias, params_json. Returns: result
mxa_save_stateB
[MXA] 保存仪器状态到寄存器
Inputs: alias, params_json. Returns: result
mxa_select_saC
[MXA] 选择频谱分析模式(Spectrum Analyzer)
Inputs: alias, params_json. Returns: result
mxa_set_attenuationC
[MXA] 设置输入衰减器
Inputs: alias, params_json. Returns: result
mxa_set_average_typeC
[MXA] 设置平均类型
Inputs: alias, params_json. Returns: result
mxa_set_averagingC
[MXA] 设置平均次数
Inputs: alias, params_json. Returns: result
mxa_set_detectorD
[MXA] 设置检波器类型
Inputs: alias, params_json. Returns: result
mxa_set_freq_start_stopC
[MXA] 设置起始和终止频率
Inputs: alias, params_json. Returns: result
mxa_set_frequencyC
[MXA] 设置中心频率和频率扫宽
Inputs: alias, params_json. Returns: result
mxa_set_harm_averageD
[MXA] 设置谐波平均
Inputs: alias, params_json. Returns: result
mxa_set_harm_average_countD
[MXA] 设置谐波平均次数
Inputs: alias, params_json. Returns: result
mxa_set_harm_bwC
[MXA] 设置谐波测量带宽
Inputs: alias, params_json. Returns: result
mxa_set_harm_numberC
[MXA] 设置谐波数量
Inputs: alias, params_json. Returns: result
mxa_set_harm_sweep_autoD
[MXA] 设置谐波扫描时间自动
Inputs: alias, params_json. Returns: result
mxa_set_harm_sweep_dwellC
[MXA] 设置谐波扫描驻留时间
Inputs: alias, params_json. Returns: result
mxa_set_harm_trace_typeC
[MXA] 设置谐波迹线类型
Inputs: alias, params_json. Returns: result
mxa_set_harm_triggerC
[MXA] 设置谐波触发源
Inputs: alias, params_json. Returns: result
mxa_set_rbwC
[MXA] 设置分辨率带宽(RBW)
Inputs: alias, params_json. Returns: result
mxa_set_ref_levelD
[MXA] 设置参考电平
Inputs: alias, params_json. Returns: result
mxa_set_sweep_pointsC
[MXA] 设置扫描点数
Inputs: alias, params_json. Returns: result
mxa_set_trace_modeC
[MXA] 设置迹线模式
Inputs: alias, params_json. Returns: result
mxa_set_vbwC
[MXA] 设置视频带宽(VBW)
Inputs: alias, params_json. Returns: result
mxa_sweep_continuousC
[MXA] 设置为连续扫描模式
Inputs: alias, params_json. Returns: result
mxa_sweep_immC
[MXA] 立即触发单次扫描
Inputs: alias, params_json. Returns: result
mxa_sweep_singleCRead-only
[MXA] 执行单次扫描并等待完成
Inputs: alias, params_json. Returns: result
opcCRead-only
[GENERIC] 等待操作完成(*OPC?)
Inputs: alias, params_json. Returns: result
ps_clear_protC
[KEYSIGHT_PS] 清除保护状态
Inputs: alias, params_json. Returns: result
ps_clsC
[KEYSIGHT_PS] 清除仪器状态
Inputs: alias, params_json. Returns: result
ps_get_currentBRead-only
[KEYSIGHT_PS] 查询设定电流限制
Inputs: alias, params_json. Returns: result
ps_get_errorCRead-only
[KEYSIGHT_PS] 读取错误队列
Inputs: alias, params_json. Returns: result
ps_get_ocpBRead-only
[KEYSIGHT_PS] 查询过流保护值
Inputs: alias, params_json. Returns: result
ps_get_output_stateCRead-only
[KEYSIGHT_PS] 查询输出状态
Inputs: alias, params_json. Returns: result
ps_get_ovpCRead-only
[KEYSIGHT_PS] 查询过压保护值
Inputs: alias, params_json. Returns: result
ps_get_rangeCRead-only
[KEYSIGHT_PS] 查询电压量程
Inputs: alias, params_json. Returns: result
ps_get_senseCRead-only
[KEYSIGHT_PS] 查询感测模式
Inputs: alias, params_json. Returns: result
ps_get_voltageCRead-only
[KEYSIGHT_PS] 查询设定电压值
Inputs: alias, params_json. Returns: result
ps_meas_currentCRead-only
[KEYSIGHT_PS] 测量实际输出电流
Inputs: alias, params_json. Returns: result
ps_meas_powerCRead-only
[KEYSIGHT_PS] 测量实际输出功率
Inputs: alias, params_json. Returns: result
ps_meas_voltageBRead-only
[KEYSIGHT_PS] 测量实际输出电压
Inputs: alias, params_json. Returns: result
ps_opcCRead-only
[KEYSIGHT_PS] 等待操作完成
Inputs: alias, params_json. Returns: result
ps_output_offC
[KEYSIGHT_PS] 关闭输出
Inputs: alias, params_json. Returns: result
ps_output_onC
[KEYSIGHT_PS] 开启输出
Inputs: alias, params_json. Returns: result
ps_presetCDestructive
[KEYSIGHT_PS] 恢复电源预设状态
Inputs: alias, params_json. Returns: result
ps_set_currentC
[KEYSIGHT_PS] 设置电流限制(A)
Inputs: alias, params_json. Returns: result
ps_set_ocpC
[KEYSIGHT_PS] 设置过流保护(OCP)
Inputs: alias, params_json. Returns: result
ps_set_ovpC
[KEYSIGHT_PS] 设置过压保护(OVP)
Inputs: alias, params_json. Returns: result
ps_set_rangeC
[KEYSIGHT_PS] 设置电压量程
Inputs: alias, params_json. Returns: result
ps_set_senseC
[KEYSIGHT_PS] 设置远端/本地感测
Inputs: alias, params_json. Returns: result
ps_set_voltageC
[KEYSIGHT_PS] 设置输出电压(V)
Inputs: alias, params_json. Returns: result
save_learned_commandA
将探索成功的 SCPI 命令保存为可复用的 MCP 工具。
保存规则:
按 instrument_type 保存到 .instrument_mcp/{instrument_type}.yaml
如果该仪器有内置 YAML,会先复制作为基础再追加
同名命令会自动更新而非重复
重启 MCP Server 后自动加载
使用场景:
用 explore_scpi 发现新命令后保存
为常用命令创建快捷方式
团队协作时共享命令配置
参数格式示例:
params_json: '[{"name":"freq_hz","type":"number","description":"频率(Hz)","default":1000000000}]'
Args: name: 命令名称,如 "mxa_set_peak_threshold" description: 命令功能描述 scpi_template: SCPI 模板,如 "FREQ:CENT {freq_hz}" 或 "*IDN?" instrument_type: 仪器类型,如 "mxa"/"cmw"/"keysight_ps" params_json: 参数定义 JSON 数组字符串 is_query: 是否为查询命令(返回数据的命令)
Inputs: name, description, scpi_template, instrument_type, +2 more. Returns: result
scpi_queryCRead-only
[GENERIC] 发送任意 SCPI 查询命令并读取响应
Inputs: alias, params_json. Returns: result
scpi_writeC
[GENERIC] 发送任意 SCPI 写命令
Inputs: alias, params_json. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 110 tools
Tools are generally distinct within each instrument prefix (cmw_, mxa_, ps_), but there are many duplicate generic tools (cls, opc) alongside instrument-specific versions, causing potential confusion. Agent may struggle to choose between 'cls' and 'cmw_cls'.
Naming is inconsistent: instrument-specific tools follow a prefix_verb_noun pattern, but generic tools and admin functions (e.g., debug_last_error, explore_scpi) use different styles without prefix. Mix of snake_case and compound words.
110 tools is excessive. Many are redundant (generic vs. instrument-specific commands) or overly granular (e.g., numerous harmonic settings for MXA). The count overwhelms the intended scope of SCPI instrument control.
Covers basic SCPI operations for three instrument families, including discovery and custom command saving. Generic scpi_query/scpi_write fill most gaps, though advanced configurations for each instrument are limited.
Maintenance
Related MCP Connectors
Drive real Android & iOS devices and web browsers from natural language for mobile + web QA. 290+ tools across device control, app management, automation sessions, browser automation, and flow recording / replay. Bearer-auth — get a token at robotactions.com → Profile → API Tokens.
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.
Build and run agents and automations across hundreds of apps using natural language.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables remote control of LeCroy oscilloscopes via SCPI commands over LAN to perform waveform capture, screenshots, measurements, channel configuration, and triggering through natural language. Supports multiple LeCroy models including WaveSurfer, HDO, WaveRunner, and WavePro series with automatic model detection.4811AGPL 3.0
- AlicenseNot gradedqualityDmaintenanceConnects test and measurement instruments (oscilloscope, logic analyzer, multimeter, power supply) to AI via MCP, enabling natural language control and automated analysis.MIT
- 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
- FlicenseNot gradedqualityBmaintenanceEnables unified discovery, query, and control of laboratory instruments (power supplies, oscilloscopes, signal generators, multimeters) via VISA/SCPI, with device-specific libraries and an MCP server exposing 19 tools for natural language interaction.-