dwgx@blog:~$dwgx
> cd ../posts

Wiring Flipper Zero into MCP So Claude Can Drive It Directly

// created

flipperzero-mcp is an MCP server for the Flipper Zero that lets clients like Claude Desktop operate the device directly. It’s not my original work. I forked it from busse’s project to study it, and the repo is at https://github.com/dwgx/flipperzero-mcp, tracking upstream.

Modular design, with everything living under src/flipper_mcp/modules/. The transport layer supports USB, while WiFi and Bluetooth are still stubs and not implemented. The protocol runs protobuf RPC with nanopb framing, and the generated code is committed straight into src/flipper_mcp/core/protobuf_gen/, so there’s no need to regenerate it every time.

Three modules are built in. systeminfo checks connection and SD card status; badusb generates, validates, stores, retrieves, and executes BadUSB scripts, with file operations requiring an SD card; music plays tunes in the Flipper Music Format. badusb_execute only actually pushes to the device if you explicitly pass confirm=true, which acts as a safety valve so the AI doesn’t get overeager and run a script on the device.

Getting it running isn’t complicated. After pip install -e ., just run flipper-mcp. The server communicates with the client over stdio and auto-discovers modules on startup. To hook it into Claude Desktop, add an entry to mcpServers pointing at python3 -m flipper_mcp.cli.main. FLIPPER_TRANSPORT controls whether it goes over USB or WiFi, defaulting to auto, which tries USB first and switches to WiFi if nothing is plugged in.

I pulled this repo mainly to see how MCP interfaces with hardware, how protocol frames are handled, and how the modules are split up. It’s a useful reference for writing my own hardware bridging tools.