Rigol DP832 Server
FreeNot checkedControls Rigol DP832 programmable power supplies via Ethernet using VISA TCP/IP, enabling AI agents to manage channels, measurements, and protection settings.
About
Controls Rigol DP832 programmable power supplies via Ethernet using VISA TCP/IP, enabling AI agents to manage channels, measurements, and protection settings.
README
A Python library and Model Context Protocol (MCP) server for controlling Rigol DP832 programmable power supplies via Ethernet connection using VISA TCP/IP.
Features
- Ethernet-only: Focused on Ethernet connections, no USB/USBTMC dependencies
- VISA TCP/IP: Uses industry-standard VISA TCP/IP for reliable communication
- Full DP832 Support: Complete control of all DP832 channels and features
- Network Discovery: Automatic discovery tools to find your DP832 on the network
- Easy to Use: Simple Python API for power supply control
- MCP Server: Model Context Protocol server for AI agent integration
- AI-Ready: Direct integration with AI assistants and automation workflows
Supported Models
- DP832: 3-channel programmable power supply (primary focus)
- DP821: 2-channel programmable power supply
- DP712: 1-channel programmable power supply
Installation
Option 1: Install via pip (Recommended)
Install directly from GitHub:
pip install git+https://github.com/amahpour/rigol_dp832_mcp_server.git
Option 2: Clone and Install
- Clone this repository:
git clone https://github.com/amahpour/rigol_dp832_mcp_server.git
cd rigol_dp832_mcp_server
- Install the package:
pip install .
Option 3: Development Install
For development with editable mode:
git clone https://github.com/amahpour/rigol_dp832_mcp_server.git
cd rigol_dp832_mcp_server
pip install -e .
Quick Start
1. Connect Your DP832
Connect your DP832 to your network via Ethernet cable and configure its IP address.
2. Find Your Device
Use the automatic discovery tool to find your DP832:
python rigol_dp832/find_dp832.py
This will scan your network and provide the exact connection string to use.
3. Use the Library
from rigol_dp832.rigol_dp import DP832
# Connect to your DP832
ps = DP832(
conn_type="VISA",
visa_resource_string="TCPIP0::192.168.1.100::5555::SOCKET"
)
# Get device information
device_id = ps.id()
print(f"Connected to: {device_id['model']}")
# Set channel 1 to 5V, 1A and turn it on
ps.set_channel_settings(channel=1, voltage=5.0, current=1.0)
ps.set_output_state(channel=1, state=True)
# Read measurements
voltage = ps.measure_voltage(1)
current = ps.measure_current(1)
print(f"Voltage: {voltage:.3f}V, Current: {current:.3f}A")
# Turn off the output
ps.set_output_state(channel=1, state=False)
# Close connection
ps.close()
MCP Server Usage
This repository includes a Model Context Protocol (MCP) server that allows AI agents to directly control your Rigol power supply. The MCP server provides a comprehensive set of tools for device discovery, connection management, channel control, measurements, and protection settings.
1. Install Dependencies
Before running the MCP server, install the required Python packages:
pip install pyvisa fastmcp
Or install from the requirements file:
pip install -r requirements.txt
Or install the package itself (which pulls in all dependencies):
pip install git+https://github.com/amahpour/rigol_dp832_mcp_server.git
2. Add the MCP Server to Your Client
Add the following to your MCP client configuration. Replace /path/to/rigol_dp832_mcp_server with the actual path where you cloned the repository.
Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"rigol-dp832": {
"command": "python3",
"args": ["/path/to/rigol_dp832_mcp_server/mcp_rigol_dp832.py"],
"env": {}
}
}
}
Claude Code (run this command):
claude mcp add --transport stdio rigol-dp832 -s user -- python3 /path/to/rigol_dp832_mcp_server/mcp_rigol_dp832.py
You can optionally set a static IP address and port via environment variables instead of relying on auto-discovery:
{
"mcpServers": {
"rigol-dp832": {
"command": "python3",
"args": ["/path/to/rigol_dp832_mcp_server/mcp_rigol_dp832.py"],
"env": {
"RIGOL_DP832_IP": "192.168.1.100",
"RIGOL_DP832_PORT": "5555"
}
}
}
}
Configuration Options:
RIGOL_DP832_IP: IP address of your power supply (optional — uses auto-discovery if not set)RIGOL_DP832_PORT: Port number (default: 5555)
3. Restart Your Client
Restart Cursor or Claude Code for the new MCP server to be picked up.
Once configured, you can interact with your power supply through natural language commands such as:
- "Connect to the power supply"
- "Set channel 1 to 5V and 1A"
- "Enable output on channel 1"
- "Measure the voltage and current on channel 1"
- "Discover available power supplies on the network"
Available MCP Tools
The MCP server provides the following tools:
Device Discovery & Connection
discover_devices()- Find all Rigol power supplies on the network (auto-discovery)test_connection(ip_address=None)- Test connection to configured device or specific IPconnect(ip_address=None, port=None)- Connect to configured device or specific IP/portdisconnect()- Disconnect from current deviceget_device_info()- Get information about connected device
Channel Control
set_channel_settings(channel, voltage, current)- Set voltage and currentget_channel_settings(channel)- Get current settingsset_output_state(channel, state)- Enable/disable outputget_output_state(channel)- Get output state
Measurements
measure_voltage(channel)- Measure voltagemeasure_current(channel)- Measure currentmeasure_all(channel)- Measure voltage, current, and power
Protection Settings
set_ocp_enabled(channel, state)- Enable/disable overcurrent protectionget_ocp_enabled(channel)- Get OCP stateset_ocp_value(channel, current_limit)- Set OCP current limitget_ocp_value(channel)- Get OCP current limitset_ovp_enabled(channel, state)- Enable/disable overvoltage protectionget_ovp_enabled(channel)- Get OVP stateset_ovp_value(channel, voltage_limit)- Set OVP voltage limitget_ovp_value(channel)- Get OVP voltage limit
Status & Diagnostics
get_output_mode(channel)- Get output mode (CV/CC/UR)get_ocp_alarm(channel)- Check OCP alarm statusget_ovp_alarm(channel)- Check OVP alarm statusclear_ocp_alarm(channel)- Clear OCP alarmclear_ovp_alarm(channel)- Clear OVP alarmping()- Health check
Network Discovery Tools
Automatic Discovery
python rigol_dp832/find_dp832.py
Scans your network and finds DP832 devices automatically.
Test Specific IP
python rigol_dp832/test_ip.py 192.168.1.100
Tests a specific IP address for DP832 connectivity.
Comprehensive Network Scan
python rigol_dp832/network_discovery.py
Performs a detailed network scan with multiple discovery methods.
API Reference
Connection
from rigol_dp832.rigol_dp import DP832
ps = DP832(
conn_type="VISA",
visa_resource_string="TCPIP0::<IP_ADDRESS>::5555::SOCKET"
)
Device Information
device_id = ps.id()
# Returns: {'manufacturer': 'RIGOL TECHNOLOGIES', 'model': 'DP832', ...}
Channel Control
# Set voltage and current
ps.set_channel_settings(channel=1, voltage=5.0, current=1.0)
# Enable/disable output
ps.set_output_state(channel=1, state=True)
# Get current settings
settings = ps.get_channel_settings(channel=1)
# Returns: {'voltage': 5.0, 'current': 1.0}
Measurements
# Individual measurements
voltage = ps.measure_voltage(channel=1)
current = ps.measure_current(channel=1)
# All measurements at once
measurements = ps.measure_all(channel=1)
# Returns: {'voltage': 5.0, 'current': 0.5, 'power': 2.5}
Protection Settings
# Overcurrent Protection (OCP)
ps.set_ocp_enabled(channel=1, state=True)
ps.set_ocp_value(channel=1, setting=1.5)
ocp_enabled = ps.get_ocp_enabled(channel=1)
ocp_value = ps.get_ocp_value(channel=1)
# Overvoltage Protection (OVP)
ps.set_ovp_enabled(channel=1, state=True)
ps.set_ovp_value(channel=1, setting=6.0)
ovp_enabled = ps.get_ovp_enabled(channel=1)
ovp_value = ps.get_ovp_value(channel=1)
Examples
See rigol_dp832/ethernet_example.py for a complete working example.
Troubleshooting
Connection Issues
- Check IP Address: Verify the IP address is correct
- Network Connectivity: Ping the device:
ping 192.168.1.100 - SCPI Interface: Ensure SCPI over Ethernet is enabled on the DP832
- Firewall: Check that no firewall is blocking port 5555
- PyVISA: Ensure PyVISA is installed and working
Common Error Codes
-1073807339: Connection timeout (device not found or not responding)-1073807343: Invalid resource string format-1073807346: Device busy or locked
Requirements
- Python 3.6+
- PyVISA >= 1.11.0
- Network connection to DP832
What's Excluded
This library focuses on Ethernet connections only. The following have been intentionally excluded:
- USB/USBTMC connections
- Custom socket implementations
- Web server functionality
- OpenAI integration
License
This project is based on the original instrument-controllables library and maintains compatibility with the DP832 instrument control functionality.
Contributing
Feel free to submit issues and enhancement requests!
Install Rigol DP832 Server in Claude Desktop, Claude Code & Cursor
unyly install rigol-dp832-mcp-serverInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add rigol-dp832-mcp-server -- uvx --from git+https://github.com/amahpour/rigol_dp832_mcp_server rigol-dp832-mcp-serverFAQ
Is Rigol DP832 Server MCP free?
Yes, Rigol DP832 Server MCP is free — one-click install via Unyly at no cost.
Does Rigol DP832 Server need an API key?
No, Rigol DP832 Server runs without API keys or environment variables.
Is Rigol DP832 Server hosted or self-hosted?
A hosted option is available: Unyly runs the server in the cloud, no local setup required.
How do I install Rigol DP832 Server in Claude Desktop, Claude Code or Cursor?
Open Rigol DP832 Server on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
by xuzexin-hzCompare Rigol DP832 Server with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
