### Docker Quickstart for sigrok-mcp-server Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/README.md Pulls the latest Docker image for sigrok-mcp-server and runs it interactively. This is a quick way to get the server up and running without local installation. ```bash docker pull ghcr.io/kenosinc/sigrok-mcp-server docker run -i ghcr.io/kenosinc/sigrok-mcp-server ``` -------------------------------- ### Dev Container Setup Command Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/development/contributing.md Command to start the development container for the sigrok-mcp-server project, providing a consistent development environment. ```bash devcontainer up ``` -------------------------------- ### Configure Claude Desktop MCP Server (JSON) Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/getting-started/quick-start.md Configure your Claude Desktop client to connect to the sigrok-mcp-server. This involves specifying the Docker command and arguments to run the server. Options include basic setup, enabling privileged access for USB, and mounting firmware directories. ```json { "mcpServers": { "sigrok": { "command": "docker", "args": ["run", "-i", "--rm", "ghcr.io/kenosinc/sigrok-mcp-server"] } } } ``` ```json { "mcpServers": { "sigrok": { "command": "docker", "args": ["run", "-i", "--rm", "--privileged", "ghcr.io/kenosinc/sigrok-mcp-server"] } } } ``` ```json { "mcpServers": { "sigrok": { "command": "docker", "args": [ "run", "-i", "--rm", "--privileged", "-v", "/path/to/sigrok-firmware:/usr/local/share/sigrok-firmware:ro", "ghcr.io/kenosinc/sigrok-mcp-server" ] } } } ``` -------------------------------- ### Configure sigrok-mcp-server for Claude Desktop Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt JSON configuration examples for integrating sigrok-mcp-server with Claude Desktop. Demonstrates basic setup and advanced configuration with USB access and firmware mounting. ```json // claude_desktop_config.json - Basic configuration { "mcpServers": { "sigrok": { "command": "docker", "args": ["run", "-i", "--rm", "ghcr.io/kenosinc/sigrok-mcp-server"] } } } // claude_desktop_config.json - With USB access and firmware { "mcpServers": { "sigrok": { "command": "docker", "args": [ "run", "-i", "--rm", "--privileged", "-v", "/path/to/sigrok-firmware:/usr/local/share/sigrok-firmware:ro", "ghcr.io/kenosinc/sigrok-mcp-server" ] } } } ``` -------------------------------- ### Build and Run Sigrok MCP Server from Source Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/getting-started/installation.md Compiles the sigrok-mcp-server from its source code using Go 1.23+ and then executes the compiled binary. This method requires Go and sigrok-cli to be installed on the system. The output binary is named 'sigrok-mcp-server'. ```bash go build -o sigrok-mcp-server ./cmd/sigrok-mcp-server ./sigrok-mcp-server ``` -------------------------------- ### Local Development Setup and Testing (Go) Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/CONTRIBUTING.md Commands for setting up the local development environment for the sigrok-mcp-server project using Go. Includes building, testing with race detection, and linting. ```bash # Build go build ./... # Test go test ./... -race # Lint go vet ./... golangci-lint run ./... ``` -------------------------------- ### Run sigrok-mcp-server from Source (Go) Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/README.md Starts the sigrok-mcp-server after it has been built from source. The server communicates over stdio using JSON-RPC. Assumes the executable is in the current directory. ```bash ./sigrok-mcp-server ``` -------------------------------- ### List Supported Hardware Drivers Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt Illustrates the `list_supported_hardware` tool, which enumerates all hardware drivers compatible with the sigrok-cli installation. This query does not require any connected hardware. ```json [ {"id": "demo", "description": "Demo driver and target"}, {"id": "fx2lafw", "description": "fx2lafw (generic driver for FX2 based LAs)"}, {"id": "kingst-la2016", "description": "Kingst LA2016"}, {"id": "rigol-ds", "description": "Rigol DS"}, {"id": "scpi-dmm", "description": "SCPI DMM"} ] ``` -------------------------------- ### Install and Run sigrok-mcp-server with Docker Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt Instructions for pulling and running the sigrok-mcp-server Docker image. Includes options for direct USB device access and mounting firmware files for specific hardware. ```bash docker pull ghcr.io/kenosinc/sigrok-mcp-server docker run -i --rm ghcr.io/kenosinc/sigrok-mcp-server # With USB device access for real hardware docker run -i --rm --privileged ghcr.io/kenosinc/sigrok-mcp-server # With firmware files for devices that require them (e.g., Kingst LA2016) docker run -i --rm --privileged \ -v /path/to/sigrok-firmware:/usr/local/share/sigrok-firmware:ro \ ghcr.io/kenosinc/sigrok-mcp-server # Build from source (requires Go 1.23+ and sigrok-cli) go build -o sigrok-mcp-server ./cmd/sigrok-mcp-server ./sigrok-mcp-server ``` -------------------------------- ### Install Sigrok MCP Server using Docker Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/getting-started/installation.md Installs the sigrok-mcp-server by pulling the latest image from GitHub Container Registry. This is the recommended method for ease of use as it bundles all dependencies. The command then runs the server in an interactive, automatically removed container. ```bash docker pull ghcr.io/kenosinc/sigrok-mcp-server docker run -i --rm ghcr.io/kenosinc/sigrok-mcp-server ``` -------------------------------- ### Build sigrok-mcp-server from Source (Go) Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/README.md Builds the sigrok-mcp-server executable from source code using Go. Requires Go 1.25+ to be installed. The output is an executable file named 'sigrok-mcp-server'. ```bash go build -o sigrok-mcp-server ./cmd/sigrok-mcp-server ``` -------------------------------- ### Get Device Profile Information Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt Retrieves a device profile by querying with a name, model, manufacturer, or *IDN? string. Returns connection settings, supported commands with examples, and device-specific notes. This is useful before using `serial_query` to ensure correct communication parameters. ```shell Tool: get_device_profile Parameters: query: XDM1241 // Look up by model name // Response includes: // - Connection settings (baudrate: 115200, parity: none, etc.) // - Supported SCPI commands with examples // - Device-specific notes and limitations ``` ```shell Tool: get_device_profile Parameters: query: "OWON,XDM1241,24412417,V4.3.0,3" // Look up by *IDN? response string // Matches the device profile based on manufacturer and model in the IDN ``` -------------------------------- ### Configure sigrok-mcp-server with Environment Variables Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt Example of running the sigrok-mcp-server Docker container with custom environment variables to modify its behavior, such as setting a custom timeout. ```bash # Docker with custom timeout docker run -i --rm -e SIGROK_TIMEOUT_SECONDS=60 ghcr.io/kenosinc/sigrok-mcp-server ``` -------------------------------- ### Configure Claude Code MCP Server (Bash) Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/getting-started/quick-start.md Add the sigrok-mcp-server to your Claude Code MCP configuration using the 'claude mcp add' command. This allows for basic connection, or advanced configurations with USB access and firmware volume mounting. ```bash claude mcp add sigrok -- docker run -i --rm ghcr.io/kenosinc/sigrok-mcp-server ``` ```bash claude mcp add sigrok -- docker run -i --rm --privileged \ -v /path/to/sigrok-firmware:/usr/local/share/sigrok-firmware:ro \ ghcr.io/kenosinc/sigrok-mcp-server ``` -------------------------------- ### Configure Claude Desktop for sigrok-mcp-server (Docker) Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/README.md Adds the sigrok-mcp-server to Claude Desktop's configuration using Docker. This allows Claude to interact with the server. The example shows basic Docker execution. ```json { "mcpServers": { "sigrok": { "command": "docker", "args": ["run", "-i", "--rm", "ghcr.io/kenosinc/sigrok-mcp-server"] } } } ``` -------------------------------- ### Configure Sigrok MCP Server with Environment Variables (Docker) Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/getting-started/installation.md Runs the sigrok-mcp-server Docker container while setting specific environment variables to customize its behavior. This example demonstrates overriding the default command execution timeout. Other variables like SIGROK_CLI_PATH and SIGROK_WORKING_DIR can also be set. ```bash docker run -i --rm -e SIGROK_TIMEOUT_SECONDS=60 ghcr.io/kenosinc/sigrok-mcp-server ``` -------------------------------- ### Build and Run Sigrok MCP Server from Dockerfile Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/getting-started/installation.md Builds a custom Docker image for the sigrok-mcp-server from a local Dockerfile and then runs it. This method allows for more control over the build process. The image is tagged as 'sigrok-mcp-server' and the container runs interactively, removing itself upon exit. ```bash docker build -t sigrok-mcp-server . docker run -i --rm sigrok-mcp-server ``` -------------------------------- ### Show Version Information Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/tools/show-version.md Retrieves the version information for sigrok-cli and its associated libraries (libsigrok, libsigrokdecode). This is useful for verifying the server's operational status and installed library versions. ```APIDOC ## GET /show_version ### Description Retrieves the version information for sigrok-cli, libsigrok, and libsigrokdecode. This endpoint is useful for verifying the server is running and checking library versions, making it a good first tool to call when testing a new connection. ### Method GET ### Endpoint /show_version ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **sigrok_cli_version** (string) - The version of sigrok-cli. - **libsigrok_version** (string) - The version of libsigrok. - **libsigrokdecode_version** (string) - The version of libsigrokdecode. #### Response Example ```json { "sigrok_cli_version": "0.7.0", "libsigrok_version": "0.7.0", "libsigrokdecode_version": "0.7.0" } ``` ``` -------------------------------- ### Read Voltage with serial_query Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/devices/owon-xdm1241.md Example of reading the main display voltage from the OWON XDM1241 using the serial_query tool. It specifies the necessary connection parameters and the SCPI command. ```bash Tool: serial_query Parameters: port: /dev/ttyUSB0 command: MEAS1? baudrate: 115200 timeout_ms: 3000 ``` -------------------------------- ### Identify Device with serial_query Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/devices/owon-xdm1241.md Example of identifying the OWON XDM1241 multimeter using the serial_query tool. It shows the command to send and the expected response format. ```bash Tool: serial_query Parameters: port: /dev/ttyUSB0 command: *IDN? baudrate: 115200 timeout_ms: 2000 ``` -------------------------------- ### Enable USB Device Access for Sigrok MCP Server in Docker Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/getting-started/installation.md Runs the sigrok-mcp-server Docker container with the '--privileged' flag, granting it full access to host devices. This is necessary for the container to interact with USB-connected hardware like logic analyzers. Use with caution, as it provides broad access. ```bash docker run -i --rm --privileged ghcr.io/kenosinc/sigrok-mcp-server ``` -------------------------------- ### Send Serial Command and Get Response Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt Sends a command string over a specified serial port and returns the device's response. This tool works with text-command instruments like SCPI-compliant devices and does not rely on sigrok-cli. It allows for direct serial communication, including specifying detailed port parameters. ```shell Tool: serial_query Parameters: port: /dev/ttyUSB0 command: "*IDN?" baudrate: 115200 timeout_ms: 3000 // Identify a device using standard SCPI identification command // Response: "OWON,XDM1241,24412417,V4.3.0,3" ``` ```shell Tool: serial_query Parameters: port: /dev/ttyUSB0 command: "MEAS:VOLT:DC?" baudrate: 9600 // Read DC voltage measurement from a multimeter // Response: "+1.23456E+00" ``` ```shell Tool: serial_query Parameters: port: /dev/ttyUSB0 command: "CONF:VOLT:DC 10" baudrate: 115200 databits: 8 parity: none stopbits: 1 timeout_ms: 2000 // Configure multimeter for 10V DC range // Full serial port parameters specified ``` -------------------------------- ### Show sigrok-cli Version Information Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt Demonstrates the `show_version` tool, which retrieves version details for sigrok-cli and its associated libraries. This is useful for verifying server connectivity. ```json { "sigrok_cli": "0.7.2", "libsigrok": "0.5.2", "libsigrokdecode": "0.5.3" } ``` -------------------------------- ### Conventional Commit Message Format Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/CONTRIBUTING.md Example commit messages following the Conventional Commits specification. This format helps in automatically generating changelogs and understanding the nature of changes. ```text feat: add serial port auto-detection fix: handle timeout when device is unresponsive docs: add OWON XDM1241 device profile guide ci: add PR labeler workflow chore: update mcp-go to v0.45.0 perf: reduce allocations in protocol decoder parser refactor: extract command builder from executor ``` -------------------------------- ### Configure Claude Desktop for sigrok-mcp-server with Firmware Mount (Docker) Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/README.md Configures Claude Desktop to use sigrok-mcp-server via Docker, including privileged USB access and mounting a local firmware directory into the container. This is required for devices that need specific firmware files. ```json { "mcpServers": { "sigrok": { "command": "docker", "args": [ "run", "-i", "--rm", "--privileged", "-v", "/path/to/sigrok-firmware:/usr/local/share/sigrok-firmware:ro", "ghcr.io/kenosinc/sigrok-mcp-server" ] } } } ``` -------------------------------- ### List Supported Hardware Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/tools/list-supported-hardware.md Retrieves a list of all hardware drivers supported by the Sigrok MCP Server. This endpoint does not require any connected hardware. ```APIDOC ## GET /list_supported_hardware ### Description Lists all supported hardware drivers. This is a read-only query that does not require connected hardware. The list is derived from the sigrok-cli installation within the container. ### Method GET ### Endpoint /list_supported_hardware ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ``` GET /list_supported_hardware ``` ### Response #### Success Response (200) - **drivers** (array) - An array of objects, where each object contains the `id` and `description` of a supported hardware driver. - **id** (string) - The unique identifier for the hardware driver. - **description** (string) - A human-readable description of the hardware driver. #### Response Example ```json [ {"id": "demo", "description": "Demo driver and target"}, {"id": "fx2lafw", "description": "fx2lafw (generic driver for FX2 based LAs)"}, {"id": "kingst-la2016", "description": "Kingst LA2016"} ] ``` ``` -------------------------------- ### List Supported Input Formats Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt Demonstrates the `list_input_formats` tool, which lists all supported input file formats for the `decode_protocol` tool. These formats define the types of files that can be processed for signal analysis. ```json [ {"id": "binary", "description": "Raw binary logic data"}, {"id": "vcd", "description": "Value Change Dump data"}, {"id": "wav", "description": "WAV file"}, {"id": "srzip", "description": "sigrok session file format data"} ] ``` -------------------------------- ### Complete Signal Analysis Workflow Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt Demonstrates a typical signal analysis workflow using sigrok tools. It includes discovering hardware, checking driver details, capturing signal data, and then decoding the captured data using protocol decoders. ```shell // Step 1: Discover connected hardware Tool: scan_devices // Response: {"devices": [{"driver": "fx2lafw", "description": "Saleae Logic"}]} // Step 2: Check driver capabilities Tool: show_driver_details Parameters: driver: fx2lafw // Response reveals supported sample rates, channels, etc. // Step 3: Capture signal data Tool: capture_data Parameters: driver: fx2lafw channels: D0 config: samplerate=1M samples: 1000000 // Output: capture_20260224_120000.sr // Step 4: Decode the captured data Tool: decode_protocol Parameters: input_file: capture_20260224_120000.sr protocol_decoders: uart:baudrate=9600:rx=D0 // Response contains decoded UART bytes and frames ``` -------------------------------- ### Build sigrok-mcp-server (Go) Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/README.md Builds all Go packages within the project. This command is typically used during development to compile the server and any associated utilities. ```bash go build ./... ``` -------------------------------- ### Increase Timeout for sigrok-mcp-server (Docker) Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/guides/troubleshooting.md Timeout errors can occur if the connected device is slow to respond. This example shows how to increase the default timeout for sigrok-mcp-server commands by setting the `SIGROK_TIMEOUT_SECONDS` environment variable when running the Docker container. ```bash docker run -i --rm -e SIGROK_TIMEOUT_SECONDS=120 sigrok-mcp-server ``` -------------------------------- ### Provide Firmware via Docker Mount Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/getting-started/firmware.md This command demonstrates how to run the sigrok-mcp-server in a Docker container and mount a local firmware directory into the container. The firmware directory is mounted read-only to `/usr/local/share/sigrok-firmware` within the container, ensuring the server can access necessary firmware files. ```bash docker run -i --rm --privileged \ -v /path/to/sigrok-firmware:/usr/local/share/sigrok-firmware:ro \ sigrok-mcp-server ``` -------------------------------- ### Decode SPI Protocol Data Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt Decodes SPI protocol data from a capture file. Requires an input file and specifies SPI decoder options including clock, MOSI, MISO, and CS channels. Optional annotations can filter the output, for example, to show only MOSI data. ```shell Tool: decode_protocol Parameters: input_file: capture.sr protocol_decoders: spi:clk=D0:mosi=D1:miso=D2:cs=D3 annotations: spi=mosi-data // Decode SPI with: // - Clock on D0, MOSI on D1, MISO on D2, CS on D3 // - Filter output to show only MOSI data annotations ``` -------------------------------- ### List Supported Output Formats Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt Retrieves a list of all supported file formats for saving captured data. The output is a JSON array where each object contains an 'id' and a 'description' of the format. ```json [ {"id": "srzip", "description": "sigrok session file format data"}, {"id": "csv", "description": "Comma-separated values"}, {"id": "vcd", "description": "Value Change Dump data"}, {"id": "binary", "description": "Raw binary logic data"} ] ``` -------------------------------- ### Show Driver Details Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt Provides detailed information about a specific hardware driver. This includes supported functions, channel capabilities, scan options, and potentially detected devices. It may initiate a device scan. ```text Tool: show_driver_details Parameters: driver: fx2lafw // Response includes: // - Supported functions and capabilities // - Sample rate ranges // - Channel counts // - Scan options (USB VID/PID, connection parameters) // - Detected devices if any are connected ``` ```text Tool: show_driver_details Parameters: driver: demo // The demo driver is always available for testing without hardware ``` -------------------------------- ### List Input Formats Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/tools/list-input-formats.md Retrieves a list of all supported input file formats for the Sigrok MCP Server. This information is useful for understanding which file types can be used with other decoding functionalities. ```APIDOC ## GET /list_input_formats ### Description Lists all supported input file formats. ### Method GET ### Endpoint /list_input_formats ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ``` Tool: list_input_formats ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the input format. - **description** (string) - A human-readable description of the input format. #### Response Example ```json [ {"id": "binary", "description": "Raw binary logic data"}, {"id": "vcd", "description": "Value Change Dump data"}, {"id": "wav", "description": "WAV file"} ] ``` ### Notes Input formats determine what file types can be used with [`decode_protocol`](decode-protocol.md). ``` -------------------------------- ### Configure sigrok-mcp-server for Claude Code CLI Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt Bash commands for adding the sigrok-mcp-server to the Claude Code CLI. Shows how to include options for USB access and firmware mounting. ```bash # Claude Code CLI - Add the MCP server claude mcp add sigrok -- docker run -i --rm ghcr.io/kenosinc/sigrok-mcp-server # With USB access and firmware claude mcp add sigrok -- docker run -i --rm --privileged \ -v /path/to/sigrok-firmware:/usr/local/share/sigrok-firmware:ro \ ghcr.io/kenosinc/sigrok-mcp-server ``` -------------------------------- ### List Output Formats Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/tools/list-output-formats.md Retrieves a list of all supported output file formats for data capture. ```APIDOC ## GET /list_output_formats ### Description Lists all supported output file formats for data capture. ### Method GET ### Endpoint /list_output_formats ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ``` Tool: list_output_formats ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the output format. - **description** (string) - A human-readable description of the output format. #### Response Example ```json [ {"id": "srzip", "description": "sigrok session file format data"}, {"id": "csv", "description": "Comma-separated values"}, {"id": "vcd", "description": "Value Change Dump data"} ] ``` ### Notes - Output formats determine the file format used by the `capture_data` endpoint. ``` -------------------------------- ### List Supported Protocol Decoders Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt Shows the `list_supported_decoders` tool, which lists over 100 available protocol decoders for signal analysis, including common protocols like UART, SPI, I2C, and CAN. ```json [ {"id": "uart", "description": "Universal Asynchronous Receiver/Transmitter"}, {"id": "spi", "description": "Serial Peripheral Interface"}, {"id": "i2c", "description": "Inter-Integrated Circuit"}, {"id": "can", "description": "Controller Area Network"}, {"id": "usb_packet", "description": "USB packet"} ] ``` -------------------------------- ### Serial Instrument Measurement Workflow Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt Illustrates a workflow for direct communication with SCPI-capable instruments. It involves looking up device profiles, identifying the device via serial query, and then taking measurements. ```shell // Step 1: Look up device profile for connection settings Tool: get_device_profile Parameters: query: XDM1241 // Response: baudrate=115200, parity=none, timeout_ms=3000 // Step 2: Identify the device Tool: serial_query Parameters: port: /dev/ttyUSB0 command: "*IDN?" baudrate: 115200 timeout_ms: 3000 // Response: "OWON,XDM1241,24412417,V4.3.0,3" // Step 3: Take a measurement Tool: serial_query Parameters: port: /dev/ttyUSB0 command: "MEAS?" baudrate: 115200 timeout_ms: 3000 // Response: "+1.23456E+00" (measured value) ``` -------------------------------- ### Show Driver Details Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/tools/show-driver-details.md Retrieves detailed information about a specific hardware driver, including its supported functions, scan options, and any connected devices. ```APIDOC ## POST /show_driver_details ### Description Show detailed information about a specific hardware driver, including supported functions, scan options, and connected devices. ### Method POST ### Endpoint /show_driver_details ### Parameters #### Query Parameters - **driver** (string) - Required - Hardware driver ID (e.g. `demo`, `fx2lafw`, `rigol-ds`) ### Request Example ```json { "driver": "fx2lafw" } ``` ### Response #### Success Response (200) - **driver_info** (object) - Detailed information about the driver including supported functions, scan options, and detected devices. #### Response Example ```json { "driver_info": { "supported_functions": ["capture", "protocol_decoder"], "scan_options": { "conn_type": {"type": "string", "description": "Connection type"}, "serial_baud": {"type": "integer", "description": "Serial baud rate"} }, "connected_devices": [ { "name": "My Device", "serial_number": "12345" } ] } } ``` ### Notes - Use [`list_supported_hardware`](list-supported-hardware.md) to discover available driver IDs. - This tool may trigger a device scan for the specified driver. ``` -------------------------------- ### Test sigrok-mcp-server (Go) Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/README.md Runs all tests for the project, including race detection. This is crucial for ensuring code stability and correctness during development. ```bash go test ./... -race ``` -------------------------------- ### Lint sigrok-mcp-server (Go) Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/README.md Runs the golangci-lint tool to check for code style and potential issues across all Go packages in the project. This helps maintain code quality and consistency. ```bash golangci-lint run ./... ``` -------------------------------- ### Configure Claude Desktop for sigrok-mcp-server with USB Access (Docker) Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/README.md Configures Claude Desktop to use sigrok-mcp-server via Docker, granting the container privileged access to USB devices. This is necessary for capturing data from hardware logic analyzers. ```json { "mcpServers": { "sigrok": { "command": "docker", "args": ["run", "-i", "--rm", "--privileged", "ghcr.io/kenosinc/sigrok-mcp-server"] } } } ``` -------------------------------- ### Show Decoder Details Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt Displays detailed information about a specific protocol decoder. This includes its description, required and optional channels, configuration options, and annotation classes. Useful for understanding decoder configuration before use. ```text Tool: show_decoder_details Parameters: decoder: uart // Response includes: // - Description and documentation // - Required channels (e.g., rx, tx) // - Optional channels // - Configurable options (baudrate, parity, data_bits, etc.) // - Annotation classes (output categories) ``` ```text Tool: show_decoder_details Parameters: decoder: spi // Response reveals SPI decoder requires: // - clk (clock), mosi, miso, cs (chip select) channels // - Options: cpol, cpha, bitorder, wordsize ``` -------------------------------- ### Device Profile Lookup API Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/tools/get-device-profile.md Retrieves connection settings, supported commands, and device-specific notes for a given device profile. You can query by device name, model, manufacturer, or the *IDN? response string. ```APIDOC ## GET /device_profile ### Description Look up a device profile by name, model, manufacturer, or `*IDN?` response string. Returns connection settings, supported commands with examples, and device-specific notes. ### Method GET ### Endpoint /device_profile ### Parameters #### Query Parameters - **query** (string) - Required - Device name, model, manufacturer, or `*IDN?` response string to match against. ### Request Example ```json { "query": "XDM1241" } ``` ### Response #### Success Response (200) - **connection_settings** (object) - Baudrate, parity, and other connection parameters. - **supported_commands** (array) - A list of supported commands with examples. - **device_notes** (string) - Specific notes or limitations for the device. #### Response Example ```json { "connection_settings": { "baudrate": 115200, "parity": "none", "stop_bits": 1 }, "supported_commands": [ { "command": "MEAS:VOLT?", "example": "MEAS:VOLT?" } ], "device_notes": "Ensure firmware is updated for full compatibility." } ``` ``` -------------------------------- ### Show Decoder Details Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/tools/show-decoder-details.md Retrieves detailed information about a specific protocol decoder, including its description, documentation, channels, options, and annotation classes. ```APIDOC ## POST /show_decoder_details ### Description Show detailed information about a specific protocol decoder, including options, channels, annotation classes, and documentation. ### Method POST ### Endpoint /show_decoder_details ### Parameters #### Query Parameters - **decoder** (string) - Required - Protocol decoder ID (e.g. `uart`, `spi`, `i2c`) ### Request Example ```json { "decoder": "uart" } ``` ### Response #### Success Response (200) - **description** (string) - Description of the decoder. - **documentation** (string) - Documentation for the decoder. - **channels** (object) - Information about required and optional channels. - **options** (object) - Configurable options with their defaults. - **annotation_classes** (array) - List of annotation classes (output categories). #### Response Example ```json { "description": "Universal Asynchronous Receiver/Transmitter", "documentation": "UART is a serial communication protocol...", "channels": { "required": ["tx", "rx"], "optional": ["rts", "cts"] }, "options": { "baudrate": {"default": 9600, "type": "integer"}, "parity": {"default": "none", "type": "string"} }, "annotation_classes": ["packet", "error"] } ``` ### Notes - Use [`list_supported_decoders`](list-supported-decoders.md) to discover available decoder IDs. - Decoder options (e.g. `baudrate`, `parity`) are passed via the `protocol_decoders` parameter in [`decode_protocol`](decode-protocol.md). ``` -------------------------------- ### Run sigrok-mcp-server with Privileged Access (Docker) Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/guides/troubleshooting.md When the device is not found, especially within a Docker container, it might be due to insufficient USB passthrough. This command demonstrates how to run the server with the `--privileged` flag to grant it necessary access to host devices. ```bash docker run -i --rm --privileged sigrok-mcp-server ``` -------------------------------- ### Add sigrok-mcp-server to Claude Code with USB and Firmware (Docker) Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/README.md Adds the sigrok-mcp-server to Claude Code, configuring it to run via Docker with privileged USB access and a mounted firmware directory. This enables full functionality for devices requiring firmware. ```bash claude mcp add sigrok -- docker run -i --rm --privileged -v /path/to/sigrok-firmware:/usr/local/share/sigrok-firmware:ro ghcr.io/kenosinc/sigrok-mcp-server ``` -------------------------------- ### List Supported Decoders Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/tools/list-supported-decoders.md Retrieves a list of all supported protocol decoders available in the Sigrok MCP Server. This endpoint does not require any parameters or connected hardware. ```APIDOC ## GET /list_supported_decoders ### Description Lists all supported protocol decoders. This is a read-only query that does not require connected hardware. ### Method GET ### Endpoint /list_supported_decoders ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ``` Tool: list_supported_decoders ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the protocol decoder. - **description** (string) - A brief description of the protocol decoder. #### Response Example ```json [ {"id": "uart", "description": "Universal Asynchronous Receiver/Transmitter"}, {"id": "spi", "description": "Serial Peripheral Interface"}, {"id": "i2c", "description": "Inter-Integrated Circuit"} ] ``` ### Notes - Use [`show_decoder_details`](show-decoder-details.md) to get full information about a specific decoder. ``` -------------------------------- ### Device Profile Lookup API Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt Look up a device profile by name, model, manufacturer, or *IDN? response string. Returns connection settings and device-specific information. ```APIDOC ## GET /get_device_profile ### Description Look up a device profile by name, model, manufacturer, or `*IDN?` response string. Returns connection settings, supported commands with examples, and device-specific notes. Use this before `serial_query` to get correct settings. ### Method GET ### Endpoint /get_device_profile ### Parameters #### Query Parameters - **query** (string) - Required - The query string to identify the device (e.g., `XDM1241` or `"OWON,XDM1241,24412417,V4.3.0,3"`). ### Request Example ```json { "query": "XDM1241" } ``` ### Response #### Success Response (200) - **connection_settings** (object) - Contains serial connection parameters like baudrate, parity, etc. - **supported_commands** (array) - List of supported SCPI commands with examples. - **device_notes** (string) - Device-specific notes and limitations. #### Response Example ```json { "connection_settings": { "baudrate": 115200, "parity": "none", "timeout_ms": 3000 }, "supported_commands": [ { "command": "*IDN?", "description": "Identify the device." } ], "device_notes": "Ensure device is powered on before querying." } ``` ``` -------------------------------- ### Check Firmware Status Source: https://context7.com/kenosinc/sigrok-mcp-server/llms.txt Verifies the presence of firmware files in standard sigrok directories. This is crucial for diagnosing device detection issues, as missing firmware is a common cause of undetected hardware. ```json { "directories": [ { "path": "/usr/local/share/sigrok-firmware", "exists": true, "files": ["fx2lafw-saleae-logic.fw", "kingst-la2016a-fpga.bitstream"] }, { "path": "/usr/share/sigrok-firmware", "exists": false, "files": [] } ], "status": "partial" } ``` -------------------------------- ### Pass Serial Device to sigrok-mcp-server (Docker) Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/guides/troubleshooting.md If `serial_query` returns a permission error when using Docker, the serial device needs to be explicitly passed into the container. This command uses the `--device` flag to map the host's serial port to the container. ```bash docker run -i --rm --device=/dev/ttyUSB0 sigrok-mcp-server ``` -------------------------------- ### Check Firmware Status Tool Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/docs/getting-started/firmware.md The `check_firmware_status` tool is used to verify the presence and availability of firmware files in the expected directories. This helps in diagnosing issues related to device detection that might be caused by missing firmware. ```text Tool: check_firmware_status ``` -------------------------------- ### Add sigrok-mcp-server to Claude Code (Docker) Source: https://github.com/kenosinc/sigrok-mcp-server/blob/main/README.md Adds the sigrok-mcp-server as an MCP server to Claude Code using the `claude mcp add` command. This command uses Docker to run the server. ```bash claude mcp add sigrok -- docker run -i --rm ghcr.io/kenosinc/sigrok-mcp-server ```