# ctrlpi/pico-bay [Health: Active]

**Category:** 📟 Embedded System  
**Repository:** https://github.com/ctrlpi/pico-bay  
**GitHub Stars:** 10  
**npm Downloads (last month):** 1125  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ctrlpi-pico-bay

## Description
Browse and edit files, run Python and install firmware on Raspberry Pi Pico and ESP32 boards over USB.

## Tools
Capabilities this server exposes over MCP:

- **pico_boards_list** — 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_files_list** — List the complete board filesystem and report Flash and RAM usage. Hidden files (names starting with .) are omitted unless show_hidden is true.
- **pico_file_read** — Read one board file. auto returns UTF-8 text when safe and base64 for binary data; utf8 forces text; base64 always returns base64.
- **pico_file_write** — 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.
- **pico_directory_create** — Create one directory on the selected board.
- **pico_path_rename** — Rename or move one file or directory on the selected board.
- **pico_path_delete** — Permanently delete one file or recursively delete one directory from the selected board.
- **pico_python_run** — 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.
- **pico_board_interrupt** — Send Ctrl-C to interrupt the program currently running on the selected board.
- **pico_board_reset** — Soft-reset the selected board, or hard-reset it when the firmware supports hard reset.
- **pico_board_bootloader** — 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.
- **pico_ctrlpi_install** — 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.
- **pico_ui** — 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.
- **pico_install** — 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.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "pico-bay": {
    "command": "npx",
    "args": ["-y","pico-bay"]
  }
}
```

## Documentation

## What ctrlpi/pico-bay MCP server does

ctrlpi/pico-bay provides MCP access to Raspberry Pi Pico and ESP32 boards connected over USB. It supports MicroPython and CircuitPython on Pico, Pico W, Pico 2, Pico 2 W, ESP32, ESP32-S2, ESP32-C3, ESP32-C6, and ESP32-S3 families. The application detects multiple boards, tracks USB hot-plug events, identifies the firmware environment, and reports Flash and RAM usage.

Agents can inspect and modify a board's filesystem, execute Python, interrupt running programs, reset boards, and install MicroPython firmware. The server also includes tools for entering BOOTSEL or ESP32 download mode and installing the ctrlPi API agent on supported Wi-Fi boards.

## How it works

Start the application with Node.js 20 or newer using `npx pico-bay`. The web interface normally opens on port `7426`, while MCP can run over standard input/output or Streamable HTTP. MCP is enabled by default on Raspberry Pi hosts; on macOS and other systems, enable it in the interface or start the process with `--mcp-stdio` or `--mcp-http`.

For remote access, start HTTP mode and connect to `http://HOST:7426/mcp`. A Raspberry Pi listens on the LAN by default. Other hosts can use `--host 0.0.0.0` to accept connections from another computer. The server returns plain JSON responses rather than SSE and supports both the newer MCP revision and the legacy initialize flow described by the project.

Call `pico_boards_list` before other board-specific operations. Its stable `board_id` is then passed to filesystem, execution, reset, and firmware tools. ZIP backup and restore, live console streaming, and the web interface's delete-all-files action are available in the application but are not exposed as MCP tools.

## Setup and configuration

Install Node.js 20 or newer, then run:

```sh
npx pico-bay
```

For Claude Desktop or Cursor, add a stdio entry that runs `npx -y pico-bay --mcp-stdio`. Cursor can use the same JSON structure in `~/.cursor/mcp.json` or a project-level `.cursor/mcp.json`. The `--mcp-stdio` flag is optional when pico-bay detects an MCP client on standard input.

HTTP connections can use `mcp-remote` with the `/mcp` endpoint. The `--allow-http` option is required by the example configuration for a trusted local network. HTTP has no authentication or TLS, so it should not be exposed directly to the internet.

## Tools and capabilities

- `pico_boards_list` discovers boards and reports firmware, IDs, and capabilities.
- `pico_files_list`, `pico_file_read`, and `pico_file_write` inspect and edit board files. Writes support UTF-8 or base64 content up to 8 MB decoded.
- `pico_directory_create`, `pico_path_rename`, and `pico_path_delete` manage files and directories, including recursive deletion.
- `pico_python_run` runs a file as `__main__` or executes supplied Python code and returns output.
- `pico_board_interrupt` sends Ctrl-C, while `pico_board_reset` performs a supported soft or hard reset.
- `pico_board_bootloader` enters Pico BOOTSEL or ESP32 download mode.
- `pico_install` installs matching MicroPython firmware on supported bootloader devices.
- `pico_ctrlpi_install` installs or updates the ctrlPi API agent on supported Wi-Fi boards.
- `pico_ui` opens the local web interface or returns its address, and can stop it.

The application can detect read-only filesystems, identify RP2040 and RP2350 boot devices, install matching Pico firmware, and install generic MicroPython firmware for supported ESP32 chips. It can also preserve existing ctrlPi agent settings when updating an already configured board.

## Limitations and notes

MCP can run code, overwrite files, reset boards, and permanently delete files. HTTP mode is therefore suitable only for a trusted local network and has no built-in authentication or TLS. Boards must be connected over USB, and Pico W or Pico 2 W selection is required when installing firmware from BOOTSEL mode because the W variant cannot be identified automatically there.

The ctrlPi API installation is limited to supported Wi-Fi-capable MicroPython boards; it is unavailable for non-W Pico boards and CircuitPython devices. Installing firmware requires keeping the board connected until the process completes.

_Full upstream README: https://allmcps.com/mcp/ctrlpi-pico-bay/readme_

