siglent-sds-mcp

siglent-sds-mcp

An MCP server that enables AI assistants to control Siglent SDS oscilloscopes over a local network using SCPI commands. It allows users to measure signals, configure channel and acquisition settings, and capture waveforms or screenshots through natural language.

Category
访问服务器

README

siglent-sds-mcp

A Model Context Protocol (MCP) server that lets AI assistants control Siglent oscilloscopes over your local network. Connect Claude to your bench and measure, capture, and configure your scope through natural language.

Overview

This MCP server communicates with Siglent SDS oscilloscopes via SCPI commands over TCP sockets (port 5025). No VISA drivers or NI-MAX installation required — just a network connection to your scope.

Oscilloscope screenshot captured via MCP

Oscilloscope display captured through the screenshot MCP tool.

MCP interaction in terminal

Natural-language scope control and measurement workflow in the terminal.

Key features:

  • 12 tools covering channels, timebase, triggers, measurements, waveform capture, and screenshots
  • Auto-connect on startup via environment variable
  • Query queue serializes commands automatically — tools can safely run in parallel
  • Waveform data returned as voltage/time arrays ready for analysis
  • Screenshots captured and converted to PNG for inline display in Claude
  • Raw SCPI escape hatch for any command not covered by the built-in tools

Compatibility

Status Model
Tested SDS1104X-E
Expected to work SDS1000X-E series (SDS1202X-E, SDS1204X-E, etc.)
May work Other Siglent SDS models with SCPI over TCP support

The server uses standard SCPI commands from the SDS1000X-E Programming Guide. Other Siglent models that support the same command set over port 5025 should work with little or no modification.

Quick Start

You need a Siglent oscilloscope accessible on your network (TCP port 5025). Pick one of the three options below and add the config to your .mcp.json (in your project directory, or ~/.claude/.mcp.json for global access).

Replace 192.168.1.126 with your scope's IP address.

Option A: Docker (recommended)

No Node.js installation required. Works on Linux, macOS, and Windows (via WSL2 or Docker Desktop).

{
  "mcpServers": {
    "siglent-sds": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "SIGLENT_IP=192.168.1.126",
        "ghcr.io/magnusjohansson/siglent-sds-mcp:latest"
      ]
    }
  }
}

Option B: npx

Requires Node.js 20+. Downloads and runs the package automatically.

{
  "mcpServers": {
    "siglent-sds": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "siglent-sds-mcp"],
      "env": {
        "SIGLENT_IP": "192.168.1.126"
      }
    }
  }
}

Option C: Clone and build

git clone https://github.com/magnusjohansson/siglent-sds-mcp.git
cd siglent-sds-mcp
npm install
npm run build
{
  "mcpServers": {
    "siglent-sds": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/siglent-sds-mcp/build/index.js"],
      "env": {
        "SIGLENT_IP": "192.168.1.126"
      }
    }
  }
}

Replace /path/to/siglent-sds-mcp with the actual path to your clone.

Environment Variables

Variable Required Default Description
SIGLENT_IP No Oscilloscope IP address for auto-connect on startup
SIGLENT_PORT No 5025 TCP port (only change if your setup differs)

Auto-Connect Behavior

If SIGLENT_IP is set, the server attempts to connect to the scope immediately after starting. This runs in the background and does not block the MCP server — Claude can start using other tools right away. If the scope is offline or unreachable, the server logs a warning and you can connect manually later using the connect tool.

If SIGLENT_IP is not set, the server starts without a scope connection. Use the connect tool to connect when ready.

Using with Other AI Clients

The Quick Start examples above use Claude Code's .mcp.json format, which includes a "type": "stdio" field. Other AI clients use the same JSON structure but without the "type" field and with different config file locations.

Claude Desktop

Edit claude_desktop_config.json:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Docker

{
  "mcpServers": {
    "siglent-sds": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "SIGLENT_IP=192.168.1.126",
        "ghcr.io/magnusjohansson/siglent-sds-mcp:latest"
      ]
    }
  }
}

npx

