labmcp-bench-psu 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .venv/
4
+ .pytest_cache/
5
+ .ruff_cache/
6
+ dist/
7
+ build/
8
+ *.egg-info/
9
+ .DS_Store
10
+ *.jsonl
11
+ !**/fixtures/*.jsonl
12
+ .idea/
13
+ .vscode/
14
+
15
+ CLAUDE.md
@@ -0,0 +1,127 @@
1
+ Metadata-Version: 2.5
2
+ Name: labmcp-bench-psu
3
+ Version: 0.1.0
4
+ Summary: MCP server for programmable DC bench power supplies (Rigol DP700/DP800/DP900, Siglent SPD3303X/SPD1000X, Aim-TTi CPX/MX/QL/PL-P): set, measure, switch outputs, OVP/OCP.
5
+ Project-URL: Homepage, https://github.com/K-Dense-AI/lab-instrument-mcps/tree/main/servers/engineering/bench-power-supply
6
+ Author: K-Dense and LabMCP contributors
7
+ License-Expression: Apache-2.0
8
+ Keywords: aim-tti,lab-instrument,mcp,power-supply,rigol,scpi,siglent,visa
9
+ Requires-Python: >=3.10
10
+ Requires-Dist: labmcp[visa]<0.2,>=0.1
11
+ Description-Content-Type: text/markdown
12
+
13
+ # Bench DC Power Supply โ€” MCP Server
14
+
15
+ <!-- mcp-name: io.github.K-Dense-AI/labmcp-bench-psu -->
16
+
17
+ Let an AI agent set voltages and current limits, switch outputs on and off, watch constant-voltage / constant-current behaviour and configure over-voltage / over-current protection on **programmable DC bench power supplies** from **Rigol**, **Siglent** and **Aim-TTi**, using each vendor's documented remote command set. The dialect is detected from `*IDN?`.
18
+
19
+ | | |
20
+ |---|---|
21
+ | **Package** | `labmcp-bench-psu` |
22
+ | **Instruments** | Rigol DP832/DP832A, DP831, DP822, DP821, DP811, DP813, DP711, DP712, DP932A/U/E; Siglent SPD3303X/X-E, SPD1168X, SPD1305X; Aim-TTi CPX400D/DP, MX100T/TP, MX180T/TP, QL355/QL564 (P, T/TP), PL-P (PL068/155/303/601, PL303QMD/QMT) |
23
+ | **Interfaces** | USB (USB-TMC via VISA, or virtual COM on Aim-TTi), LAN (VISA/VXI-11 or raw socket), RS-232, GPIB via VISA |
24
+ | **Protocol** | SCPI ([Rigol DP800 Programming Guide](https://www.rigol.com/dam/global/downloads/brochures/en/program-guide/dc-powers/DP800_ProgrammingGuide_EN.pdf), [DP700](https://www.rigol.com/dam/global/downloads/brochures/en/program-guide/dc-powers/DP700_ProgrammingGuide_EN.pdf), [DP900](https://www.rigol.com/dam/global/downloads/brochures/en/program-guide/dc-powers/DP900_ProgrammingGuide_en.pdf); [Siglent SPD3303X Quick Start](https://siglentna.com/wp-content/uploads/dlm_uploads/2022/11/SPD3303X_QuickStart_E02A.pdf), [SPD1000X User Manual](https://siglentna.com/wp-content/uploads/dlm_uploads/2025/06/SPD1000X_UserManual_E03B_0613.pdf)) and Aim-TTi remote commands ([CPX400D/DP manual](https://resources.aimtti.com/manuals/CPX400D+DP_Instruction_Manual_EN_48511-1480_14.pdf), [MX100T/TP manual](https://resources.aimtti.com/manuals/MX100T+MX100TP_Instruction_Manual-Iss6.pdf), [manuals index](https://resources.aimtti.com/manuals/)) |
25
+ | **Status** | ๐Ÿงช **simulated**: tested against wire-level simulators of each dialect driving a resistive load, not yet verified on hardware. [Report a hardware test](https://github.com/K-Dense-AI/lab-instrument-mcps/issues/new?template=hardware-verification.yml) |
26
+
27
+ > **Keysight / Agilent and Rohde & Schwarz supplies** are intentionally not covered: both vendors publish official MCP servers. Use the [Keysight MCP Server for Instrument Control](https://www.keysight.com/us/en/lib/resources/software-releases/keysight-mcp-server-for-instrument-control.html) or the MCP server included in [Rohde & Schwarz RsInstrument](https://github.com/Rohde-Schwarz/RsInstrument). This server refuses to connect to them.
28
+
29
+ ## Try it without hardware
30
+
31
+ ```bash
32
+ uvx labmcp-bench-psu --simulate --check # Rigol DP832
33
+ uvx labmcp-bench-psu --simulate --option dialect=siglent --check # Siglent SPD3303X
34
+ uvx labmcp-bench-psu --simulate --option dialect=tti --option sim_model=MX100TP --check
35
+ ```
36
+
37
+ The simulated outputs drive resistive loads (CH1 10 ฮฉ, CH2 100 ฮฉ, CH3 open), so you can watch the CV โ†’ CC crossover and trip OVP/OCP.
38
+
39
+ ## Connect your instrument
40
+
41
+ 1. **Instrument setup:** enable the interface you use (Rigol: Utility โ†’ I/O Config; Siglent: System โ†’ Interface; Aim-TTi: LAN works out of the box, USB appears as a virtual COM port). Note the IP address or VISA resource string.
42
+ 2. **Find the address:** `uvx labmcp ports` (serial) or `python -m pyvisa info` / your VISA vendor's tool (USB/LAN).
43
+ 3. **Test the connection:**
44
+ ```bash
45
+ uvx labmcp-bench-psu --address "USB0::0x1AB1::0x0E11::DP8C123456789::INSTR" --check # Rigol over USB-TMC
46
+ uvx labmcp-bench-psu --address "TCPIP0::192.168.1.50::INSTR" --check # any LXI/VXI-11 supply
47
+ uvx labmcp-bench-psu --address tcp://192.168.1.51:5025 --check # Siglent raw socket
48
+ uvx labmcp-bench-psu --address tcp://192.168.1.52:9221 --check # Aim-TTi raw socket
49
+ uvx labmcp-bench-psu --address /dev/ttyACM0 --check # Aim-TTi USB virtual COM
50
+ uvx labmcp-bench-psu --address "serial://COM3?write_termination=CRLF" --check # Rigol DP800 RS-232
51
+ ```
52
+ USB-TMC and VXI-11 addresses use PyVISA (installed with this package; add `?backend=@ivi` to use NI-VISA / Keysight IO Libraries instead of pyvisa-py).
53
+
54
+ ## Add to your MCP client
55
+
56
+ **Claude Code**
57
+ ```bash
58
+ claude mcp add psu -- uvx labmcp-bench-psu --address "TCPIP0::192.168.1.50::INSTR" --limit max_voltage_v=12 --limit max_current_a=1
59
+ ```
60
+
61
+ **Claude Desktop / Cursor / Windsurf** (`claude_desktop_config.json`, `.cursor/mcp.json`, โ€ฆ)
62
+ ```json
63
+ {
64
+ "mcpServers": {
65
+ "psu": {
66
+ "command": "uvx",
67
+ "args": ["labmcp-bench-psu", "--address", "TCPIP0::192.168.1.50::INSTR",
68
+ "--limit", "max_voltage_v=12", "--limit", "max_current_a=1"]
69
+ }
70
+ }
71
+ }
72
+ ```
73
+
74
+ Add `--read-only` to allow monitoring only: setpoint changes and `output_on` are hidden, while `output_off` and `all_outputs_off` stay available. For other clients, generate the snippet with `uvx labmcp config bench-psu --address TCPIP0::192.168.1.50::INSTR --client vscode`.
75
+
76
+ ## Tools
77
+
78
+ <!-- TOOLS:START -->
79
+ | Tool | Kind | Description |
80
+ |---|---|---|
81
+ | `all_outputs_off` | ๐Ÿ›‘ safety | Switch every output OFF (emergency stop for the whole supply). Each channel is switched individually and read back where the instrument supports it. |
82
+ | `clear_protection_trip` | ๐ŸŽ› control | Clear an OVP/OCP trip after fixing its cause. The output stays OFF; use `output_on` to re-energise. On Aim-TTi supplies this clears trips on all outputs. |
83
+ | `get_command_log` | ๐Ÿ‘ read | Return the most recent raw commands sent to / replies received from the instrument (newest last). Useful for debugging and for recording what was done. |
84
+ | `get_connection_info` | ๐Ÿ‘ read | Report which instrument is connected (identity, address, simulated or real), whether the server is read-only, and the active safety limits. Call this first. |
85
+ | `get_errors` | ๐Ÿ‘ read | Read (and clear) the instrument's error queue / error registers. Empty list = no errors. |
86
+ | `get_outputs` | ๐Ÿ‘ read | Report each channel: voltage and current-limit setpoints, measured voltage/current/power, output on/off, CV/CC mode, and OVP/OCP levels and trip state where the model supports them. |
87
+ | `output_off` | ๐Ÿ›‘ safety | Switch a channel's output OFF. Safe to call at any time. |
88
+ | `output_on` | โš ๏ธ hazard | Switch a channel's output ON, energising the connected load at the present setpoints. The setpoints are read back first and the output is refused if they exceed the safety limits (e.g. after someone changed them on the front panel). |
89
+ | `reconnect` | ๐Ÿ›‘ safety | Close and re-open the connection to the instrument (e.g. after it was power cycled or a cable was re-plugged). |
90
+ | `set_current_limit` | ๐ŸŽ› control | Set a channel's current limit (the constant-current setpoint). Refused above `max_current_a` (checked even with the output off) or above the channel's range. |
91
+ | `set_protection` | ๐ŸŽ› control | Set over-voltage (OVP) and/or over-current (OCP) protection for a channel. When exceeded, the supply switches the output off. Rigol: levels + on/off; Aim-TTi CPX/QL/PL-P: levels (always armed), MX: levels + on/off; Siglent SPD1000X: levels only; SPD3303X: not available. |
92
+ | `set_voltage` | ๐ŸŽ› control | Set a channel's voltage setpoint. Refused above `max_voltage_v` (checked even with the output off) or above the channel's range. If the output is on, the load sees the new voltage at once. |
93
+ <!-- TOOLS:END -->
94
+
95
+ `get_connection_info`, `get_command_log` and `reconnect` are built into every LabMCP server.
96
+
97
+ ## Safety limits
98
+
99
+ | Limit | Default | Meaning |
100
+ |---|---|---|
101
+ | `max_voltage_v` | 30 V | Largest voltage setpoint (magnitude) on any channel. Checked when setting the voltage, **even with the output off**, and again before `output_on` |
102
+ | `max_current_a` | 3 A | Largest current-limit setpoint on any channel, checked the same way |
103
+
104
+ Override at launch, e.g. `--limit max_voltage_v=12 --limit max_current_a=0.5`. Setpoints are also checked against each model's settable range. `output_on` reads the setpoints back from the instrument first, so a value changed on the front panel cannot slip past the limits.
105
+
106
+ ## Example prompts
107
+
108
+ - "Show me all channels of the power supply: setpoints, measured current and whether they're in CV or CC."
109
+ - "Set CH1 to 12 V with a 200 mA current limit, set OVP at 13 V, then turn it on and tell me how much current the LED array draws."
110
+ - "Ramp CH2 from 0 to 5 V in 0.5 V steps, reading the current at each step, and plot the I-V curve of the load."
111
+ - "The heater is drawing more than expected: turn every output off now."
112
+ - "Channel 1 tripped. What happened, and is it safe to clear the trip?"
113
+
114
+ ## Notes
115
+
116
+ - **Dialect detection:** `*IDN?` manufacturer "RIGOL" โ†’ Rigol, "Siglent" โ†’ Siglent, "THURLBY THANDAR"/"TTi"/"Aim" โ†’ Aim-TTi. Force one with `--option dialect=rigol|siglent|tti` for rebadged units. Models not in the built-in table are treated as `--option channels=N` channels with no model maxima (the safety limits still apply).
117
+ - **Rigol:** setpoints via `:SOUR<n>:VOLT/CURR`, readback via `:APPL? CHn` and `:MEAS:ALL? CHn`, mode via `:OUTP:MODE? CHn` (CV/CC/UR), OVP/OCP via `:OUTP:OVP|OCP[:STAT|:VAL|:QUES?]`. Trips are cleared with `:OUTP:OVP|OCP:CLEAR`, which only clears the flag. `[:SOUR]:VOLT:PROT:CLE` is never sent because the programming guide says it also turns the output on. DP831 CH3 is a negative output: give negative voltages (not yet verified on hardware). Over RS-232 the DP800 needs CR LF line endings (`?write_termination=CRLF`).
118
+ - **Siglent:** SPD3303X/X-E have **no** programmable OVP/OCP and report output state and CV/CC only through the `SYST:STAT?` status word (CH1/CH2). CH3 is fixed (2.5/3.3/5 V by front-panel switch) and can only be switched on/off; its state is not readable. SPD1000X has OVP/OCP levels only (always armed, trip state not readable). The error reply format (`0 No Error`) is not SCPI-standard, so settings are verified by reading them back. The server pauses 0.1 s after each command to Siglent supplies (`--option write_delay_s=` to change); Siglent's own examples wait between commands, but the required delay is not documented.
119
+ - **Aim-TTi:** there is no live CV/CC query, so `mode` is inferred from readback vs setpoints (`mode_source: "inferred"`). Trip flags come from the `LSR<n>?` limit event register, which latches events and is cleared by reading it. CPX/QL/PL-P protection is always armed (levels only); MX models can also switch OVP/OCP on/off. `TRIPRST` clears trips on all outputs (not documented for MX100T/TP). Original QL P/T models have no output-state query, so their `output_on` is reported as unknown. `OPALL 0` is sent first in `all_outputs_off`, then every output individually.
120
+ - Tracking / series / parallel modes, timers, sequences, remote sense and saved set-ups are not exposed. Put the supply in independent mode before handing it to an agent.
121
+ - GW Instek GPP and B&K Precision 9130/9140 supplies are not supported yet: too many reply formats are undocumented in their manuals to implement them safely.
122
+
123
+ ## Hardware verification
124
+
125
+ | Model | Firmware | Interface | Verified by | Date |
126
+ |---|---|---|---|---|
127
+ | *none yet: [be the first](https://github.com/K-Dense-AI/lab-instrument-mcps/issues/new?template=hardware-verification.yml)* | | | | |
@@ -0,0 +1,115 @@
1
+ # Bench DC Power Supply โ€” MCP Server
2
+
3
+ <!-- mcp-name: io.github.K-Dense-AI/labmcp-bench-psu -->
4
+
5
+ Let an AI agent set voltages and current limits, switch outputs on and off, watch constant-voltage / constant-current behaviour and configure over-voltage / over-current protection on **programmable DC bench power supplies** from **Rigol**, **Siglent** and **Aim-TTi**, using each vendor's documented remote command set. The dialect is detected from `*IDN?`.
6
+
7
+ | | |
8
+ |---|---|
9
+ | **Package** | `labmcp-bench-psu` |
10
+ | **Instruments** | Rigol DP832/DP832A, DP831, DP822, DP821, DP811, DP813, DP711, DP712, DP932A/U/E; Siglent SPD3303X/X-E, SPD1168X, SPD1305X; Aim-TTi CPX400D/DP, MX100T/TP, MX180T/TP, QL355/QL564 (P, T/TP), PL-P (PL068/155/303/601, PL303QMD/QMT) |
11
+ | **Interfaces** | USB (USB-TMC via VISA, or virtual COM on Aim-TTi), LAN (VISA/VXI-11 or raw socket), RS-232, GPIB via VISA |
12
+ | **Protocol** | SCPI ([Rigol DP800 Programming Guide](https://www.rigol.com/dam/global/downloads/brochures/en/program-guide/dc-powers/DP800_ProgrammingGuide_EN.pdf), [DP700](https://www.rigol.com/dam/global/downloads/brochures/en/program-guide/dc-powers/DP700_ProgrammingGuide_EN.pdf), [DP900](https://www.rigol.com/dam/global/downloads/brochures/en/program-guide/dc-powers/DP900_ProgrammingGuide_en.pdf); [Siglent SPD3303X Quick Start](https://siglentna.com/wp-content/uploads/dlm_uploads/2022/11/SPD3303X_QuickStart_E02A.pdf), [SPD1000X User Manual](https://siglentna.com/wp-content/uploads/dlm_uploads/2025/06/SPD1000X_UserManual_E03B_0613.pdf)) and Aim-TTi remote commands ([CPX400D/DP manual](https://resources.aimtti.com/manuals/CPX400D+DP_Instruction_Manual_EN_48511-1480_14.pdf), [MX100T/TP manual](https://resources.aimtti.com/manuals/MX100T+MX100TP_Instruction_Manual-Iss6.pdf), [manuals index](https://resources.aimtti.com/manuals/)) |
13
+ | **Status** | ๐Ÿงช **simulated**: tested against wire-level simulators of each dialect driving a resistive load, not yet verified on hardware. [Report a hardware test](https://github.com/K-Dense-AI/lab-instrument-mcps/issues/new?template=hardware-verification.yml) |
14
+
15
+ > **Keysight / Agilent and Rohde & Schwarz supplies** are intentionally not covered: both vendors publish official MCP servers. Use the [Keysight MCP Server for Instrument Control](https://www.keysight.com/us/en/lib/resources/software-releases/keysight-mcp-server-for-instrument-control.html) or the MCP server included in [Rohde & Schwarz RsInstrument](https://github.com/Rohde-Schwarz/RsInstrument). This server refuses to connect to them.
16
+
17
+ ## Try it without hardware
18
+
19
+ ```bash
20
+ uvx labmcp-bench-psu --simulate --check # Rigol DP832
21
+ uvx labmcp-bench-psu --simulate --option dialect=siglent --check # Siglent SPD3303X
22
+ uvx labmcp-bench-psu --simulate --option dialect=tti --option sim_model=MX100TP --check
23
+ ```
24
+
25
+ The simulated outputs drive resistive loads (CH1 10 ฮฉ, CH2 100 ฮฉ, CH3 open), so you can watch the CV โ†’ CC crossover and trip OVP/OCP.
26
+
27
+ ## Connect your instrument
28
+
29
+ 1. **Instrument setup:** enable the interface you use (Rigol: Utility โ†’ I/O Config; Siglent: System โ†’ Interface; Aim-TTi: LAN works out of the box, USB appears as a virtual COM port). Note the IP address or VISA resource string.
30
+ 2. **Find the address:** `uvx labmcp ports` (serial) or `python -m pyvisa info` / your VISA vendor's tool (USB/LAN).
31
+ 3. **Test the connection:**
32
+ ```bash
33
+ uvx labmcp-bench-psu --address "USB0::0x1AB1::0x0E11::DP8C123456789::INSTR" --check # Rigol over USB-TMC
34
+ uvx labmcp-bench-psu --address "TCPIP0::192.168.1.50::INSTR" --check # any LXI/VXI-11 supply
35
+ uvx labmcp-bench-psu --address tcp://192.168.1.51:5025 --check # Siglent raw socket
36
+ uvx labmcp-bench-psu --address tcp://192.168.1.52:9221 --check # Aim-TTi raw socket
37
+ uvx labmcp-bench-psu --address /dev/ttyACM0 --check # Aim-TTi USB virtual COM
38
+ uvx labmcp-bench-psu --address "serial://COM3?write_termination=CRLF" --check # Rigol DP800 RS-232
39
+ ```
40
+ USB-TMC and VXI-11 addresses use PyVISA (installed with this package; add `?backend=@ivi` to use NI-VISA / Keysight IO Libraries instead of pyvisa-py).
41
+
42
+ ## Add to your MCP client
43
+
44
+ **Claude Code**
45
+ ```bash
46
+ claude mcp add psu -- uvx labmcp-bench-psu --address "TCPIP0::192.168.1.50::INSTR" --limit max_voltage_v=12 --limit max_current_a=1
47
+ ```
48
+
49
+ **Claude Desktop / Cursor / Windsurf** (`claude_desktop_config.json`, `.cursor/mcp.json`, โ€ฆ)
50
+ ```json
51
+ {
52
+ "mcpServers": {
53
+ "psu": {
54
+ "command": "uvx",
55
+ "args": ["labmcp-bench-psu", "--address", "TCPIP0::192.168.1.50::INSTR",
56
+ "--limit", "max_voltage_v=12", "--limit", "max_current_a=1"]
57
+ }
58
+ }
59
+ }
60
+ ```
61
+
62
+ Add `--read-only` to allow monitoring only: setpoint changes and `output_on` are hidden, while `output_off` and `all_outputs_off` stay available. For other clients, generate the snippet with `uvx labmcp config bench-psu --address TCPIP0::192.168.1.50::INSTR --client vscode`.
63
+
64
+ ## Tools
65
+
66
+ <!-- TOOLS:START -->
67
+ | Tool | Kind | Description |
68
+ |---|---|---|
69
+ | `all_outputs_off` | ๐Ÿ›‘ safety | Switch every output OFF (emergency stop for the whole supply). Each channel is switched individually and read back where the instrument supports it. |
70
+ | `clear_protection_trip` | ๐ŸŽ› control | Clear an OVP/OCP trip after fixing its cause. The output stays OFF; use `output_on` to re-energise. On Aim-TTi supplies this clears trips on all outputs. |
71
+ | `get_command_log` | ๐Ÿ‘ read | Return the most recent raw commands sent to / replies received from the instrument (newest last). Useful for debugging and for recording what was done. |
72
+ | `get_connection_info` | ๐Ÿ‘ read | Report which instrument is connected (identity, address, simulated or real), whether the server is read-only, and the active safety limits. Call this first. |
73
+ | `get_errors` | ๐Ÿ‘ read | Read (and clear) the instrument's error queue / error registers. Empty list = no errors. |
74
+ | `get_outputs` | ๐Ÿ‘ read | Report each channel: voltage and current-limit setpoints, measured voltage/current/power, output on/off, CV/CC mode, and OVP/OCP levels and trip state where the model supports them. |
75
+ | `output_off` | ๐Ÿ›‘ safety | Switch a channel's output OFF. Safe to call at any time. |
76
+ | `output_on` | โš ๏ธ hazard | Switch a channel's output ON, energising the connected load at the present setpoints. The setpoints are read back first and the output is refused if they exceed the safety limits (e.g. after someone changed them on the front panel). |
77
+ | `reconnect` | ๐Ÿ›‘ safety | Close and re-open the connection to the instrument (e.g. after it was power cycled or a cable was re-plugged). |
78
+ | `set_current_limit` | ๐ŸŽ› control | Set a channel's current limit (the constant-current setpoint). Refused above `max_current_a` (checked even with the output off) or above the channel's range. |
79
+ | `set_protection` | ๐ŸŽ› control | Set over-voltage (OVP) and/or over-current (OCP) protection for a channel. When exceeded, the supply switches the output off. Rigol: levels + on/off; Aim-TTi CPX/QL/PL-P: levels (always armed), MX: levels + on/off; Siglent SPD1000X: levels only; SPD3303X: not available. |
80
+ | `set_voltage` | ๐ŸŽ› control | Set a channel's voltage setpoint. Refused above `max_voltage_v` (checked even with the output off) or above the channel's range. If the output is on, the load sees the new voltage at once. |
81
+ <!-- TOOLS:END -->
82
+
83
+ `get_connection_info`, `get_command_log` and `reconnect` are built into every LabMCP server.
84
+
85
+ ## Safety limits
86
+
87
+ | Limit | Default | Meaning |
88
+ |---|---|---|
89
+ | `max_voltage_v` | 30 V | Largest voltage setpoint (magnitude) on any channel. Checked when setting the voltage, **even with the output off**, and again before `output_on` |
90
+ | `max_current_a` | 3 A | Largest current-limit setpoint on any channel, checked the same way |
91
+
92
+ Override at launch, e.g. `--limit max_voltage_v=12 --limit max_current_a=0.5`. Setpoints are also checked against each model's settable range. `output_on` reads the setpoints back from the instrument first, so a value changed on the front panel cannot slip past the limits.
93
+
94
+ ## Example prompts
95
+
96
+ - "Show me all channels of the power supply: setpoints, measured current and whether they're in CV or CC."
97
+ - "Set CH1 to 12 V with a 200 mA current limit, set OVP at 13 V, then turn it on and tell me how much current the LED array draws."
98
+ - "Ramp CH2 from 0 to 5 V in 0.5 V steps, reading the current at each step, and plot the I-V curve of the load."
99
+ - "The heater is drawing more than expected: turn every output off now."
100
+ - "Channel 1 tripped. What happened, and is it safe to clear the trip?"
101
+
102
+ ## Notes
103
+
104
+ - **Dialect detection:** `*IDN?` manufacturer "RIGOL" โ†’ Rigol, "Siglent" โ†’ Siglent, "THURLBY THANDAR"/"TTi"/"Aim" โ†’ Aim-TTi. Force one with `--option dialect=rigol|siglent|tti` for rebadged units. Models not in the built-in table are treated as `--option channels=N` channels with no model maxima (the safety limits still apply).
105
+ - **Rigol:** setpoints via `:SOUR<n>:VOLT/CURR`, readback via `:APPL? CHn` and `:MEAS:ALL? CHn`, mode via `:OUTP:MODE? CHn` (CV/CC/UR), OVP/OCP via `:OUTP:OVP|OCP[:STAT|:VAL|:QUES?]`. Trips are cleared with `:OUTP:OVP|OCP:CLEAR`, which only clears the flag. `[:SOUR]:VOLT:PROT:CLE` is never sent because the programming guide says it also turns the output on. DP831 CH3 is a negative output: give negative voltages (not yet verified on hardware). Over RS-232 the DP800 needs CR LF line endings (`?write_termination=CRLF`).
106
+ - **Siglent:** SPD3303X/X-E have **no** programmable OVP/OCP and report output state and CV/CC only through the `SYST:STAT?` status word (CH1/CH2). CH3 is fixed (2.5/3.3/5 V by front-panel switch) and can only be switched on/off; its state is not readable. SPD1000X has OVP/OCP levels only (always armed, trip state not readable). The error reply format (`0 No Error`) is not SCPI-standard, so settings are verified by reading them back. The server pauses 0.1 s after each command to Siglent supplies (`--option write_delay_s=` to change); Siglent's own examples wait between commands, but the required delay is not documented.
107
+ - **Aim-TTi:** there is no live CV/CC query, so `mode` is inferred from readback vs setpoints (`mode_source: "inferred"`). Trip flags come from the `LSR<n>?` limit event register, which latches events and is cleared by reading it. CPX/QL/PL-P protection is always armed (levels only); MX models can also switch OVP/OCP on/off. `TRIPRST` clears trips on all outputs (not documented for MX100T/TP). Original QL P/T models have no output-state query, so their `output_on` is reported as unknown. `OPALL 0` is sent first in `all_outputs_off`, then every output individually.
108
+ - Tracking / series / parallel modes, timers, sequences, remote sense and saved set-ups are not exposed. Put the supply in independent mode before handing it to an agent.
109
+ - GW Instek GPP and B&K Precision 9130/9140 supplies are not supported yet: too many reply formats are undocumented in their manuals to implement them safely.
110
+
111
+ ## Hardware verification
112
+
113
+ | Model | Firmware | Interface | Verified by | Date |
114
+ |---|---|---|---|---|
115
+ | *none yet: [be the first](https://github.com/K-Dense-AI/lab-instrument-mcps/issues/new?template=hardware-verification.yml)* | | | | |
@@ -0,0 +1,34 @@
1
+ [project]
2
+ name = "labmcp-bench-psu"
3
+ version = "0.1.0"
4
+ description = "MCP server for programmable DC bench power supplies (Rigol DP700/DP800/DP900, Siglent SPD3303X/SPD1000X, Aim-TTi CPX/MX/QL/PL-P): set, measure, switch outputs, OVP/OCP."
5
+ readme = "README.md"
6
+ license = "Apache-2.0"
7
+ requires-python = ">=3.10"
8
+ authors = [{ name = "K-Dense and LabMCP contributors" }]
9
+ keywords = ["mcp", "lab-instrument", "power-supply", "scpi", "rigol", "siglent", "aim-tti", "visa"]
10
+ dependencies = ["labmcp[visa]>=0.1,<0.2"]
11
+
12
+ [project.scripts]
13
+ labmcp-bench-psu = "labmcp_bench_psu.server:main"
14
+
15
+ [project.urls]
16
+ Homepage = "https://github.com/K-Dense-AI/lab-instrument-mcps/tree/main/servers/engineering/bench-power-supply"
17
+
18
+ [tool.labmcp]
19
+ name = "Bench DC Power Supply"
20
+ domain = "engineering"
21
+ category = "Power Supplies"
22
+ vendor = "Rigol, Siglent, Aim-TTi"
23
+ models = ["Rigol DP832/DP831/DP822/DP821/DP811/DP813", "Rigol DP711/DP712", "Rigol DP932A/U/E", "Siglent SPD3303X/X-E", "Siglent SPD1168X/SPD1305X", "Aim-TTi CPX400D/DP", "Aim-TTi MX100TP/MX180TP", "Aim-TTi QL355/QL564 (P/TP)", "Aim-TTi PL-P"]
24
+ interfaces = ["USB (USB-TMC / virtual COM)", "LAN (VISA / raw socket)", "RS-232", "GPIB (via VISA)"]
25
+ protocol = "SCPI (Rigol, Siglent) and Aim-TTi remote commands"
26
+ summary = "Read setpoints and measured V/I/CV-CC per channel, set voltage and current limits, switch outputs on/off, set OVP/OCP, read errors."
27
+ status = "simulated"
28
+
29
+ [build-system]
30
+ requires = ["hatchling"]
31
+ build-backend = "hatchling.build"
32
+
33
+ [tool.hatch.build.targets.wheel]
34
+ packages = ["src/labmcp_bench_psu"]
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.K-Dense-AI/labmcp-bench-psu",
4
+ "title": "Bench DC Power Supply",
5
+ "description": "MCP server for programmable DC bench power supplies (Rigol DP700/DP800/DP900, Siglent SPD3303X/SPD10",
6
+ "version": "0.1.0",
7
+ "repository": {
8
+ "url": "https://github.com/K-Dense-AI/lab-instrument-mcps",
9
+ "source": "github",
10
+ "subfolder": "servers/engineering/bench-power-supply"
11
+ },
12
+ "websiteUrl": "https://github.com/K-Dense-AI/lab-instrument-mcps/tree/main/servers/engineering/bench-power-supply",
13
+ "packages": [
14
+ {
15
+ "registryType": "pypi",
16
+ "registryBaseUrl": "https://pypi.org",
17
+ "identifier": "labmcp-bench-psu",
18
+ "version": "0.1.0",
19
+ "transport": {
20
+ "type": "stdio"
21
+ },
22
+ "environmentVariables": [
23
+ {
24
+ "name": "LABMCP_ADDRESS",
25
+ "description": "Instrument address, e.g. serial:///dev/ttyUSB0 or tcp://192.168.1.50:5025",
26
+ "isRequired": false
27
+ },
28
+ {
29
+ "name": "LABMCP_SIMULATE",
30
+ "description": "Set to 1 to use the built-in simulator (no hardware)",
31
+ "isRequired": false
32
+ },
33
+ {
34
+ "name": "LABMCP_READ_ONLY",
35
+ "description": "Set to 1 to disable all state-changing tools",
36
+ "isRequired": false
37
+ },
38
+ {
39
+ "name": "LABMCP_LIMITS",
40
+ "description": "Safety limit overrides, e.g. max_temperature_c=80",
41
+ "isRequired": false
42
+ }
43
+ ]
44
+ }
45
+ ]
46
+ }
@@ -0,0 +1 @@
1
+ """LabMCP server for programmable DC bench power supplies (Rigol, Siglent, Aim-TTi) over SCPI / remote commands."""