Skip to main content
Glama
pico-bay

pico-bay

Official

Pico Bay

Platform: Cross-Platform Version 0.9.50 Node 20+ Protocol: MCP Tools: 14 License: MIT Status: Beta Build Status

pico-bay is an App and MCP Server for managing Raspberry Pi Pico and ESP32 boards with MicroPython and CircuitPython over USB. It runs with Node.js built-in modules and needs no browser extension or runtime npm dependencies.

Quick start

Requires Node.js 20 or newer.

npx pico-bay

Your browser will open automatically! If it doesn't, head to http://localhost:7426. On a Raspberry Pi, open http://PI_HOST_ADDR:7426 from another device on the same network, replacing PI_HOST_ADDR with the Pi's IP address or hostname.

Port 7426 spells PICO on a phone keypad, a nod to the T9 years and flip-phone era.

Related MCP server: embedded-mcp

Devices

  • Supports Raspberry Pi Pico and ESP32 boards with MicroPython or CircuitPython, including Pico, Pico W, Pico 2, Pico 2 W, ESP32, ESP32-S2, ESP32-C3, ESP32-C6, and ESP32-S3.

  • Detects multiple connected boards and follows USB hot-plug events.

  • Detects MicroPython or CircuitPython automatically, including whether its filesystem is read-only or writable.

  • Detects RP2040 and RP2350 BOOTSEL mode and installs the latest MicroPython firmware for the selected Pico model.

  • Detects Espressif ROM download mode over USB serial, shows the detected chip details, and installs the latest generic MicroPython firmware on supported ESP32 chips.

  • Shows Flash and RAM usage for each board.

  • Supports soft reset, hard reset, Ctrl-C interruption, and filesystem cleanup.

Files

  • Browses the complete filesystem as a searchable, collapsible tree.

  • Shows file sizes and modification times when the board provides them.

  • Creates, renames, moves, uploads, downloads, and recursively deletes files and folders.

  • Opens text files with Python and JSON highlighting.

  • Renders a safe Markdown preview without executing embedded HTML.

  • Detects binary files and offers them for download instead of displaying them as text.

  • Downloads and restores the complete filesystem as a standard ZIP archive.

Run and console

  • Runs any Python file as __main__ without replacing main.py.

  • Streams program and boot output to a live console.

  • Accepts console input and can interrupt a running program with Ctrl-C.

MCP server

pico-bay includes a dependency-free Model Context Protocol server, enabled by default on Raspberry Pi hosts. On macOS and other non-Pi hosts, enable MCP in the user interface or with --mcp stdio or --mcp http.

Claude Desktop and Claude Code

In Claude Desktop, open Plugins in the sidebar, choose Add > Add marketplace and enter ctrlpi/claude-plugins. The marketplace appears as ctrlpi; install pico-bay from it.

In Claude Code, run /plugin marketplace add ctrlpi/claude-plugins, then /plugin install pico-bay@ctrlpi.

Streamable HTTP

To use pico-bay on a remote computer or Raspberry Pi, start it there:

npx pico-bay

A Raspberry Pi serves MCP on the network by default; on another computer, add --mcp http --host 0.0.0.0.

On the desktop, install pico-bay-remote from the ctrlpi/claude-plugins marketplace, or add ctrlpi-remote to any MCP client:

{
  "mcpServers": {
    "pico-bay-remote": { "command": "npx", "args": ["-y", "ctrlpi-remote", "pico-bay"] }
  }
}

ctrlpi-remote finds pico-bay on your network and claims its key the first time. Nothing else to set.

Key, no TLS: /mcp accepts only the claimed key, saved in ~/.ctrlpi/pico-bay-config.json on the remote machine (delete mcp.api_key there to reset). The web interface has no key: disable it with --ui off, so nothing answers without the key. Plain HTTP: trusted networks only.

The server supports MCP revision 2026-07-28 and the legacy initialize flow through 2025-03-26. It uses plain JSON responses rather than SSE because it does not send server-initiated messages.

You can also use it with mcp-remote from any client that only speaks stdio: npx -y mcp-remote http://<host>:7426/mcp --allow-http --header "Api-Key:<your-mcp-key>". Unlike ctrlpi-remote, it does not find the server or claim its key for you.

MCP tools

Tool

Purpose

pico_boards_list

List connected boards, stable board IDs, firmware details, and capabilities.

