cynthion-mcp
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., "@cynthion-mcp Capture USB traffic for 10 seconds and export it as a pcap for Wireshark."
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.
cynthion-mcp
An MCP (Model Context Protocol) server that lets an AI assistant such as Claude drive a Great Scott Gadgets Cynthion: capture and decode USB traffic, emulate USB devices with Facedancer, switch, flash and build FPGA gateware, and drive the board I/O.
Unofficial project.
cynthion-mcpis a community project. It is not affiliated with, endorsed by or supported by Great Scott Gadgets. "Cynthion", "Great Scott Gadgets", "Facedancer", "Moondancer", "LUNA", "Packetry" and other names are trademarks of their respective owners and are used here only to describe compatibility.
The server is built on FastMCP (the official mcp Python SDK) and speaks JSON-RPC over stdio. It stays usable without hardware: the decoding, information and build tools work offline, and hardware tools fail cleanly with [NO_DEVICE].
Features
Discovery: list Cynthion boards, detect the current mode (Apollo, analyzer, facedancer...) without side effects, read hardware revision, firmware, FPGA and SPI flash details.
Gateware switching: load the bundled
analyzer,facedancerorselftestgateware into FPGA SRAM (volatile), or flash it (persistent, confirmation required).USB analyzer: background capture (auto / high / full / low speed), packet decoding (PID, address, endpoint, CRC5/CRC16), transactions, class-level decoding (standard requests and descriptors, HID, CDC-ACM, mass storage, CH34x / FTDI / CP210x serial), statistics and pcap export for Wireshark or Packetry.
Facedancer device emulation (Moondancer backend): keyboard, FTDI serial adapter, mass-storage stick, USB proxy, or your own Python device script.
Board I/O: the six FPGA LEDs, PMOD A GPIOs, USER button, Apollo LED pattern, JTAG registers, firmware debug log.
SPI flash and firmware: JEDEC/UID info, read, write, erase, Apollo DFU firmware update.
Hardware self-test (PHYs, HyperRAM, debug module).
Custom gateware builds: build an Amaranth design into a
.bitbitstream with the open-source ECP5 toolchain, then load it.
Related MCP server: buspirate-mcp
Supported hardware
Cynthion r0.6 and later. Developed and tested on Cynthion r1.4.
Uses the gateware and firmware bundled with the installed
cynthionPython package, selected automatically for the detected board revision.Host OS: Windows 10/11, Linux, macOS (Python >= 3.10). Hardware validation so far was done on Windows.
Board ports and buttons
CONTROL (USB-C) AUX (USB-C)
+------[====]--------------------------[====]------+
| |
| [PROGRAM] LEDs 0..5 [USER] [RESET] |
| |
| ECP5 FPGA + Apollo MCU |
| |
+------[====]--------------------------[=====]-----+
TARGET-C (USB-C) TARGET-A (USB-A)
(schematic only, not to scale)Port | Role |
CONTROL | Connects to your PC (the machine running |
TARGET-C | Analyzer: connects to the host being observed. Facedancer: the emulated device appears here; connect it to the target host. |
TARGET-A | Analyzer: the device under test plugs in here and is passed through to TARGET-C while it is captured. |
AUX | Auxiliary port. Used by the analyzer's built-in test device ( |
Button | Role |
PROGRAM | Hands the CONTROL port back to Apollo (stops the gateware). Held while plugging in, it keeps the board in Apollo / bootloader mode for recovery. |
USER | General-purpose button, readable with |
RESET | Reboots the FPGA from SPI flash (same effect as |
Device modes
server_status and list_devices report the current mode:
Mode | USB ID | Meaning |
|
| Only Apollo is enumerated: FPGA unconfigured or running USB-less gateware (selftest). |
|
| USB analyzer gateware: use the |
|
| Moondancer gateware + SoC firmware: use the |
| LUNA IDs, Apollo stub interface only | Custom gateware. |
| - | No Cynthion visible: use the |
Only one user of the USB port at a time: a running capture or emulation blocks every tool that reconfigures or reflashes the FPGA ([BUSY]) until analyzer_stop / facedancer_stop.
Installation
# from a clone
git clone https://github.com/Alfa16bravo/cynthion-mcp.git
cd cynthion-mcp
pip install -e .
# or directly from git
pip install "git+https://github.com/Alfa16bravo/cynthion-mcp.git"Optional extras:
pip install -e ".[build]" # YoWASP toolchain for build_gateware
pip install -e ".[dev]" # pytest + ruffAn MCP client starts the server with python -m cynthion_mcp (or the cynthion-mcp console script). It speaks JSON-RPC on stdin/stdout and is not meant to be used by hand.
Drivers
Windows
The WinUSB driver is normally bound automatically: Apollo and the Cynthion gateware expose Microsoft OS descriptors, so no manual install is needed.
If you get
[DRIVER](access denied / libusb not found), use Zadig to install WinUSB on:1d50:615cCynthion Apollo Debugger;1d50:615bCynthion gateware (USB Analyzer / Facedancer), all interfaces.
The libusb-1.0 DLL ships with the
libusb1Python package; nothing else to install.In Facedancer
proxymode, the proxied real device must also use WinUSB (often via Zadig).
Linux
Install the udev rules with
cynthion setup(from thecynthionpackage), then unplug and replug the board.Make sure libusb-1.0 is installed (
sudo apt install libusb-1.0-0on Debian/Ubuntu).
macOS
No driver needed. Install libusb if pyusb cannot find a backend (
brew install libusb).
Optional toolchain for build_gateware
build_gateware needs yosys, nextpnr-ecp5 and ecppack. Either:
pip install yowasp-yosys yowasp-nextpnr-ecp5 # pure pip, works on Windows (same as: pip install -e ".[build]")or install the OSS CAD Suite and put its bin folder on PATH. gateware_toolchain_status reports what was found.
Registering with an MCP client
Claude Code
claude mcp add cynthion -- python -m cynthion_mcpUse the full path of your Python interpreter instead of python if several are installed. Check with claude mcp list; the tools appear as mcp__cynthion__<tool>. A server declared at project scope (-s project or .mcp.json) must be approved once in Claude Code (/mcp).
Generic MCP client (JSON config)
Copy .mcp.json.example to .mcp.json, or add this block to your client's configuration (for Claude Desktop: claude_desktop_config.json):
{
"mcpServers": {
"cynthion": {
"type": "stdio",
"command": "python",
"args": ["-m", "cynthion_mcp"],
"env": {
"PYTHONUNBUFFERED": "1",
"CYNTHION_MCP_LOG_LEVEL": "INFO"
}
}
}
}Environment variables
Variable | Purpose | Default |
| Log level ( |
|
| Default folder for generated files (pcap, flash dumps, builds; builds go to its |
|
| Extra | - |
| Recommended | - |
Tools (50)
A. General / discovery
Tool | Description |
| Overall server state: package versions, platform, detected Cynthion mode and devices, analyzer capture status and Facedancer emulation status. |
| Non-invasively enumerate Cynthion-related USB devices (Apollo 1d50:615c, gateware 1d50:615b...) with their mode, strings, revision and interfaces. |
| Detailed Apollo/Cynthion info: hardware name and revision, serial, firmware and USB API versions, ADC. |
| List the gateware bitstreams (per board revision) and firmware images bundled with the installed cynthion package. |
| Return recent server and library log lines (cynthion_mcp, apollo_fpga, facedancer, cynthion). |
B. Apollo / FPGA control
Tool | Description |
| Set the Apollo debug-MCU LED pattern. |
| Reboot the FPGA from SPI flash (soft reset + allow gateware USB takeover). |
| Hold the FPGA offline so Apollo owns JTAG and the CONTROL USB port. |
| Enumerate the JTAG chain through Apollo and return IDCODEs (0x21111043 = LFE5U-12F). |
| Read a gateware debug register over the JTAG/SPI register bridge (only for gateware that exposes one, e.g. selftest). |
| Write a gateware debug register over the JTAG register bridge (e.g. selftest register 2 = LEDs). |
C. Gateware / SPI flash
Tool | Description |
| Load a bundled gateware (analyzer, facedancer or selftest) matching the board revision into FPGA SRAM. |
| Load an arbitrary bitstream file into FPGA SRAM over JTAG (volatile). |
| PERSISTENT: write a bundled gateware to SPI flash so it boots at power-on (facedancer also writes the SoC firmware). (confirm=true) |
| PERSISTENT: write a file to the SPI flash at the given offset. (confirm=true) |
| Dump SPI flash content to a file. |
| PERSISTENT and DESTRUCTIVE: erase the whole SPI flash (gateware and SoC firmware). (confirm=true) |
| Read the SPI flash JEDEC manufacturer/part and 64-bit unique ID over JTAG. |
| PERSISTENT: update the Apollo debug MCU firmware over DFU. (confirm=true) |
| Load the selftest gateware and run the hardware self-tests (debug module, PHYs, HyperRAM). |
D. USB analyzer
Tool | Description |
| Query the analyzer gateware: protocol version, supported speeds, decoded state register, serial. |
| Start a background USB capture between TARGET-C (host) and TARGET-A (device). |
| Stop the running capture, drain the remaining data and keep the buffer for reading/export. |
| Capture status: running flag, speed, packet/event/byte counters, buffer usage, errors. |
| Read decoded capture records (packets with PID/address/endpoint/data/CRC check, and bus events) from the buffer. |
| Group captured packets into transactions (token + data + handshake), decoding SETUP requests. |
| Statistics of the buffered capture: packets per PID, devices/endpoints seen with byte counts, events, detected speed, duration and CRC errors. |
| Write the buffered capture to a pcap file (LINKTYPE_USB_2_0 = 288, opens in Wireshark/Packetry). |
| Discard the buffered capture. |
| Bounded one-shot capture: start, wait |
| Control the analyzer's built-in USB test device on the AUX port (1209:000a, r0.6+). |
| Decode the captured traffic at USB class level: standard control requests and descriptors (device model per address), HID reports (keys, mouse), CDC-ACM line coding / serial state, mass-storage CBW/SCSI/CSW, and serial data of CDC-ACM / CH34x / FTDI / CP210x adapters. |
| Decode one raw USB 2.0 packet: PID, address/endpoint/frame, payload, CRC5/CRC16 check, and SETUP request decoding for 8-byte DATA0 payloads. |
E. Facedancer (device emulation)
Tool | Description |
| Describe the device kinds facedancer_start can emulate (keyboard, ftdi, mass_storage, proxy, script), their parameters and supported commands. |
| Start emulating a USB device with Facedancer in a background worker process. |
| Send a command to the running emulated device (e.g. key_down, type_string, serial_write, status) and return its result. |
| Type text on the target host with the emulated keyboard (kind=keyboard must be running). |
| Send data from the emulated FTDI serial adapter to the target host (kind=ftdi must be running). |
| Status of the Facedancer worker: running, kind, connected, pid, uptime, exit code, last error. |
| Log output of the Facedancer worker process (facedancer library logs, stdout/stderr). |
| Events emitted by the emulated device (control requests from the host, received data, proxy traffic...). |
| Stop the emulation (disconnects the emulated device) and report unhandled control requests. |
F. Board I/O (Moondancer firmware, facedancer mode)
Tool | Description |
| Moondancer board info (name, firmware version, serial, part id, libgreat APIs). |
| Drive one of the 6 FPGA LEDs through the Moondancer firmware. |
| List the GPIO pins available through Moondancer (PMOD A pins A1-A4, A7-A10 and USER button). |
| Configure a pin as input and read it. 'USER' reads the user button. |
| Configure a pin as push-pull output and drive it high or low. |
| Read the Moondancer firmware debug ring buffer (dmesg). |
G. Custom gateware build
Tool | Description |
| Check the open-source ECP5 toolchain used by build_gateware (yosys, nextpnr-ecp5, ecppack): native installs (env overrides, PATH, OSS CAD Suite) or YoWASP packages. |
| Build an Amaranth design for the Cynthion ECP5 into a .bit bitstream in a subprocess (yosys -> nextpnr-ecp5 -> ecppack), with progress. |
The descriptions above are the first sentence of each tool's MCP description, generated from the server's list_tools output. Tools marked (confirm=true) are persistent or destructive.
Without hardware, these tools still work: server_status, list_devices, list_bundled_assets, get_logs, decode_usb_packet, analyzer_status / analyzer_read / analyzer_summary / analyzer_transactions / analyzer_decode_classes (on the last capture), facedancer_list_device_kinds / facedancer_status / facedancer_logs / facedancer_events, gateware_toolchain_status and build_gateware.
Error codes
Errors read [CODE] message, optionally followed by a Hint: ... line.
Code | Meaning | What to do |
| No Cynthion detected | Plug in the CONTROL port; see |
| Device present but running the wrong gateware | Switch gateware, or keep |
| USB port already in use (capture or emulation running) |
|
| libusb not found or access denied | Windows: WinUSB via Zadig; Linux: udev rules |
| Destructive tool called without | Ask the user, then call again with |
| Invalid parameter | Fix the call |
| JTAG, flash or I/O failure |
|
| Feature missing on this revision, firmware or host | - |
| Device did not answer or re-enumerate in time | Retry; check the cable |
| Gateware design or toolchain error | Read the log tail returned by |
Resources and prompts
Resource | Content |
| Server, device and activity status (same as |
| Bundled gateware and firmware assets. |
| Current analyzer buffer as a pcap file (LINKTYPE_USB_2_0). |
| Last 500 server log lines. |
Prompt | Purpose |
| Step-by-step guide to capture and analyse the USB traffic of a device. |
| Guide to emulate a USB keyboard and type text on the target host. |
| Checklist to diagnose why no Cynthion is detected. |
Example workflows
Capture USB traffic, decode it, open it in Wireshark or Packetry
Wiring: PC on CONTROL, observed host on TARGET-C, device under test on TARGET-A.
analyzer_capture(seconds=10, speed="full", export_pcap_path="captures/device.pcap")
analyzer_summary() # devices, endpoints, PIDs, errors
analyzer_transactions(address=3, endpoint=0) # SETUP requests of device 3
analyzer_decode_classes(address=3) # descriptors, HID reports, serial data...
analyzer_export_pcap(path="captures/device.pcap") # if not exported aboveFor longer or interactive sessions use analyzer_start, then analyzer_status / analyzer_read, then analyzer_stop. The pcap uses LINKTYPE_USB_2_0 (288), one record per packet with nanosecond timestamps; open it in Wireshark (usbll dissector) or Packetry. If a capture missed the enumeration, pass hints (device address to class) to analyzer_decode_classes.
Emulate devices with Facedancer
The emulated device appears on TARGET-C; connect that port to the target host.
# FTDI serial adapter: round-trip data with the target host
facedancer_start(kind="ftdi")
facedancer_serial_write(data="hello from cynthion")
facedancer_events() # data the host sent to the adapter
facedancer_stop()
# Keyboard: types into the focused window of the target host (US layout)
facedancer_start(kind="keyboard")
facedancer_type_text(text="hello")
facedancer_stop()
# Mass storage: synthetic FAT32 image, or params={"image_path": "<existing raw image>"}
facedancer_start(kind="mass_storage")
facedancer_stop()facedancer_list_device_kinds lists every kind with its parameters and commands. With kind="script", script_path points to a Python file that defines create_device(params) (returning a Facedancer USBDevice) and optionally handle_command(device, command, args). Use logging rather than print() in scripts; the output is visible with facedancer_logs.
Build and load a blinky
gateware_toolchain_status()
build_gateware(source="examples/blinky.py") # returns the .bit path
configure_bitstream(path="<bitstream path returned above>")
reconfigure_fpga() # back to the gateware in flashconfigure_bitstream loads into SRAM only: the design is lost at power-off or on reconfigure_fpga.
Safety
Destructive or persistent operations need
confirm=true.flash_gateware,flash_file,erase_flashandupdate_apollo_firmwarefirst return[CONFIRMATION_REQUIRED]with a description of the operation. The assistant must get explicit human approval before repeating the call withconfirm=true. If a flash write is interrupted, recover withrun_gateware, thenflash_gateware(target="analyzer", confirm=true); Apollo keeps its DFU bootloader.Arbitrary code execution by design.
facedancer_start(kind="script", script_path=...)runs the given Python file in the worker process, andbuild_gateware(source=...)runs the given Python/Amaranth file in the build subprocess. Only use files you trust. All file paths passed to tools are used as-is.Keyboard emulation types into whatever window has focus on the target host, so it can run commands there. Only use Facedancer on machines you own or are authorised to test.
Captures are sensitive. The analyzer and the USB proxy see all traffic of the observed device (keystrokes, passwords, file contents, tokens). Treat pcap files and logs accordingly.
Limitations
The analyzer stream is decoded in pure Python: sustained throughput is roughly 7-10 MB/s. Bursts above that are buffered and decoded afterwards (backlog catch-up); very long high-speed bulk transfers can outrun it.
Full-speed capture is validated on hardware. High-speed capture is implemented but not yet validated.
No USB host mode: the Cynthion is used as an analyzer or as an emulated device, not as a USB host.
Hardware validation was done on a single r1.4 board under Windows.
Validated on hardware
Tested on a Cynthion r1.4 under Windows 11 with Python 3.10:
Feature | Status |
Device and mode detection | Validated |
Analyzer: full-speed capture, packet / transaction / class decoding, pcap export | Validated |
Analyzer: high-speed capture | Not yet validated |
Gateware switching (analyzer / facedancer / selftest, SRAM) | Validated |
SPI flash read | Validated |
Facedancer FTDI emulation: serial round-trip with the target host | Validated |
FPGA LEDs and USER button (facedancer mode) | Validated |
Blinky build (YoWASP toolchain on Windows) and SRAM load | Validated |
Development
pip install -e ".[dev]"
python -m pytest # no hardware needed: USB access is mocked
python -m pytest -m "not slow" # skip the tests that spawn subprocesses
ruff check src tests examplesThe test suite needs no Cynthion. Tests marked
slowspawn real subprocesses (stdio server, gateware elaboration, Facedancer worker).CYNTHION_MCP_SKIP_SLOW=1skips the smoke test that launches the real Facedancer worker against the USB stack (CI sets it). That test also skips itself when a real Cynthion is plugged in.Never
print()to stdout from server code: stdout carries the JSON-RPC stream.
Project layout:
src/cynthion_mcp/
server.py FastMCP instance, tools, resources, prompts, main()
common.py errors, log ring, stdout guard, hardware lock, activity registry
device.py Apollo discovery, mode detection, info, LEDs, JTAG
gateware.py bundled assets, SRAM configuration, flash, SoC firmware, DFU, selftest
gateware_build.py ECP5 toolchain discovery and build orchestration
gateware_build_runner.py build subprocess (elaborate, yosys, nextpnr-ecp5, ecppack)
analyzer.py analyzer gateware driver, capture manager (reader + parser threads)
usbdecode.py stdlib-only stream parser, PID/CRC, transactions, pcap writer
usbclass.py stdlib-only USB class-level decoder
facedancer_runner.py parent side of the Facedancer worker process
facedancer_worker.py child process running the emulated device
board_io.py LEDs / GPIO / info through the Moondancer firmware
examples/blinky.py minimal Amaranth design for build_gatewareSee CONTRIBUTING.md, SECURITY.md and CHANGELOG.md.
License
MIT, see LICENSE. The Cynthion gateware and firmware used by the tools are not part of this repository; they come from the cynthion package under their own licenses.
Available Tools
50 toolsanalyzer_captureA
Bounded one-shot capture: start, wait seconds (with progress), stop, and return status + summary
(optionally exporting a pcap). Loads the analyzer gateware if needed.
Inputs: seconds (required), speed, export_pcap_path, auto_load_gateware. Returns: object
analyzer_clearA
Discard the buffered capture. Refused while a capture is running.
Inputs: no named parameters. Returns: object
analyzer_decode_classesARead-onlyIdempotent
Decode the captured traffic at USB class level: standard control requests and descriptors (device model per address), HID reports (keys, mouse), CDC-ACM line coding / serial state, mass-storage CBW/SCSI/CSW, and serial data of CDC-ACM / CH34x / FTDI / CP210x adapters. Always decodes the whole buffer, then filters and pages (next_seq). Works during and after a capture; no hardware access. During a capture, next_seq points at the first item still open (e.g. a control transfer waiting for its status stage), so that item is returned again, completed, by the next page.
Inputs: hints, limit, layers, address, +2 more. Returns: object
analyzer_export_pcapA
Write the buffered capture to a pcap file (LINKTYPE_USB_2_0 = 288, opens in Wireshark/Packetry). Also available as resource cynthion://capture/last.pcap.
Inputs: path, nanosecond, include_sof. Returns: object
analyzer_infoARead-onlyIdempotent
Query the analyzer gateware: protocol version, supported speeds, decoded state register, serial. Requires analyzer mode (run_gateware target=analyzer).
Inputs: no named parameters. Returns: object
analyzer_readARead-onlyIdempotent
Read decoded capture records (packets with PID/address/endpoint/data/CRC check, and bus events) from the buffer. Use next_seq for incremental polling. Works during and after a capture.
Inputs: raw, pids, kinds, limit, +6 more. Returns: object
analyzer_startA
Start a background USB capture between TARGET-C (host) and TARGET-A (device). Loads the analyzer gateware if needed (stops other gateware). Poll with analyzer_status/analyzer_read, end with analyzer_stop.
Inputs: speed, duration_s, vbus_from_aux, buffer_packets, +6 more. Returns: object
analyzer_statusARead-onlyIdempotent
Capture status: running flag, speed, packet/event/byte counters, buffer usage, errors.
Inputs: no named parameters. Returns: object
analyzer_stopA
Stop the running capture, drain the remaining data and keep the buffer for reading/export.
Inputs: no named parameters. Returns: object
analyzer_summaryBRead-onlyIdempotent
Statistics of the buffered capture: packets per PID, devices/endpoints seen with byte counts, events, detected speed, duration and CRC errors.
Inputs: no named parameters. Returns: object
analyzer_test_deviceA
Control the analyzer's built-in USB test device on the AUX port (1209:000a, r0.6+). Useful to verify a capture by wiring AUX to TARGET-A.
Inputs: speed, connect. Returns: object
analyzer_transactionsBRead-onlyIdempotent
Group captured packets into transactions (token + data + handshake), decoding SETUP requests.
Inputs: limit, address, endpoint, start_seq, +3 more. Returns: object
board_debug_logARead-onlyIdempotent
Read the Moondancer firmware debug ring buffer (dmesg). Requires facedancer mode.
Inputs: clear, max_length. Returns: object
board_infoARead-onlyIdempotent
Moondancer board info (name, firmware version, serial, part id, libgreat APIs). Requires facedancer mode.
Inputs: no named parameters. Returns: object
build_gatewareA
Build an Amaranth design for the Cynthion ECP5 into a .bit bitstream in a subprocess (yosys -> nextpnr-ecp5 -> ecppack), with progress. Never touches the board; load the result with configure_bitstream(path=). Design/toolchain failures are reported as [BUILD_FAILED] with the log tail.
Inputs: source (required), top, timeout_s, extra_args, +3 more. Returns: object
configure_bitstreamA
Load an arbitrary bitstream file into FPGA SRAM over JTAG (volatile). Stops the running gateware.
Inputs: path (required), wait. Returns: object
decode_usb_packetARead-onlyIdempotent
Decode one raw USB 2.0 packet: PID, address/endpoint/frame, payload, CRC5/CRC16 check, and SETUP request decoding for 8-byte DATA0 payloads. No hardware needed.
Inputs: hex_bytes (required). Returns: object
device_infoA
Detailed Apollo/Cynthion info: hardware name and revision, serial, firmware and USB API versions, ADC. force_offline / include_flash / include_fpga may stop the running gateware (use reconfigure_fpga to restore).
Inputs: serial, include_fpga, force_offline, include_flash. Returns: object
erase_flashADestructive
PERSISTENT and DESTRUCTIVE: erase the whole SPI flash (gateware and SoC firmware). The FPGA will boot unconfigured until reflashed. Requires confirm=true after asking the user.
Inputs: confirm. Returns: object
facedancer_commandB
Send a command to the running emulated device (e.g. key_down, type_string, serial_write, status) and return its result.
Inputs: command (required), args, timeout_s. Returns: object
facedancer_eventsCRead-onlyIdempotent
Events emitted by the emulation: type 'data' (received / proxied data, field 'source'), 'host_event' (field 'name': bus_reset, configured, set_address), connected, error, stopped.
Inputs: limit, types, since_seq. Returns: object
facedancer_list_device_kindsARead-onlyIdempotent
Describe the device kinds facedancer_start can emulate (keyboard, ftdi, mass_storage, proxy, script), their parameters and supported commands.
Inputs: no named parameters. Returns: object
facedancer_logsBRead-onlyIdempotent
Log output of the Facedancer worker process (facedancer library logs, stdout/stderr).
Inputs: lines, since_seq. Returns: object
facedancer_serial_writeA
Send data from the emulated FTDI serial adapter to the target host (kind=ftdi must be running).
Inputs: data (required), hex. Returns: object
facedancer_startA
Start emulating a USB device with Facedancer in a background worker process. Loads the facedancer gateware if needed (stops other gateware, writes SoC firmware to flash). Stop with facedancer_stop.
Inputs: kind (required), params, script_path, ready_timeout_s, +1 more. Returns: object
facedancer_statusBRead-onlyIdempotent
Status of the Facedancer worker: running, kind, connected, pid, uptime, exit code, last error.
Inputs: no named parameters. Returns: object
facedancer_stopA
Stop the emulation (disconnects the emulated device) and report unhandled control requests.
Inputs: timeout_s. Returns: object
facedancer_type_textA
Type text on the target host with the emulated keyboard (kind=keyboard must be running).
Inputs: text (required), duration. Returns: object
flash_fileADestructive
PERSISTENT: write a file to the SPI flash at the given offset. Overwrites existing content; requires confirm=true after asking the user.
Inputs: path (required), offset, reboot, confirm. Returns: object
flash_gatewareADestructive
PERSISTENT: write a bundled gateware to SPI flash so it boots at power-on (facedancer also writes the SoC firmware). Requires confirm=true after asking the user. Reboots the FPGA afterwards.
Inputs: target (required), confirm. Returns: object
flash_infoA
Read the SPI flash JEDEC manufacturer/part and 64-bit unique ID over JTAG. Takes the FPGA offline (use reconfigure_fpga to restore the gateware).
Inputs: no named parameters. Returns: object
force_fpga_offlineA
Hold the FPGA offline so Apollo owns JTAG and the CONTROL USB port. Stops the running gateware.
Inputs: no named parameters. Returns: object
gateware_toolchain_statusARead-onlyIdempotent
Check the open-source ECP5 toolchain used by build_gateware (yosys, nextpnr-ecp5, ecppack): native installs (env overrides, PATH, OSS CAD Suite) or YoWASP packages. Never touches the board.
Inputs: probe_versions. Returns: object
get_logsBRead-onlyIdempotent
Return recent server and library log lines (cynthion_mcp, apollo_fpga, facedancer, cynthion).
Inputs: level, lines. Returns: object
gpio_listARead-onlyIdempotent
List the GPIO pins available through Moondancer (PMOD A pins A1-A4, A7-A10 and USER button). Requires facedancer mode.
Inputs: no named parameters. Returns: object
gpio_readA
Configure a pin as input and read it. 'USER' reads the user button. Requires facedancer mode.
Inputs: pin (required). Returns: object
gpio_writeA
Configure a pin as push-pull output and drive it high or low. Requires facedancer mode.
Inputs: pin (required), value (required). Returns: object
jtag_register_readA
Read a gateware debug register over the JTAG/SPI register bridge (only for gateware that exposes one, e.g. selftest). May hand off from gateware.
Inputs: address (required). Returns: object
jtag_register_writeA
Write a gateware debug register over the JTAG register bridge (e.g. selftest register 2 = LEDs).
Inputs: value (required), address (required). Returns: object
jtag_scanA
Enumerate the JTAG chain through Apollo and return IDCODEs (0x21111043 = LFE5U-12F). Needs Apollo to own the port: if gateware is running it is handed off (its USB disappears; use reconfigure_fpga or run_gateware to get it back). Does not alter the FPGA configuration or flash.
Inputs: no named parameters. Returns: object
led_setA
Drive one of the 6 FPGA LEDs through the Moondancer firmware. Requires facedancer mode.
Inputs: index (required), state (required). Returns: object
list_bundled_assetsARead-onlyIdempotent
List the gateware bitstreams (per board revision) and firmware images bundled with the installed cynthion package. No hardware needed.
Inputs: no named parameters. Returns: object
list_devicesARead-onlyIdempotent
Non-invasively enumerate Cynthion-related USB devices (Apollo 1d50:615c, gateware 1d50:615b...) with their mode, strings, revision and interfaces. Does not touch the FPGA.
Inputs: no named parameters. Returns: object
read_flashA
Dump SPI flash content to a file. Stops the running gateware; the FPGA is rebooted from flash afterwards.
Inputs: output_path (required), length, offset. Returns: object
reconfigure_fpgaA
Reboot the FPGA from SPI flash (soft reset + allow gateware USB takeover). Restores the flashed gateware (analyzer by default) and stops whatever was running.
Inputs: wait. Returns: object
run_gatewareA
Load a bundled gateware (analyzer, facedancer or selftest) matching the board revision into FPGA SRAM. Volatile (lost on power cycle); stops the running gateware. facedancer may also write SoC firmware to flash.
Inputs: target (required), wait, timeout_s, update_soc_firmware. Returns: object
run_selftestA
Load the selftest gateware and run the hardware self-tests (debug module, PHYs, HyperRAM). Stops the running gateware.
Inputs: restore_after. Returns: object
server_statusARead-onlyIdempotent
Overall server state: package versions, platform, detected Cynthion mode and devices, analyzer capture status and Facedancer emulation status. Never fails when no hardware is connected.
Inputs: no named parameters. Returns: object
set_led_patternA
Set the Apollo debug-MCU LED pattern. Requires Apollo to own the CONTROL port (hands off from gateware).
Inputs: pattern (required). Returns: object
update_apollo_firmwareADestructive
PERSISTENT: update the Apollo debug MCU firmware over DFU. Do not unplug during the update. Requires confirm=true after asking the user.
Inputs: path, confirm. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 50 tools
The tools are grouped into recognizable hardware subsystems, but several boundaries are fuzzy: analyzer_capture overlaps with the analyzer_start/status/read/summary workflow, and run_gateware/configure_bitstream/flash_gateware/reconfigure_fpga/force_fpga_offline require careful reading to choose correctly. led_set versus set_led_pattern is also easy to confuse, though the descriptions often clarify mode requirements.
All names use snake_case and readable prefix clusters, but the convention is mixed: analyzer_start and led_set are noun-first, while list_devices and set_led_pattern are verb-first. The set remains understandable, but it does not follow a single predictable verb_noun pattern.
Fifty tools is very heavy for an agent to manage, even for a complex FPGA/USB hardware server. Several operations could be consolidated, especially the one-shot analyzer_capture against the multi-step analyzer tools and facedancer_serial_write against facedancer_command.
The surface is unusually complete for the domain: device discovery, gateware build/load/flash, JTAG, SPI flash, analyzer capture/decode/export, Facedancer emulation, GPIO, LEDs, logs, and firmware update are all covered. There are no obvious lifecycle gaps for the stated hardware-debugging purpose.
Maintenance
Related MCP Connectors
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Remote MCP for JSON repair, hashing, formatting, IDs, dates, units, and other small tools.
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
One MCP server for all your MCP servers: code mode, per-tool permissions, approvals and audit.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceDrive a Cynthion USB test instrument from an LLM via the Model Context Protocol. Sniff, decode, and emulate USB devices over chat.7BSD 3-Clause
- 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 gradedqualityDmaintenanceModular MCP server for interacting with a Flipper Zero from MCP-capable clients (including Claude Desktop). Supports system info, BadUSB scripts, and music playback over USB or WiFi.37MIT
- AlicenseCqualityCmaintenanceEnables MCP clients like Cursor to control logic analyzers, open capture files, decode buses such as Intel 8080, and reconstruct display framebuffers like ST7789.19MIT