# Generic SCPI Instrument

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 23
- Author: K-Dense-AI
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/K-Dense-AI/lab-instrument-mcps/tree/HEAD/servers/protocols/scpi-instrument
- Updated: 2026-09-26
- HTML: https://affpapa.org/en/nevibecode/mcp/generic-scpi-instrument

## What it 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.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `LABMCP_ADDRESS`, `LABMCP_SIMULATE`, `LABMCP_READ_ONLY`, `LABMCP_LIMITS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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-scpi
```
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>

### Codex

**Platform CLI**
```bash
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-scpi
```
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>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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>

### Gemini CLI

**Platform CLI**
```bash
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-scpi
```
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>

## When to use it
- 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
- 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.

## Similar
- [Zotero MCP](https://affpapa.org/en/nevibecode/mcp/zotero-mcp.md) — MCP server · ★ 5585
- [arxiv-mcp-server](https://affpapa.org/en/nevibecode/mcp/arxiv-mcp-server.md) — MCP server · ★ 3235
- [PaperBanana](https://affpapa.org/en/nevibecode/mcp/paperbanana.md) — MCP server · ★ 2418
- [MATLAB MCP Server](https://affpapa.org/en/nevibecode/mcp/matlab-mcp-server.md) — MCP server · ★ 1723
- [Hex Research](https://affpapa.org/en/nevibecode/mcp/hex-research.md) — MCP server · ★ 584
- [DocsAgent — Zotero, Obsidian & Apple Notes MCP Server](https://affpapa.org/en/nevibecode/mcp/docsagent-zotero-obsidian-apple-notes-mcp-server.md) — MCP server · ★ 578

From the same set: [k-dense-ai/lab-instrument-mcps](https://affpapa.org/en/nevibecode/by/k-dense-ai/lab-instrument-mcps.md) — 15 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