pico_files_list

List the board filesystem and report Flash and RAM usage.

pico_file_read

Read a text or binary file using UTF-8 or base64.

pico_file_write

Create or overwrite a UTF-8 or base64 file, up to 8 MB decoded.

pico_directory_create

Create a directory.

pico_path_rename

Rename or move a file or directory.

pico_path_delete

Permanently delete a file or recursively delete a directory.

pico_python_run

Run a file as __main__ or execute Python code and return its output.

pico_board_interrupt

Send Ctrl-C to interrupt a running program.

pico_board_reset

Soft-reset a board or request a supported hard reset.

pico_board_bootloader

Put a board into BOOTSEL or ESP32 download mode for pico_install.

pico_ctrlpi_install

Install or update the ctrlPi API agent on a Pico W, Pico 2 W, ESP32, ESP32-S3, ESP32-C3 or ESP32-C6.

pico_ui

Open the web UI in the browser, or return its address when pico-bay runs on another computer. action: "stop" stops it.

pico_install

Check and install MicroPython on a Pico in BOOTSEL mode or a supported ESP32 in DOWNLOAD mode.

Call pico_boards_list first, then pass its board_id to board-specific tools. ZIP backup/restore, live console streaming, and Delete all files are intentionally not exposed through MCP.

Installing the ctrlPi API

On a board running MicroPython, Install ctrlPi API in the top-right menu turns it into a ctrlPi agent:

Board

Agent

Files downloaded from GitHub

Pico W, Pico 2 W

pico-gpio-api

app.mpy, upgrader.mpy, main.py

ESP32, ESP32-S3, ESP32-C3, ESP32-C6

esp32-gpio-api

app.mpy, boot.py, upgrader.mpy, main.py

app.mpy is the agent, precompiled, upgrader.mpy runs its over-the-air /upgrade, and main.py loads one of them. Fill in the WiFi SSID and password, and optionally an API key and an agent name; pico-bay downloads the latest files, checks them, writes them (main.py last) together with config.json, wifi.txt and a sample scripts/cpu-temp.py sensor for that board, and resets it. The menu item is greyed out on other boards (a Pico without WiFi, or CircuitPython).

On a board that already runs the agent, the form is filled in from its current files, and its existing settings (pins, sensors, bridges) are kept: only the key and name are replaced, and an existing cpu-temp.py is left alone. A blank name keeps the agent's own default, pico-<serial4> or esp32-<serial4>. A blank API key keeps the board's own key, or uses the default your-secret-key on a board without one: that key is public, so change it before relying on the agent.

Installing MicroPython in BOOTSEL mode

On a Pico running MicroPython or CircuitPython, select Reboot to BOOTSEL from the top-right menu and confirm. To enter manually, disconnect the board, hold its BOOTSEL button, and reconnect USB while continuing to hold it. Keep holding for 3 seconds, then release. pico-bay shows the RP2040 or RP2350 boot device as a red pill. Select it and choose if this is a W model (with Wi-Fi) or not, as it is not autodetectable. To cancel before installing firmware, unplug USB and plug it back in without holding any buttons.

pico-bay confirms the operation, downloads the latest matching MicroPython UF2 from micropython.org, validates it, and copies it to the boot volume. The screen reports the download, validation, installation, and reboot stages. Keep the board connected during installation. It reboots automatically and then appears as a normal MicroPython device.

ESP32 download mode

Select Enter download mode… from the top-right menu and confirm. For manual entry, hold BOOT/IO0, press and release RESET / EN, and keep holding BOOT/IO0 for 3 seconds, then release. Alternatively, unplug USB and hold BOOT/IO0. Plug the USB cable back in while continuing to hold BOOT/IO0. Keep holding for 3 seconds, then release. Click Scan in pico-bay, then select the red DOWNLOAD pill to see the detected chip and security details. To cancel before installing firmware, unplug USB and plug it back in without holding any buttons.

Select Install MicroPython to download, validate, install, and verify the latest official generic build. Erase and initialize storage is selected by default and runs after firmware verification, before reboot; uncheck it to preserve existing files. The screen shows each stage and the write progress percentage. Installation uses the ESP32 ROM without extra dependencies and is disabled when the chip is unsupported, unidentified, or protected by flash security.

