MCP Server for MHS-5200A series signal generators, providing tools for frequency control, waveform generation, and sweeps.
Project description
MHS-5200A MCP Server
A Model Context Protocol (MCP) server for controlling MHS-5200A series signal generators (and compatible models such as MHS-5200P / MHS-5225A) via a serial connection.
Features
- Full Channel Control: Set frequency, amplitude, duty cycle, DC offset, phase, and waveform for both channels independently.
- Waveform Selection: Support for Sine, Square, Triangle, Sawtooth, and Arbitrary waveforms.
- Frequency Sweep: Configure and run linear or logarithmic frequency sweeps.
- Arbitrary Waveforms: Upload custom waveform data (2 048 points) to any of the 16 memory slots.
- Advanced Features: Control channel tracking, output inversion, and the internal power amplifier (if equipped).
Requirements
- Python >= 3.13
Installation
Using uv (recommended):
uv pip install mhs5200a-mcp
Or via pip:
pip install mhs5200a-mcp
Or from source:
git clone https://github.com/NaoNaoMe/mhs5200a-mcp.git
cd mhs5200a-mcp
uv sync
Configuration
Claude Desktop Config
Add the server to your claude_desktop_config.json:
{
"mcpServers": {
"mhs5200a-mcp": {
"command": "uvx",
"args": [
"mhs5200a-mcp"
]
}
}
}
Tools Overview
Connection
mhs5200_connect: Connect to the device via serial port (e.g.,COM3,/dev/ttyUSB0).mhs5200_disconnect: Disconnect from the device.mhs5200_get_status: Get current settings for all channels.
Channel Control
mhs5200_set_frequency: Set frequency in Hz (0.01 Hz – 25 MHz).mhs5200_set_amplitude: Set amplitude in volts peak-to-peak (0–15 V).mhs5200_set_waveform: Select waveform (SINE,SQUARE,TRIANGLE,SAWTOOTH_UP,SAWTOOTH_DOWN,ARB00–ARB15).mhs5200_set_duty_cycle: Set duty cycle percentage (0–99.9 %).mhs5200_set_offset: Set DC offset percentage.mhs5200_set_phase: Set phase offset between channels.mhs5200_set_invert: Invert waveform output.
Global Settings
mhs5200_set_output: Enable or disable all outputs.mhs5200_set_tracking: Enable channel tracking (CH2 follows CH1).mhs5200_set_power_amp: Enable the internal power amplifier (if supported).
Sweeps & Arbitrary Waveforms
mhs5200_configure_sweep: Configure frequency sweep parameters (start/stop frequency, time, mode).mhs5200_set_sweep: Start or stop the configured sweep.mhs5200_upload_arb_waveform: Upload custom waveform data from a file.
Example Workflow
- Connect: Call
mhs5200_connectwith the serial port name (e.g.,COM3). - Check Status: Call
mhs5200_get_statusto read the current device settings. - Configure: Use
mhs5200_set_frequency,mhs5200_set_amplitude, etc. to set the desired output. - Enable Output: Call
mhs5200_set_outputto turn on the signal. - Disconnect: Call
mhs5200_disconnectwhen finished.
License
This project is licensed under the MIT License — see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mhs5200a_mcp-0.1.0.tar.gz.
File metadata
- Download URL: mhs5200a_mcp-0.1.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f1c948091e2b33d160dddb471a4ec35702e07decba7061228deed7bcb526580
|
|
| MD5 |
2b1a951ea4ea56dc01f53ab6feb3e04a
|
|
| BLAKE2b-256 |
1a19ffd0d07b21350ab5c576ac9b75c1b875a317cfcc9f2b792ee189829725f7
|
Provenance
The following attestation bundles were made for mhs5200a_mcp-0.1.0.tar.gz:
Publisher:
python-publish.yml on NaoNaoMe/mhs5200a-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mhs5200a_mcp-0.1.0.tar.gz -
Subject digest:
8f1c948091e2b33d160dddb471a4ec35702e07decba7061228deed7bcb526580 - Sigstore transparency entry: 940413248
- Sigstore integration time:
-
Permalink:
NaoNaoMe/mhs5200a-mcp@72b75f29ea6c8b7e8918f1c74e55f834cfdf2604 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/NaoNaoMe
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@72b75f29ea6c8b7e8918f1c74e55f834cfdf2604 -
Trigger Event:
release
-
Statement type:
File details
Details for the file mhs5200a_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mhs5200a_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92e752f8fa18f119aa626c2037bffc92128be5268a192388c2b5252a5bae8a77
|
|
| MD5 |
85908d2072a2d130d2040a09bef61352
|
|
| BLAKE2b-256 |
bc18eeee8265fa7bef6dff86e57ea760d096f6eec4a909004b9d81aab4ec31c4
|
Provenance
The following attestation bundles were made for mhs5200a_mcp-0.1.0-py3-none-any.whl:
Publisher:
python-publish.yml on NaoNaoMe/mhs5200a-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mhs5200a_mcp-0.1.0-py3-none-any.whl -
Subject digest:
92e752f8fa18f119aa626c2037bffc92128be5268a192388c2b5252a5bae8a77 - Sigstore transparency entry: 940413251
- Sigstore integration time:
-
Permalink:
NaoNaoMe/mhs5200a-mcp@72b75f29ea6c8b7e8918f1c74e55f834cfdf2604 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/NaoNaoMe
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@72b75f29ea6c8b7e8918f1c74e55f834cfdf2604 -
Trigger Event:
release
-
Statement type: