Skip to main content

MCUscope

MCUscope is a hardware debug bridge for embedded targets. It lets both humans and AI agents (such as Claude Code) talk to an STM32 (or any) microcontroller over a serial link: send CAN/I2C/SPI/GPIO/ADC commands, stream and query timestamped debug output, and plot realtime data in the browser.

A single daemon (mcuscoped) owns the serial port, timestamps every line into SQLite, and serves a local REST + WebSocket API and a web UI on 127.0.0.1:8765. The mcu CLI is a thin client over that API and is the primary interface for both the human and the agent.

This package (mcuscope) is the host side. The portable C firmware "monitor" module that runs on the target, a hardware-free simulator, and the full specification live in the project repository.

MCUscope web UI

Install

Requires Python 3.11 or newer.

uv tool install mcuscope        # or: pipx install mcuscope

This exposes three console scripts on your PATH: mcuscoped (the daemon), mcu (the CLI), and mcu-sim (the hardware-free simulator).

To reach a real serial port, one OS-specific step:

  • Linux: your user must be in the dialout group: sudo usermod -aG dialout $USER, then log out and back in. Without it, opening /dev/ttyACM0 fails with permission denied.
  • Windows 10/11: most USB-serial adapters and ST-Link VCPs work with the in-box driver; some need the vendor driver (CP210x, CH340, FTDI).

Neither is needed for the quickstart below, which runs with no hardware attached.

Quickstart

No hardware needed to try it:

mcuscoped --sim --open            # daemon + built-in simulator; opens the web UI

The web UI at http://127.0.0.1:8765/ui/ shows the live terminal, CAN table, and realtime plots. The Plots panel also renders a Digital/Enum view (logic-analyser bit traces and labelled enum/state bands) sharing the same time base and cursor as the analog charts.

With real hardware, start the daemon first (it owns the port and captures everything), then attach the port - from the UI's + Attach dialog, or the CLI:

mcuscoped                                              # serves the API + web UI on :8765
# in another terminal (or use `mcu daemon start` to background the daemon):
mcu devices                                            # find the port name
mcu attach /dev/ttyACM0 --baud 115200 --alias board    # Linux
mcu attach COM7 --baud 115200 --alias board            # Windows

mcu status                        # daemon + port health
mcu cmd ping                      # -> monitor 1 <project>  (port-layer name, not the alias)
mcu cmd 'i2c scan'                # -> 48 50
mcu tail -f                       # follow live capture

Every command takes --json for a single machine-readable object and returns meaningful exit codes (0 success/match, 1 error or bad usage, 2 timeout, 3 daemon unreachable). Run mcu ai-guide for a compact, agent-oriented cheat sheet.

The simulator also runs standalone (mcu-sim, prints e.g. socket://127.0.0.1:9900); attach it like any device: mcu attach socket://127.0.0.1:9900 --alias sim.

Documentation

Full quickstart, configuration reference, protocol/API specification, and firmware integration guide are in the project repository.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcuscope-0.1.0.tar.gz (238.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcuscope-0.1.0-py3-none-any.whl (195.1 kB view details)

Uploaded Python 3

File details

Details for the file mcuscope-0.1.0.tar.gz.

File metadata

  • Download URL: mcuscope-0.1.0.tar.gz
  • Upload date:
  • Size: 238.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mcuscope-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e76ad06d0ce56d712fb45a7f029deb7e2ed5bfbf713d4542844e0382acb28293
MD5 3b861cd8835f9d79a3eee41aed694269
BLAKE2b-256 6e6167d9dddb6c5e2e0688be113f3fd2c36d35a070327dd2dcbf3e9d87b7601d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcuscope-0.1.0.tar.gz:

Publisher: release.yml on dwatman/mcuscope

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcuscope-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcuscope-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 195.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mcuscope-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51685b32b12c2f4e437e57785b310920296375d1ac0d98438dbf9cf52eb67e0b
MD5 b478a437280c36957e8edd1d95ae4631
BLAKE2b-256 17653cf99370722ce60600d83316ab7c486fcaa272c157649e098447f0cb0206

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcuscope-0.1.0-py3-none-any.whl:

Publisher: release.yml on dwatman/mcuscope

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page