Requirements

  • Node.js 20 or newer.

  • MacOS, Linux, Windows, or Raspberry Pi OS.

  • A USB-connected Raspberry Pi Pico or ESP32 board running MicroPython or CircuitPython, or a supported board in bootloader mode.

  • Permission to open the board's serial device.

  • On Windows, the .NET Framework v4 C# compiler (csc.exe) is required to build the serial helper automatically at startup.

  • For ESP32 on Windows, the appropriate serial driver installed (see Troubleshooting).

  • For ESP32 resets and download mode on macOS and Linux, Perl or Python 3 (standard library only), which drives the DTR and RTS lines.

Install

From GitHub:

git clone https://github.com/ctrlpi/pico-bay.git
cd pico-bay
npm start

Or install the npm package locally:

npm install pico-bay
npx pico-bay

Options

pico-bay [--port PORT] [--host ADDRESS] [--allow-host NAME] [--hold MILLISECONDS] [--no-open] [--ui on|off] [--mcp off|http|stdio] [--config PATH] [--help] [--version]

No environment variables are required: each one in the table is an optional alternative to its flag. Command-line values take precedence over environment variables. Boolean environment variables accept true or false, and 1 or 0.

Running on a Raspberry Pi

On Linux, pico-bay checks /proc/device-tree/model. When the host is a Raspberry Pi, it listens on 0.0.0.0 by default so another computer on the same network can open it. It does not try to launch a browser on the Pi itself, and Streamable HTTP MCP is enabled at /mcp by default. Start with --mcp off to disable MCP while keeping the web interface available.

Several USB-connected boards may require a powered USB hub and a reliable Raspberry Pi power supply. MicroPython usually uses slightly less power because it exposes only serial; CircuitPython also exposes storage and HID. After an undervoltage event, pico-bay warns that USB may have stopped; fix the power issue and reboot the Pi.

Raspberry Pi OS Lite and other headless installations commonly detect CircuitPython USB storage without mounting it. When udisksctl is available, pico-bay automatically mounts unmounted VFAT partitions labeled CIRCUITPY as the current user, then matches each volume to its board through boot_out.txt. If mounting is unavailable or denied, it falls back to serial access.

BOOTSEL storage may also be detected without being mounted. pico-bay attempts to mount it with udisksctl; if Raspberry Pi OS requires permission, the installation screen shows the command to run on the Pi and a Proceed button to retry afterward.

Only expose pico-bay on a trusted network. It has no login and can modify or erase files on connected boards.

Board access

pico-bay uses the firmware's raw REPL for serial operations. A serial file or board operation briefly interrupts the running program, performs the requested work, and then soft-resets the board so its normal program resumes. Related operations share a short session controlled by --hold; use --hold 0 to release the board after every operation. Toolbar file execution and interactive console commands are available with either firmware.

Reads, writes, uploads, and downloads are binary-safe.

For CircuitPython, pico-bay matches each CIRCUITPY volume by hardware UID. It uses the mounted volume for faster file access when available and serial otherwise. The UI shows read-only only when neither route can write.

When pico-bay stops, it attempts to reset any open board so it is not left halted. Files written to Flash remain after reset; in-memory state does not.

Backups

Download ZIP creates a standard archive of all board files. Restore recreates its files and folders, overwrites matching paths, and leaves other board files untouched. Keep a separate copy of important files before restoring or using Delete all files.

Security

pico-bay can run code, overwrite files, reset a board, and erase its filesystem. It is intended for a trusted local workstation.

  • The server listens on 127.0.0.1 by default, or 0.0.0.0 when the host is a Raspberry Pi.

  • Requests must be addressed to an IP address, localhost, the machine's own name (or <name>.local), or a name given with --allow-host. Any other name gets 403, which blocks DNS rebinding: a web page cannot point its own domain at your machine and drive pico-bay through it.

  • State-changing requests require the expected HTTP method and same-origin access.

  • Device paths reject invalid or traversing path segments.

  • The app has no authentication, TLS, authorization, or multi-user isolation.

Do not expose it to an untrusted network.

Troubleshooting

