Skip to main content

MPY Workbench for Claude Code

Let Claude run, upload and debug MicroPython on your board. Plug in an ESP32, a Raspberry Pi Pico or another MicroPython board, and ask: "make the LED blink every half second". Claude writes the code, runs it on the board, reads the output and the traceback, and fixes it.

No VS Code needed. The only requirement is Python 3.8 or newer: everything else (mpremote) is installed on first use, in a folder of its own.

Install

In Claude Code:

/plugin marketplace add DanielBustillos/mpy-workbench
/plugin install mpy-workbench@mpy-workbench

Or only the board tools, in one line (needs uv):

claude mcp add mpy-workbench -- uvx mpy-workbench mcp

In Claude Desktop (the chat app, not Claude Code): download mpy-workbench-<version>.mcpb from the newest plugin-v… release on the Releases page, open it, pick your project folder and click Install. Then ask Claude, for example, "blink the LED on my ESP32".

What Claude can do

Tool What it does
run_file Uploads every project file that changed (syntax-checked first), runs the file, returns output and traceback
run_code Runs a few lines, like the REPL
read_output / stop Reads what a program that keeps running printed, or stops it
upload Uploads a file or folder; only what changed, checked by SHA-256
sync / diff Makes the board match the project folder, or shows what differs (with a line diff for one file)
list_files / read_file Looks at the board's files
board_info / list_ports Chip, MicroPython version, memory, ports
soft_reset Clears memory and imported modules

Project files keep their path on the board: lib/util.py here is /lib/util.py there.

Live output. A program that keeps running after run_file's timeout (a blink, a sensor loop, a server) goes on writing what it prints to .mpy-workbench/output.log in the project, live. Watch it with tail -f .mpy-workbench/output.log or mpywb follow. A background process holds the port for that, and gives it up as soon as any command needs the board, the program ends or Claude's session closes.

The board follows the project

  • Auto-upload: in a MicroPython project (one with a .mpy-workbench/ folder or a .mpyignore file), every file Claude writes or edits goes to the board right away, and Claude is told. Other projects are never touched. Set MPYWB_AUTO_UPLOAD=1 to do it in any project, or 0 to turn it off.
  • Ignore rules: .mpyignore (or .mpy-workbench/.mpyignore, the one the VS Code extension uses) lists what stays off the board, one pattern per line: *.md, docs/, /secret.py, **/test_*. .git, node_modules, __pycache__ and similar are always skipped.
  • Sync: sync uploads every file that differs; files that are only on the board are kept unless you ask to delete them (dry_run shows the plan first).
  • Before running: run_file first uploads every project file that differs from the board (so a changed module it imports is not left stale), never deleting anything.
  • Syntax check: run_file, upload, sync and auto-upload compile changed .py files on your computer first; with a syntax error nothing is uploaded and the error names the file and line. MPYWB_SYNTAX_CHECK=0 turns it off.
  • Two sessions, one board: commands from different Claude Code sessions (or the terminal) take turns on a board; one waits up to 20 s (MPYWB_LOCK_WAIT) for the other, then says who has it. A busy port names the program holding it (macOS, Linux), and a port that doesn't exist says so and lists the ports there are.

From the terminal

The same tool works without Claude:

pip install mpy-workbench   # or run python3 plugin/bin/mpywb without installing
mpywb run main.py
mpywb diff               # what differs between the project and the board
mpywb sync --dry-run     # what sync would upload
mpywb follow             # watch a running program's output live (Ctrl-C quits)
mpywb --help

Other MCP clients (Cursor, VS Code Copilot, Windsurf…)

The board tools are a standard MCP server on stdio:

{ "mcpServers": { "micropython-board": { "command": "uvx", "args": ["mpy-workbench", "mcp"] } } }

(or "command": "mpywb", "args": ["mcp"] after pip install mpy-workbench).

With VS Code

The MPY Workbench extension keeps the port open while VS Code works with the board. From version 0.4.5 it shares it: Claude's calls go through VS Code, and what Claude runs shows in the MPY Board terminal. With an older version, run MPY Workbench: Release Serial Port there first.

Windows

The plugin starts python3. If your Python is called python or py, set MPYWB_PYTHON (for example in the env section of Claude Code's settings.json: "MPYWB_PYTHON": "python").

Limits

  • Boards with a USB-serial chip (CP210x, CH340, FTDI: many ESP32 dev boards) open with DTR and RTS low, so opening the port doesn't reset them. If a board needs the old behaviour, set MPYWB_RESET_ON_OPEN=1.
  • Tested with a board on macOS (ESP32-S3). Windows and Linux are covered by the automatic tests, without a board.

Metadata

Release files for mpy-workbench 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mpy-workbench 0.3.0
File Size Uploaded Provenance Actions
mpy_workbench-0.3.0.tar.gz 42.9 kB With provenance Details for mpy_workbench-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mpy-workbench 0.3.0
File Interpreter ABI Platform Actions
mpy_workbench-0.3.0-py3-none-any.whl Python 3 none any Details for mpy_workbench-0.3.0-py3-none-any.whl

Total release size: 81.3 kB

Release files / mpy_workbench-0.3.0.tar.gz

Download URL mpy_workbench-0.3.0.tar.gz
Size 42.9 kB
Tags Source
SHA-256 checksum
How to use checksums
faf152555aa09ec0f457a9a3393fba39d55eb3ed7f9bfa739be412581e2ba635
BLAKE2b-256 checksum
How to use checksums
13e8e6176d4f1b6c3955f664909cb24264fad7b03fed0ff754ababa2b60b0840
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Release files / mpy_workbench-0.3.0-py3-none-any.whl

Download URL mpy_workbench-0.3.0-py3-none-any.whl
Size 38.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7ab0d89dbd3b431c0e059236f659d761832abcfc8c6ba9eae778bd86698e327
BLAKE2b-256 checksum
How to use checksums
78c9270132b37df4b4967e6ca868f3b030a46131e484d8eb7bd0491142e25c6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

Security for mpy-workbench 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mpy_workbench-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page