Generic SCPI Instrument — Claude Code MCP server: features and setup
Connect an AI agent to SCPI measurement equipment through VISA, TCP, or serial links. Use it to read instrument data or send commands from a chat.
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 scpi-instrument -- uvx labmcp-scpiWhat Generic SCPI Instrument does
The server connects to SCPI instruments such as multimeters, oscilloscopes, and power supplies. Links can use GPIB, USBTMC, LAN, or RS-232. An agent can read replies and issue commands; the MCP client asks for confirmation before commands that change an instrument’s state. Check the safety settings before allowing writes to lab equipment.
You can configure command allow and deny lists, use read-only mode, and set a safe state for the instrument. To try the server without hardware, run uvx labmcp-scpi --simulate --check. The documented tests use a software simulator, so they do not establish that the server has been verified with physical instruments.
What it helps with
- read an instrument’s SCPI identity
- retrieve measurement readings from a device
- find VISA instruments visible to the computer
- restrict commands that change instrument state
- test the server in simulation mode
Example prompts for the agent
- Identify the connected instrument and show its model and firmware.
- Find available VISA devices and check the connection to the selected instrument.
- Switch to read-only mode and retrieve the current measurements.
How to install Generic SCPI Instrument
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 scpi-instrument -- uvx labmcp-scpiReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-scpi <command>
Platform CLI
codex mcp add scpi-instrument --env LABMCP_ADDRESS=<LABMCP_ADDRESS> --env LABMCP_SIMULATE=<LABMCP_SIMULATE> --env LABMCP_READ_ONLY=<LABMCP_READ_ONLY> --env LABMCP_LIMITS=<LABMCP_LIMITS> -- uvx labmcp-scpiReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-scpi <command>
Config file
{
"mcpServers": {
"scpi-instrument": {
"command": "uvx",
"args": [
"labmcp-scpi"
],
"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-scpi <command>
Config file
{
"servers": {
"scpi-instrument": {
"type": "stdio",
"command": "uvx",
"args": [
"labmcp-scpi"
],
"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-scpi <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> scpi-instrument uvx labmcp-scpiReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from labmcp-scpi <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 Generic SCPI Instrument
How do I install Generic SCPI Instrument in Claude Code?
Run claude mcp add labmcp-scpi -- uvx labmcp-scpi. Set the instrument address separately when configuring the connection.
What does Generic SCPI Instrument do?
It lets an agent query SCPI equipment and send commands to it. The MCP client requests confirmation for commands that alter device state.
Can I test Generic SCPI Instrument without hardware?
Yes. Run uvx labmcp-scpi --simulate --check to try the server with its software simulator.