No board appears

  • For file access, confirm that the board is running MicroPython or CircuitPython. Supported bootloader modes appear as red device pills instead.

  • Use a USB data cable and check that its serial device appears under /dev on macOS/Linux or Ports (COM & LPT) in Windows Device Manager.

  • On Linux, check serial permissions, commonly provided by the dialout group.

  • On Windows, if your ESP32 board is not detected at all, you may be missing its serial driver. Many ESP32 boards use a CP210x USB to UART bridge. Download the CP210x Universal Windows Driver and extract the ZIP. Open Device Manager, find the unrecognized device (often under "Other devices"), right-click it, select Update driver → Browse my computer for drivers, and select the extracted folder.

  • Close Thonny, mpremote, screen, and other programs that may own the serial port.

  • For identification or installation failures, check the Pico Bay terminal for the underlying error.

BOOTSEL does not appear

On Linux, check lsusb, lsblk -p -o NAME,LABEL,FSTYPE,MOUNTPOINT, and sudo dmesg | tail -60. USB enumeration errors must be resolved before mounting can work; try another data cable or USB port and check the Pi's power supply. An unmounted RPI-RP2 or RP2350 volume should still appear in Pico Bay.

A command times out

  • Startup code may be keeping the board busy or disabling interrupts.

  • Increase --hold when repeated operations collide with a slow main.py startup.

  • Disconnect and reconnect the board to recover an unknown raw-REPL state.

The program restarts after file access

This is expected. Raw-REPL access interrupts the program, and pico-bay resets the board afterward so main.py can resume.

Tests

Run the dependency-free test suite with:

npm test

The test suite covers parsing, ZIP handling, device discovery, HTTP and MCP APIs, and mocked firmware installation. The optional hardware section reports every discovered board, skipping bootloader devices and failing unidentified devices. Other boards continue testing: MicroPython and writable CircuitPython receive temporary file/folder write-read-delete checks; read-only CircuitPython receives capability and console checks. With no devices found, the hardware section is skipped.

Known limits

  • Filesystem operations temporarily stop the running application.

  • Uploads are limited to 8 MB; ZIP restore supports Store or Deflate with up to 512 files and 16 MB decompressed.

  • pi-gpio-api: Raspberry Pi GPIO REST server that reads inputs and drives outputs (and named sensors) over an HTTP API.

  • pico-gpio-api: Raspberry Pi Pico W port of the GPIO REST server, with the same endpoints, wire format, and auth.

  • esp32-gpio-api: ESP32 port of the GPIO REST server for MicroPython, with the same endpoints, wire format, and auth.

  • ctrlpi-mcp: MCP server that exposes GPIO control as tools for AI agents (e.g. Claude), executing them over the agents' REST API.

  • homebridge-ctrlpi: A Homebridge plugin that brings Raspberry Pi, Pico W, and ESP32 GPIO into Apple Home, by driving one or more GPIO agents over their REST API.

  • ctrlpi-matter (coming soon): Matter bridge that exposes GPIO pins and sensors to any Matter platform (Apple Home, Google Home, Alexa, Home Assistant), driven over the agents' REST API.

  • ctrlpi-cli: Command-line interface for interacting with ctrlPi agents, with shared agent configuration.

  • ctrlpi-lab: A local browser dashboard for your ctrlPi setup. Test GPIO and sensor endpoints, watch webhook events, and tail agent logs.

  • pi-bay: A local web app and MCP server for Raspberry Pi boards over the network. Edit files, open a remote terminal, and manage your Pi remotely.

License

MIT

Available Tools

14 tools
pico_board_bootloaderPut a board into firmware install modeA
Destructive

Restart the selected board into firmware install mode: BOOTSEL on a Pico, ROM download mode on an ESP32. The running program stops and the board leaves its normal serial port, so ask the user first. When an ESP32 cannot be reset automatically the result has manual: true and a reason, and the user must hold BOOT while pressing RESET. Afterwards call pico_boards_list, then pico_install with action check.

Inputs: board_id (required).

pico_board_interruptInterrupt a board programA

Send Ctrl-C to interrupt the program currently running on the selected board.

Inputs: board_id (required).

pico_board_resetReset a boardA
Destructive

Soft-reset the selected board, or hard-reset it when the firmware supports hard reset.

Inputs: board_id (required), mode.

pico_boards_listList connected boardsA
Read-only

List connected Raspberry Pi Pico and ESP32 boards with MicroPython or CircuitPython and report their capabilities. Use board_id from this result in every other tool.

pico_ctrlpi_installInstall the ctrlPi API on a boardA
Destructive

