Skip to main content
Glama
logic-analyzer-mcp

logic-analyzer-mcp

logic-analyzer-mcp

MIT License Python 3.12+ FastMCP 3.2+

AI-driven USB logic analyzer control via FastMCP 3.2. Capture digital traces with sigrok or the built-in simulator, decode UART/I2C/SPI, and export VCD for PulseView.

How it runs

Mode

Hardware

When

Simulator (default)

None

Development, CI, agent dry-runs

sigrok

Hantek 6022BL (LA mode), DSLogic, FX2 clones

Production bench with sigrok-cli

The MCP server does not bundle sigrok. Install PulseView or sigrok-cli separately, then connect your USB LA.

Related MCP server: oscilloscope-mcp

Hands-in / Hands-out

Direction

Artifacts

Notes

Hands-in

device_id, channels, trigger

Via la_device, la_configure, la_trigger

Hands-out

Trace preview (downsampled JSON)

la_capture(operation="single")

Hands-out

CSV, VCD, JSON summary

la_capture(operation="export_vcd") in LOGIC_ANALYZER_MCP_CAPTURE_DIR

Hands-out

Protocol decode rows

la_decode(operation="uart")

Fleet pipelines

Partner MCP

Workflow

oscilloscope-mcp

Mixed-signal bring-up (analog + digital)

kicad-mcp

Verify SPI/I2C after PCB bring-up

chip-design-mcp

Debug FPGA/MCU buses

Bench family

One bench, nine servers. bench-orchestrator-mcp conducts (mcu_bringup drives its six wired peers); the rest are instruments:

Server

Role

Wired peer?

bench-orchestrator-mcp

Conductor — bench_workflow (power_check, bus_check, debug_check, mcu_bringup)

— (it conducts)

jtag-swd-mcp

Halt / inspect / flash the CPU

yes (dbg)

oscilloscope-mcp

Scope traces — signal integrity

yes (scope)

logic-analyzer-mcp (here)

Digital capture + UART/I2C/SPI decode

yes (la)

multimeter-mcp

DMM — rails, continuity

yes (dmm)

power-supply-mcp

Bench PSU — target power

yes (psu)

function-generator-mcp

AWG stimulus — clocks, reset, fault injection

yes (fgen)

bench-camera-mcp

Bench vision — LEDs, 7-segment

family (not wired)

spectrum-analyzer-mcp

Spectrum — EMI around the target

family (not wired)

Quick Start

Set-Location D:\Dev\repos\logic-analyzer-mcp
uv sync --extra dev
just webapp
# Open http://127.0.0.1:10989

STDIO-only (Cursor MCP):

just serve

Dry-run without hardware:

la_device(operation="connect", device_id="sim-la-001")
la_capture(operation="single", sample_rate_hz=1000000, sample_count=4096)
la_decode(operation="uart", rx="D0")

Cursor MCP config

Add to C:\Users\sandr\.cursor\mcp.json:

"logic-analyzer-mcp": {
  "command": "C:/Users/sandr/.local/bin/uv.exe",
  "args": [
    "--directory",
    "D:/Dev/repos/logic-analyzer-mcp",
    "run",
    "python",
    "-m",
    "logic_analyzer_mcp",
    "--stdio"
  ],
  "env": {
    "FASTMCP_BANNER": "0",
    "FASTMCP_UPDATE_CHECK": "0",
    "PYTHONUNBUFFERED": "1",
    "LOGIC_ANALYZER_MCP_BACKEND": "auto"
  }
}

Restart Cursor after editing mcp.json.

Tools

Tool

Operations

la_device

list, connect, disconnect, status, capabilities, backends

la_configure

channels, sample_rate, get, simulator_pattern

la_trigger

set, get

la_capture

single, preview, export_csv, export_vcd, export_summary, last

la_decode

list, run, last, uart, i2c, spi

la_help

discover, tool_help, status, quickstart, faq, hardware_guide

Webapp

Port

Role

10985

Backend (FastAPI + MCP /mcp)

10989

Frontend (Vite React — dashboard, device, configure, trigger, trace, decode, logs)

just webapp

Native App (Tauri)

A Tauri 2.0 wrapper (native/) packages the backend with PyInstaller into a single NSIS installer — one shortcut, embedded Python, no separate runtime.

pwsh -NoProfile -File native/build.ps1   # webapp → PyInstaller → Rust → NSIS
just cua-nsis-test                        # install → launch → verify → uninstall

Documentation

License

MIT — see LICENSE.

Available Tools

6 tools
la_captureB

Acquire digital traces and export capture data.

Examples

  • la_capture(operation="single", sample_rate_hz=1000000, sample_count=4096)

  • la_capture(operation="export_vcd")

Inputs: operation (required), channels, filename, sample_count, +1 more.

la_configureB

Configure logic analyzer channels and sample rate.

Examples

  • la_configure(operation="channels", channels=["D0", "D1", "D2"])

  • la_configure(operation="sample_rate", sample_rate_hz=24000000)

Inputs: operation (required), pattern, channels, sample_rate_hz.

la_decodeA
Read-only

Decode captured digital traces with sigrok decoders or simulator stubs.

Examples

  • la_decode(operation="list")

  • la_decode(operation="uart", rx="D0")

  • la_decode(operation="i2c", sda="D0", scl="D1")

Inputs: operation (required), rx, tx, clk, +5 more.

la_deviceB

Discover, connect, and manage USB logic analyzer devices.

Return Format

{"success": bool, "operation": str, "data": {...}}

Examples

  • la_device(operation="list")

  • la_device(operation="connect", device_id="sim-la-001")

  • la_device(operation="status")

Inputs: operation (required), backend, device_id.

la_helpC
Read-only

Help, discovery, and hardware guidance for logic-analyzer-mcp.

Inputs: operation (required), topic, tool_name.

la_triggerB

Configure digital trigger source and pattern.

Examples

  • la_trigger(operation="set", channel="D0", pattern="rising", mode="auto")

  • la_trigger(operation="get")

Inputs: operation (required), mode, level, channel, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a distinct phase of the logic-analyzer workflow: device management, configuration, triggering, capture, decoding, and help. la_configure (channels/sample rate) and la_trigger (trigger patterns) could superficially overlap as 'configuration', but their descriptions clearly separate the concerns.

    Naming Consistency5/5

    All six tools use a uniform la_ prefix followed by a single verb-like noun in snake_case (la_help, la_capture, la_configure, la_decode, la_device, la_trigger). The pattern is predictable with no mixing of conventions.

    Tool Count5/5

    Six consolidated tools each covering a clear responsibility is well-scoped for a logic-analyzer server. Sub-operations are pushed into the operation parameter rather than expanding the tool count, keeping the surface tight.

    Completeness4/5

    The surface covers the full lifecycle: device discovery/connect, channel and rate configuration, trigger setup, capture with export (VCD), and sigrok decoding. Minor gaps exist (e.g., continuous/streaming capture or session save/load), but core workflows are complete with no dead ends.

    Maintenance

    ActivityActive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      AI-driven USB oscilloscope control via FastMCP, enabling waveform capture, CSV export, and frequency measurements on PicoScope, Hantek, or a built-in simulator.
      6
      8
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to capture digital waveforms from an ALIENTEK USB logic analyzer, run 208 sigrok protocol decoders with stacked chains (like I2C→SSD1306 or UART→Modbus), and analyze or write .atkdl waveform archives offline without the device attached.
      4
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to capture, decode, and analyze signals from logic analyzers and measurement devices via sigrok-cli, supporting I2C, SPI, UART, CAN, and 100+ protocols.
      15
      MIT