logic-mcp
This is a vendor-neutral MCP server for logic analyzers, enabling live instrument control, offline trace analysis, bus decoding, and display reconstruction.
List and scan instruments (mock, sigrok_cli, dslogic, dsview, ipc) to discover available hardware backends.
Open, configure, and capture from live instruments, with support for sample rate, channels, duration/sample count, triggers, and GUI-owned setups (e.g., DSView).
Start, stop, wait, and export captures from connected instruments, optionally saving to CSV and loading into the session.
Open offline capture files (currently DSView/libsigrok4DSL CSV) and load them for analysis.
Decode buses — Intel 8080 / MCU 8080 parallel is implemented; protocol roles and channel maps are available for SPI, I2C, UART (as stubs).
Run upper decoders (e.g., MIPI DCS/ST7789) to interpret commands and optionally reconstruct framebuffers as PNG images.
Analyze display sequences via convenience tools like
display_analyze(command log) anddisplay_reconstruct(command log + PNG output).Inspect session state to see open captures, decode jobs, and generated artifacts.
Retrieve protocol roles and instrument capabilities to understand channel names, sample rate ranges, and options schemas.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@logic-mcp decode the i8080 bus from the capture file and reconstruct the ST7789 display"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
logic-mcp
Vendor-neutral MCP server for logic analyzers. Cursor (or any MCP client) can capture from hardware, open a trace file, decode a bus, and reconstruct a display framebuffer.
DreamSourceLab / DSView, Saleae, and VCD are plugins, not the product name.
Cursor ── stdio MCP ── logic-mcp
├─ in-process: mock / sigrok_cli / dslogic
└─ ipc / dsview ── Unix socket ── vendor process
└─ LogicCapture → bus decode → DCS log / PNGWhat it does
Live instrument control — scan, configure, start/stop/wait, export.
Offline files — open a capture (DSView CSV today; Saleae CSV / VCD are stubs).
Bus decode — Intel 8080 / MCU 8080 parallel is implemented; SPI, I2C, UART are stubs with roles reserved.
Upper decode — MIPI DCS / ST7789 command log + optional PNG reconstruction.
Vendors attach in either way:
In-process — Python
InstrumentBackendregistered onlogic_mcp.instruments.IPC — a long-lived process speaking
logic_mcp.instrument.v1on a Unix socket (patched DSView, or the reference hublogic-mcp-instrument).
MCP tool names stay vendor-neutral. Do not add dsview_set_rate-style tools.
Related MCP server: mcp-sigrok
Status
Layer | Implemented | Stub / placeholder |
Instruments |
|
|
Capture files | DSView / libsigrok4DSL CSV | Saleae CSV, VCD |
Buses |
|
|
Devices |
| other panels via extra YAML |
Requirements
Python 3.11+
uv (recommended) or pip
Optional:
sigrok-clionPATH(orSIGROK_CLI) for livesigrok_cli/dslogicOptional: DSView rebuilt with the patch in
vendor/dsview(listens on$XDG_RUNTIME_DIR/logic-mcp/dsview.sock)
Install
git clone https://github.com/dengtaowei/logic-mcp.git
cd logic-mcp
uv sync --extra dev
uv run pytestCursor MCP
Add to Cursor MCP settings. Point --directory at your clone:
{
"mcpServers": {
"logic": {
"command": "uv",
"args": ["--directory", "/path/to/logic-mcp", "run", "logic-mcp"]
}
}
}The server speaks MCP over stdio. It returns JSON summaries, not raw sample dumps.
Then open Agent chat and talk to the model; you do not run decode scripts. First session (ST7789 over 8080): examples/README.md.
Workflows
Offline CSV
capture_open(path) → bus_decode(protocol, channel_map)
→ display_analyze # command log
→ display_reconstruct # command log + PNGchannel_map is required. Values are CSV column names or 0-based indices. A DSView export named RS,CS,RD,WR,DB0…DB7 maps like examples/channel_maps/i8080_dsview.json (dc → RS, not CS).
PNGs land under out/ (or LOGIC_MCP_OUT).
Full config in MCP (mock / sigrok)
instrument_open(backend) → instrument_configure → instrument_capture
→ bus_decode → interpretCaptureRequest fields: sample_rate_hz, channels, duration_s xor sample_count, optional trigger, extra. There is no channel_count; pass the channel name list.
Config in the vendor GUI (DSView)
Human sets rate, channels, and trigger in DSView. MCP only arms:
instrument_open("dsview") → instrument_start → instrument_wait → instrument_exporthello.configure=false means the GUI owns sample rate and channels. instrument_capture without sample_rate_hz is valid on those backends.
Instrument backends
id | Transport | Config owner | Notes |
| in-process | MCP | Always available; for tests and the reference hub |
| in-process subprocess | MCP | Portable probe via |
| in-process subprocess | MCP |
|
| Unix socket | advertised by hub | Default |
| Unix socket | GUI | Default |
| — | — | Unimplemented (Logic 2 Automation API) |
Reference hub (wraps an in-process backend behind the socket):
uv run logic-mcp-instrument --socket "$XDG_RUNTIME_DIR/logic-mcp/instrument.sock"
# optional: --backend mock --gui-ownedIPC methods, framing, and states: src/logic_mcp/instrument/PROTOCOL.md.
MCP tools
Inventory: protocol_list, session_status.
Instrument: instrument_list, instrument_scan, instrument_open, instrument_close, instrument_capabilities, instrument_configure, instrument_capture, instrument_start, instrument_stop, instrument_wait, instrument_export.
Decode: capture_open, protocol_roles, bus_decode, interpret, display_analyze, display_reconstruct.
Extending
Entry points in pyproject.toml:
Group | What to implement |
|
|
|
|
|
|
| upper decoder (e.g. MIPI DCS) |
Out of process: listen on the Unix socket and implement hello / status / start / stop / wait / export (and configure / capabilities if you own config). Python reference: logic-mcp-instrument.
When a vendor’s own GUI/SDK must be patched, put a unified diff under vendor/<id>/ (pinned upstream commit + series). Do not copy their whole tree. First example: vendor/dsview.
Panel YAML (profiles/st7789.yaml, or LOGIC_MCP_PROFILES): width, height, offsets, extra DCS opcodes.
Environment
Variable | Purpose |
| Artifact directory (default |
| Extra panel YAML directory |
| Default |
| Default |
| Path to |
License
MIT for logic-mcp.
Patches under vendor/ are against other projects and keep that project’s license. vendor/dsview is GPLv3+ (DreamSourceLab DSView).
Available Tools
19 toolsbus_decodeBus DecodeB
Create a DecodeJob on the open capture. Same waveform can have several jobs (e.g. SPI + I2C).
Inputs: protocol (required), channel_map (required), t_max, t_min, +2 more. Returns: object
capture_openCapture OpenA
Load a capture/trace file. Returns capture_id and channels. Pin maps belong on bus_decode.
Inputs: path (required), format_id. Returns: object
display_analyzeDisplay AnalyzeC
Sugar: interpret MIPI DCS + command_log sink for a display profile.
Inputs: width, height, profile, col_offset, +3 more. Returns: object
display_reconstructDisplay ReconstructC
Sugar: interpret MIPI DCS + command_log + framebuffer sinks.
Inputs: width, height, out_dir, profile, +6 more. Returns: object
instrument_capabilitiesInstrument CapabilitiesA
Sample rates, channel names, trigger support for the open instrument.
Inputs: no named parameters. Returns: object
instrument_captureInstrument CaptureC
Run a blocking capture into the session. GUI-owned backends (dsview) do not need sample_rate_hz.
Inputs: extra, out_dir, channels, timeout_s, +5 more. Returns: object
instrument_closeInstrument CloseA
Release the open instrument. Does not delete the last LogicCapture.
Inputs: no named parameters. Returns: object
instrument_configureInstrument ConfigureA
Set live capture params (rate, channels, duration or samples, trigger). Does not start yet.
Inputs: sample_rate_hz (required), extra, channels, timeout_s, +4 more. Returns: object
instrument_exportInstrument ExportC
Ask the vendor hub to export the last capture and load it into the session.
Inputs: path, format, out_dir. Returns: object
instrument_listInstrument ListA
List live-capture backends (id, vendor, status, available, options_schema).
Inputs: no named parameters. Returns: object
instrument_openInstrument OpenB
Open a live backend (mock, dslogic, sigrok_cli, …). Returns device + capabilities.
Inputs: backend (required), extra, device_id. Returns: object
instrument_scanInstrument ScanB
Discover analyzers. Omit backend to scan every implemented backend that is available.
Inputs: backend. Returns: object
instrument_startInstrument StartB
Start capture on the open instrument. DSView uses whatever the GUI already configured.
Inputs: no named parameters. Returns: object
instrument_stopInstrument StopB
Stop an in-progress capture.
Inputs: no named parameters. Returns: object
instrument_waitInstrument WaitA
Block until capture completes or timeout_s.
Inputs: timeout_s. Returns: object
interpretInterpretC
Run an upper decoder on a DecodeJob. Default sink is command_log. Add framebuffer for PNG.
Inputs: sinks, width, height, job_id, +9 more. Returns: object
protocol_listProtocol ListA
List instrument backends, capture adapters, bus decoders, upper decoders, profiles, sinks.
Inputs: no named parameters. Returns: object
protocol_rolesProtocol RolesC
Channel roles and options_schema for a bus decoder.
Inputs: protocol (required). Returns: object
session_statusSession StatusC
Open capture plus all decode/interpret jobs and artifacts.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Most tools map to distinct workflow phases, but instrument_capture vs instrument_start plus wait, and display_analyze vs display_reconstruct, have closely overlapping responsibilities. protocol_list and instrument_list also both touch backends, so an agent could misselect without careful reading.
The instrument_* family is consistently named and object_verb names like capture_open and bus_decode are readable, but interpret is a bare verb and instrument_capabilities, protocol_roles, and session_status are noun-style rather than action-style. This mixed convention is understandable but not fully predictable.
19 tools sits in the 16-25 heavy band, though the logic-analyzer workflow is broad enough to justify many of them. Some consolidation is possible, especially around capture/start and the display sugar tools, without losing core capability.
The server covers the full capture-to-decode pipeline: discovery, opening instruments, configuration, capture, decode, upper decoding, display reconstruction, and session status. Minor gaps like explicit decode-job teardown or saved artifact handling are present but agents can generally work around them.
Maintenance
Related MCP Connectors
An MCP server for search and retrieval over a local LanceDB database
OCR, transcription, file extraction, and image generation for AI agents via MCP.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for BusPirate 6 hardware security testing. Exposes UART, SPI, I2C, 1-Wire, power supply, GPIO, and logic analyzer operations as tools.2MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that exposes all functionality of sigrok-cli as MCP tools, enabling hardware initialization, signal acquisition, and protocol decoding for logic analyzers.40 PyPI3MIT
- FlicenseNot gradedqualityCmaintenanceLocal MCP server for building an agent-facing integration around DreamSourceLab DSView. Enables native logic capture, protocol decode, and analysis with artifact management for I2C, SPI, and UART.-
- FlicenseNot gradedqualityCmaintenanceEnables MCP clients to launch and manage an owned Mindustry runtime, create logic fixtures, configure processors with mlog programs, observe live memory values, and verify program replacements with digest preconditions.7 npm1-