Install or update the ctrlPi API agent on a Pico W, Pico 2 W or an ESP32 running MicroPython (pico-gpio-api or esp32-gpio-api, downloaded from GitHub; the ESP32 agent officially supports the ESP32, ESP32-S3, ESP32-C3 and ESP32-C6; other ESP32 chips are allowed but not officially supported). Writes app.mpy, upgrader.mpy and main.py (plus boot.py on an ESP32), then config.json (the board's own kept, with this api_key and name), wifi.txt and scripts/cpu-temp.py when missing, and resets the board. It replaces main.py, so ask the user first and pass confirmed: true.

Inputs: board_id (required), confirmed (required), wifi_ssid (required), name, +2 more.

pico_directory_createCreate a board directoryA

Create a directory on the selected board, with any missing parent directories. An existing directory is not an error.

Inputs: path (required), board_id (required).

pico_file_readRead a board fileA
Read-only

Read one board file. auto returns UTF-8 text when safe and base64 for binary data; utf8 forces text; base64 always returns base64.

Inputs: path (required), board_id (required), encoding.

pico_files_listList board filesA
Read-only

List the complete board filesystem and report Flash and RAM usage. Hidden files (names starting with .) are omitted unless show_hidden is true.

Inputs: board_id (required), show_hidden.

pico_file_writeWrite a board fileA
Destructive

Create or overwrite one board file, creating missing parent directories. content may be UTF-8 text or base64 and is limited to 8 MB decoded.

Inputs: path (required), content (required), board_id (required), encoding.

pico_installInstall firmware on a bootloader-mode boardA
Destructive

Install MicroPython on a Pico in BOOTSEL mode or a supported ESP32 in DOWNLOAD mode. Always call action check first. A Pico may require mounting and a Wi-Fi model choice. An ESP32 uses the detected chip-specific generic build. Obtain explicit confirmation before calling action install.

Inputs: action (required), board_id (required), firmware (required), wifi, +2 more.

pico_path_deleteDelete a board pathA
Destructive

Permanently delete one file or recursively delete one directory from the selected board.

Inputs: path (required), board_id (required).

pico_path_renameRename or move a board pathA
Destructive

Rename or move one file or directory on the selected board. The destination's folder must already exist, and an existing file at the destination may be replaced: check first.

Inputs: to (required), from (required), board_id (required).

pico_python_runRun Python on a boardA
Destructive

Run a Python file as main or execute Python code. Provide exactly one of path or code. This can change any state accessible to code on the board. A program still running after timeout_ms is interrupted with Ctrl-C.

Inputs: board_id (required), code, path, timeout_ms.

pico_uiOpen or stop the pico-bay web UIA

Open the pico-bay web UI (files, console, backup, firmware install) in the browser, starting its web server when needed (action open, the default). When pico-bay runs on a Raspberry Pi or another remote machine it cannot open the user's browser: the result then has opened: false, and url is the address to open in a browser on the user's computer. Action stop stops a web server this tool started; the pico-bay app itself is never stopped.

Inputs: action.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 14 tools

    Disambiguation4/5

    Most tools have clearly distinct resource-and-action purposes, and the descriptions help separate file operations from board operations. The main potential confusion is between pico_install and pico_ctrlpi_install, and to a lesser degree the reset/interrupt/bootloader trio, but each still has a distinct role.

    Naming Consistency3/5

    All names use snake_case with a pico_ prefix, but the patterns are mixed: some are plural-resource-first (pico_boards_list, pico_files_list), some are singular-resource-first (pico_file_read, pico_path_rename), and others are verb-only or UI-oriented (pico_install, pico_ui). The convention is still readable, but it is not a single predictable verb_noun pattern.

    Tool Count5/5

    Fourteen tools is within the well-scoped range for a board management server covering filesystem, execution, firmware, and UI operations. Each tool has a clear place in the workflow, and the count does not feel bloated.

    Completeness5/5

    The tool set covers board discovery, reset/interrupt/bootloader, file and directory CRUD, filesystem listing, Python execution, firmware installation, ctrlPi API installation, and a web UI. This provides a comprehensive lifecycle for managing Pico and ESP32 boards without obvious dead ends.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to interact with physical embedded target boards over a dual-CDC USB bridge using MCP tools. It exposes console reading, pattern waiting, command sending, reboot/login state machines, and in-RAM MicroPython execution while a single-owner daemon safely arbitrates access to the serial devices.
      6
      4
      Apache 2.0