{
  "mcpServers": {
    "siglent-sds": {
      "command": "npx",
      "args": ["-y", "siglent-sds-mcp"],
      "env": {
        "SIGLENT_IP": "192.168.1.126"
      }
    }
  }
}

Note: You must fully restart Claude Desktop after changing the config file.

Cursor

Edit one of:

  • User-level: ~/.cursor/mcp.json (available across all projects)
  • Project-level: .cursor/mcp.json (shared with your team via version control)

You can also add servers through the UI: Settings > Cursor Settings > MCP > Add new global MCP server.

Docker

{
  "mcpServers": {
    "siglent-sds": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "SIGLENT_IP=192.168.1.126",
        "ghcr.io/magnusjohansson/siglent-sds-mcp:latest"
      ]
    }
  }
}

npx

{
  "mcpServers": {
    "siglent-sds": {
      "command": "npx",
      "args": ["-y", "siglent-sds-mcp"],
      "env": {
        "SIGLENT_IP": "192.168.1.126"
      }
    }
  }
}

Windsurf

Edit mcp_config.json:

  • Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
  • macOS/Linux: ~/.codeium/windsurf/mcp_config.json

You can also configure servers through the UI: Cascade panel > MCP icon > Manage MCP Servers > View raw config.

Docker

{
  "mcpServers": {
    "siglent-sds": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "SIGLENT_IP=192.168.1.126",
        "ghcr.io/magnusjohansson/siglent-sds-mcp:latest"
      ]
    }
  }
}

npx

{
  "mcpServers": {
    "siglent-sds": {
      "command": "npx",
      "args": ["-y", "siglent-sds-mcp"],
      "env": {
        "SIGLENT_IP": "192.168.1.126"
      }
    }
  }
}

Google Antigravity

Configuration is managed through the IDE's UI:

  1. Open the Agent pane on the right side of the workspace
  2. Click the ... button at the top
  3. Select MCP Servers
  4. Click Manage MCP Servers
  5. Click View raw config
  6. Add the configuration below and save

Docker

{
  "mcpServers": {
    "siglent-sds": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "SIGLENT_IP=192.168.1.126",
        "ghcr.io/magnusjohansson/siglent-sds-mcp:latest"
      ]
    }
  }
}

npx

{
  "mcpServers": {
    "siglent-sds": {
      "command": "npx",
      "args": ["-y", "siglent-sds-mcp"],
      "env": {
        "SIGLENT_IP": "192.168.1.126"
      }
    }
  }
}

Replace 192.168.1.126 with your scope's IP address in all examples above.

ChatGPT Desktop

ChatGPT Desktop only supports remote HTTPS MCP servers (called "connectors"), not local stdio servers. Since this MCP server uses stdio transport, it is not directly compatible with ChatGPT Desktop.

Tools

12 tools across 6 categories. See docs/tools-reference.md for full parameter details.

Category Tool Description
Connection connect Connect to oscilloscope over TCP
disconnect Close the connection
identify Query device ID (manufacturer, model, serial, firmware)
Channel get_channel Read channel configuration (vdiv, offset, coupling, etc.)
configure_channel Set vdiv, offset, coupling, bandwidth limit, trace, probe
Acquisition get_acquisition_status Read timebase, sample rate, trigger settings
configure_acquisition Set timebase, trigger, run/stop/single
Measurement measure Read a measurement (frequency, Vpp, RMS, etc.)
measure_statistics Enable/read/reset measurement statistics
Waveform get_waveform Download voltage/time data arrays
screenshot Capture scope screen as PNG
SCPI scpi_query / scpi_command Send arbitrary SCPI commands

Example Conversations

Read a channel configuration

You: What's the current setup on channel 1?

Claude calls get_channel with channel: "C1" and returns the volts/div, offset, coupling, and other settings.

Measure a signal

You: Measure the frequency and peak-to-peak voltage on channel 2.

Claude calls measure twice — once with parameter: "FREQ" and once with parameter: "PKPK" on channel C2 — and reports both values.

Capture and analyze a waveform

