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.
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
dialoutgroup:sudo usermod -aG dialout $USER, then log out and back in. Without it, opening/dev/ttyACM0fails 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.
What your firmware has to send
Nothing, to start with. Any line-based printf output is captured, timestamped, filtered
and searchable as-is, so MCUscope is useful as a better serial terminal with no firmware
changes at all. The only rule is that debug lines must not begin with < or !, which
are reserved for the monitor protocol.
Two extra line formats get you realtime plots and timeline markers, with no library and no
float printf:
printf("!p %lu temp=%d.%02d rpm=%d\n", tick_ms, whole, frac, rpm);
printf("!m @%lu calibration start\n", tick_ms); // marker; the @tick is optional
!p <tick> <name>=<value> ..., values integer, fixed-point or scientific notation. Each
name becomes a plot channel. Adding the portable C monitor module is only needed when you want the host to
send commands to the firmware, or want decoded CAN and typed digital/enum streams. See
What your firmware has to send.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcuscope-0.1.1.tar.gz.
File metadata
- Download URL: mcuscope-0.1.1.tar.gz
- Upload date:
- Size: 245.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a8e335ee8c5b77a6af33f5e3eeec62a3f7bd6e4e6e03afa9459b30c56e88546
|
|
| MD5 |
06bd5e5829f30a527f88825e7ce0b76f
|
|
| BLAKE2b-256 |
c3ed9dfbf5360173d00779c7eaebf9a35aed0aeb48736fdb55401e43c378642f
|
Provenance
The following attestation bundles were made for mcuscope-0.1.1.tar.gz:
Publisher:
release.yml on dwatman/mcuscope
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcuscope-0.1.1.tar.gz -
Subject digest:
6a8e335ee8c5b77a6af33f5e3eeec62a3f7bd6e4e6e03afa9459b30c56e88546 - Sigstore transparency entry: 2270129405
- Sigstore integration time:
-
Permalink:
dwatman/mcuscope@8ea0dff93f69af7cf71d1385bd28ec4608e360e3 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/dwatman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8ea0dff93f69af7cf71d1385bd28ec4608e360e3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mcuscope-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mcuscope-0.1.1-py3-none-any.whl
- Upload date:
- Size: 199.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b584658274d5d052a0d598bbb9cb6ec518f1b22221368609e30fbe1f6c54c188
|
|
| MD5 |
6050c2e057c1932cca4ff59721344c22
|
|
| BLAKE2b-256 |
17afb0e584160fe9450b169e6cb905f1499298f9c99659e7c0066f1632cfdd9c
|
Provenance
The following attestation bundles were made for mcuscope-0.1.1-py3-none-any.whl:
Publisher:
release.yml on dwatman/mcuscope
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcuscope-0.1.1-py3-none-any.whl -
Subject digest:
b584658274d5d052a0d598bbb9cb6ec518f1b22221368609e30fbe1f6c54c188 - Sigstore transparency entry: 2270129785
- Sigstore integration time:
-
Permalink:
dwatman/mcuscope@8ea0dff93f69af7cf71d1385bd28ec4608e360e3 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/dwatman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8ea0dff93f69af7cf71d1385bd28ec4608e360e3 -
Trigger Event:
push
-
Statement type: