Keithley SourceMeter SMU — Claude Code MCP server: what it does
Lets an agent drive a SourceMeter SMU: set a source level with a compliance cap, take V and I readings, run stepped IV sweeps. Useful when the instrument sits on a bench.
claude mcp add --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> --transport stdio keithley-smu -- uvx labmcp-keithley-smuWhat Keithley SourceMeter SMU does
Three Keithley remote dialects are covered: 2400-series SCPI, 2450-family SCPI and 2600B TSP. The server picks one from *IDN?, and you can pin it with --option dialect=2400|2450|2600. Links go over GPIB, USB (USBTMC), Ethernet (VXI-11 or raw socket 5025) and RS-232 on the 2400 series, through VISA or tcp://.
The tool set covers a full run. configure_source sets up the source while the output stays off, output_on energises the DUT, measure returns a single reading, and run_iv_sweep steps through levels and hands back the curve with compliance flags and a linear fit. A sweep always ends with the output switched off, errors included. output_off keeps working under --read-only, where configuration, output-on and sweeps are blocked.
You need uvx and a VISA library with GPIB support. NI-VISA covers every interface; pyvisa-py handles USBTMC and LAN, and GPIB needs gpib-ctypes or linux-gpib alongside it. On a 2450 above ±21 V the safety interlock has to be closed, and the instrument must be in the SCPI command set — in TSP mode the server stops and prints instructions. Test the link before wiring it into an agent: uvx labmcp-keithley-smu --address GPIB0::24::INSTR --check.
What it helps with
- source a voltage onto a DUT with a current cap
- sweep a diode or resistor and get the IV curve
- read V and I in one agent call
- switch a low-resistance DUT to 4-wire sensing
- trace which raw commands reached the instrument
Example prompts for the agent
- Connect to the SMU and tell me which instrument is on the line
- Configure the source for 5 V with a 20 mA compliance and turn the output on
- Run a linear sweep from 0 to 2 V and plot the curve
How to install Keithley SourceMeter SMU
Platform CLI
claude mcp add --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> --transport stdio keithley-smu -- uvx labmcp-keithley-smuReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-keithley-smu <command>
Platform CLI
codex mcp add keithley-smu --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> -- uvx labmcp-keithley-smuReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-keithley-smu <command>
Config file
{
"mcpServers": {
"keithley-smu": {
"command": "uvx",
"args": [
"labmcp-keithley-smu"
],
"env": {
"LABMCP_ADDRESS": "<LABMCP_ADDRESS>",
"LABMCP_SIMULATE": "<LABMCP_SIMULATE>",
"LABMCP_READ_ONLY": "<LABMCP_READ_ONLY>",
"LABMCP_LIMITS": "<LABMCP_LIMITS>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-keithley-smu <command>
Config file
{
"servers": {
"keithley-smu": {
"type": "stdio",
"command": "uvx",
"args": [
"labmcp-keithley-smu"
],
"env": {
"LABMCP_ADDRESS": "<LABMCP_ADDRESS>",
"LABMCP_SIMULATE": "<LABMCP_SIMULATE>",
"LABMCP_READ_ONLY": "<LABMCP_READ_ONLY>",
"LABMCP_LIMITS": "<LABMCP_LIMITS>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-keithley-smu <command>
Platform CLI
gemini mcp add -e LABMCP_ADDRESS=<LABMCP_ADDRESS> -e LABMCP_SIMULATE=<LABMCP_SIMULATE> -e LABMCP_READ_ONLY=<LABMCP_READ_ONLY> -e LABMCP_LIMITS=<LABMCP_LIMITS> keithley-smu uvx labmcp-keithley-smuReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-keithley-smu <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Keithley SourceMeter SMU
How do I install Keithley SourceMeter SMU in Claude Code?
Run claude mcp add labmcp-keithley-smu -- uvx labmcp-keithley-smu. The second form of the command passes the address and limits as environment variables.
What does this MCP server do?
It drives a SourceMeter SMU: configures the source, toggles the output, takes single measurements and runs stepped IV sweeps. Raw commands and replies show up in the command log.
Can I try it without hardware?
Yes. uvx labmcp-keithley-smu --simulate --check starts a simulated 1 kΩ resistor. Dialect and simulated DUT are set with --option.