You: Download the waveform from channel 1 and tell me what you see.

Claude calls get_waveform on C1, receives voltage/time data, and analyzes the signal shape, frequency, amplitude, and any anomalies.

Take a screenshot

You: Show me what the scope screen looks like right now.

Claude calls screenshot, receives a base64 BMP image, and displays it inline.

Configure the scope for a specific measurement

You: Set up channel 1 for a 3.3V logic signal — DC coupling, 1V/div, trigger on the rising edge at 1.6V.

Claude calls configure_channel (setting vdiv, coupling) and configure_acquisition (setting trigger source, level, slope) in sequence.

Architecture

Claude Code <-- stdio/JSON-RPC --> siglent-sds-mcp <-- TCP/SCPI --> Oscilloscope:5025
  • Transport: MCP over stdio (JSON-RPC 2.0)
  • Protocol: SCPI commands over raw TCP sockets, newline-terminated
  • Query Queue: All SCPI queries are serialized through an internal queue. The oscilloscope processes one command at a time, so even when tools issue parallel requests (via Promise.all), the queue ensures they're sent sequentially.
  • Binary Block Parsing: Waveform and screenshot data use IEEE 488.2 definite-length block format (#9XXXXXXXXX + data bytes + \n\n). The connection layer detects and parses these automatically.
  • Voltage Reconstruction: Raw ADC codes are converted to voltages: code * (vdiv / 25) - offset, with two's complement handling for signed values.

Development

npm run build       # Compile TypeScript
npm run watch       # Watch mode — recompile on changes
npm run dev         # Build and run
npm run inspector   # Launch with MCP Inspector for debugging

Docker (local build)

Build the image locally:

docker build -t siglent-sds-mcp .

Then use the local image in your .mcp.json:

{
  "mcpServers": {
    "siglent-sds": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "SIGLENT_IP=192.168.1.126",
        "siglent-sds-mcp"
      ]
    }
  }
}

Project Structure

src/
  index.ts              # Entry point, MCP server setup
  connection.ts         # TCP socket manager with query queue
  tools/
    connection.ts       # connect, disconnect, identify
    channel.ts          # get_channel, configure_channel
    acquisition.ts      # configure_acquisition, get_acquisition_status
    measure.ts          # measure, measure_statistics
    waveform.ts         # get_waveform, screenshot
    scpi.ts             # scpi_query, scpi_command

Troubleshooting

"Not connected to oscilloscope"

The scope isn't connected yet. Either set SIGLENT_IP in your .mcp.json env for auto-connect, or use the connect tool manually.

Connection timeout

  • Verify the scope's IP address (check the scope's Utility > Interface menu)
  • Ensure port 5025 is accessible (try telnet <scope-ip> 5025 from your machine)
  • Check that no firewall is blocking the connection
  • The scope only accepts one TCP connection at a time — close any other SCPI clients

Query timeout

Some SCPI queries can take a few seconds, especially on slower scope models. The default timeout is 5 seconds. For scpi_query, you can increase the timeout with the timeout_ms parameter.

Docker: can't reach the oscilloscope

By default, Docker containers can reach LAN devices via the bridge network (NAT). If the container can't connect to your scope:

  • Verify the scope is reachable from your host: telnet 192.168.1.126 5025
  • On Linux, try adding --network host to the Docker args:
    "args": ["run", "--rm", "-i", "--network", "host", "-e", "SIGLENT_IP=192.168.1.126", "ghcr.io/magnusjohansson/siglent-sds-mcp:latest"]
    
    Note: --network host does not work on macOS or Windows Docker Desktop.

Docker: wrong architecture / exec format error

The published image supports linux/amd64 and linux/arm64. Docker should pull the correct one automatically. If you see an exec format error, pull explicitly:

docker pull --platform linux/amd64 ghcr.io/magnusjohansson/siglent-sds-mcp:latest

"CHDR" appears in responses

This shouldn't happen — the server sets CHDR OFF on connect. If you see command headers in responses, try disconnecting and reconnecting.

License

MIT — see LICENSE for details.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选