flipper-zero-mcp
Provides tools for operating the Flipper Zero's NFC and RFID capabilities, including identifying card types, reading UIDs and page contents, saving read cards under a name, and emulating saved tags.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
flipper-zero-mcp
Let an AI assistant operate your Flipper Zero. It sees the screen, presses the buttons, types, and manages files and apps, over USB or Bluetooth.
What it does
flipper-zero-mcp is a program that runs on your computer, between an AI assistant and your Flipper Zero. It is an MCP server: MCP (Model Context Protocol) is the standard way to give an AI assistant extra tools. Once it is set up, you ask the assistant in plain language and it works the Flipper the way a person holding it would. Some things to ask, by part of the device:
Infrared
Turn off the TV with my Flipper. The assistant asks you first, then walks Infrared > Universal Remotes > TVs and presses POWER, which sends the firmware's TV power codes one after another. No saved remote is needed; a TV that is already off may switch on.
Mute the TV using my saved Living_Room remote. Sends one button of a saved remote by its name, after asking.
I am going to press Power on my soundbar remote, aimed at the Flipper. Tell me what it sends. The protocol, address and command of the signal, or its raw timings when the Flipper does not know the protocol (most air conditioners). USB only.
NFC and 125 kHz RFID
What kind of card is this? I am holding it against the back of the Flipper. The tag type, and for NTAG and Ultralight tags the UID and page contents. The page contents need USB.
Read this card and save it as Office_Badge. The assistant goes through the NFC app's Read and Save screens and types the name on the on-screen keyboard.
Emulate my saved 125 kHz gym fob so I can check the reader accepts it. Emulates after asking, until you say stop.
Sub-GHz
Download today's Sub-GHz autosaves and tell me which devices are really in them. Weather sensors, remotes and tyre sensors, each rated confirmed, unconfirmed or likely noise. Needs rtl_433 on your computer.
Send my saved Garage.sub once. Shows the file's frequency and protocol, asks, transmits, and stops. USB only.
Set Sub-GHz Read to 868.35 MHz and tell me what it was set to before. Changes the app's settings file after asking, without walking the config menu.
Files and backups
Back up the remotes, cards and captures on my SD card to ~/flipper-backup. Copies the folders; asked again later, it copies only the new files.
How full is the SD card, and what is taking the space?
Put the Samsung_TV.ir file from my Downloads folder on the Flipper. Uploads it and lists the remote's buttons.
Apps
Install the app I just built (dist/my_app.fap) and show me what it looks like on the Flipper. Uploads it, starts it and returns its screen.
Check that every app in /ext/apps/Games still starts after my firmware update. PASS, FAIL or INCOMPLETE for each app, with its screen; an app that crashes the Flipper is caught.
Settings and maintenance
The clock on my Flipper is wrong, set it to my computer's time. Sets it after asking.
My Flipper just restarted by itself. What happened? Whether it rebooted, and the reason from the crash screen if that is still shown.
I am about to flash new firmware. Free the port, and when I say the flashing tool is done, tell me whether the update took. The assistant notes the firmware version, releases the port for your flashing tool, then waits for the Flipper to come back and compares the version. The server does not flash firmware itself.
GPIO
Is the button I wired to pin C3 working? Read it while I press it.
Switch on the relay on pin A7 for a moment. Drives the pin high and low again, after asking. 3.3 V logic, with seconds between the steps, not milliseconds.
Power my module from the 5 V pin and check it is on. Switches 5 V on header pin 1 after asking.
Bluetooth, without the cable
Pair my Flipper over Bluetooth so I can unplug the cable. Windows and Linux. With the cable still in, the assistant reads the pairing code from the Flipper's screen.
My Flipper is somewhere in this room. Make it beep. It beeps, vibrates and flashes.
The assistant asks before anything that transmits radio or infrared, emulates a tag, deletes or overwrites data, reboots, sets the clock or drives a pin (see the safety model). In an app's menus it reads every screen before it presses the next button, because menus differ between the official firmware and custom firmware. Tools that use the Flipper's command line need USB (see USB vs Bluetooth tools).
To do that, the assistant can:
see the 128x64 screen, as a PNG and as a pixel-exact text rendering,
press the six buttons and type on the on-screen keyboard,
run commands on the Flipper's text command line (CLI; USB only),
read and write files, start and close apps, read and change system settings such as the clock, unlock the lock screen and use the GPIO pins, through the device's remote-control interface (the protobuf RPC API the official apps use),
identify the devices in a recorded Sub-GHz capture (this needs the separate program rtl_433 on your computer).
What you need:
a Flipper Zero,
a USB data cable, or Bluetooth on a Windows or Linux computer,
Python 3.10 or newer, and git,
an MCP client, such as Claude Code,
optionally rtl_433, a separate program, only for identifying the devices in Sub-GHz captures (see Configuration).
Nothing is installed on the Flipper. The server talks to the firmware as it is, with no extra app, over the same USB serial port and Bluetooth service that the official apps use. The protocol handling is based on the official desktop app qFlipper (USB) and the official Flipper Android app (Bluetooth).
Related MCP server: flipper-ble-mcp
Disclaimer
Built and tested with verified access. This project was built and tested with Claude Opus 5.5 and Claude Mythos 5.2 in Claude Code, on an account enrolled in Anthropic's Cyber Verification Program (CVP), in which Anthropic verifies security professionals and reduces the safeguards that block their security work.
Without CVP it might not work as described. The server itself runs for everyone. But a Flipper Zero works with radio, NFC, RFID, infrared and USB-keyboard emulation, which are dual-use, so the AI model's safeguards (guardrails) may make it decline some requests or stop partway through a task, more often when the account is not in the program. Other models and other MCP clients were not tested.
You are responsible for what is sent and read. Use this only on devices and signals you own or are authorized to test, and follow your local radio regulations. Operations that transmit, delete or reboot need a confirmation step: see the safety model.
Quick start
1. Install and register. Linux and macOS (on Debian / Ubuntu, install the venv module first with
sudo apt install python3-venv):
git clone https://github.com/Cir0cuit/Flipper-Zero-MCP.git
cd Flipper-Zero-MCP
python3 -m venv .venv
.venv/bin/pip install -e .
claude mcp add --scope user flipper-zero -- "$PWD/.venv/bin/flipper-zero-mcp"Windows (PowerShell):
git clone https://github.com/Cir0cuit/Flipper-Zero-MCP.git
cd Flipper-Zero-MCP
python -m venv .venv
.venv\Scripts\pip install -e .
claude mcp add --scope user flipper-zero "$PWD\.venv\Scripts\flipper-zero-mcp.exe"The last line tells Claude Code where the server is. --scope user makes it available in every project;
without it the server is registered for the current folder only.
2. Connect the Flipper. On Linux, first give your user access to the serial port (see Linux). Then plug in a USB data cable and close qFlipper: only one program can use the port at a time.
3. Ask. Start claude; /mcp lists flipper-zero when the server is registered. Then try:
Take a screenshot of my Flipper.
Claude Code asks for permission the first time it uses a tool; allow it. After that, try something with more steps, such as How full is the SD card, and what is taking the space?, or one of the requests under What it does.
The server does not open the serial port until the assistant uses the first Flipper tool. To use Bluetooth instead of the cable, see Bluetooth LE.
Linux
Permissions. The Flipper appears as
/dev/ttyACM*. Either add your user to the serial group, then log out and back in. Debian / Ubuntu and Fedora:sudo usermod -aG dialout $USERArch:
sudo usermod -aG uucp $USEROr install qFlipper's udev rule, which grants access to whoever is logged in locally, with no group membership needed:
sudo tee /etc/udev/rules.d/42-flipperzero.rules >/dev/null <<'EOF' #Flipper Zero serial port SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", ATTRS{manufacturer}=="Flipper Devices Inc.", TAG+="uaccess" #Flipper Zero DFU SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", ATTRS{manufacturer}=="STMicroelectronics", TAG+="uaccess" EOF sudo udevadm control --reload-rules && sudo udevadm triggerModemManager. ModemManager may probe a new CDC ACM device by sending AT commands. That garbles the first seconds of the session and can hold the port. This rule makes it ignore the Flipper:
echo 'ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", ENV{ID_MM_DEVICE_IGNORE}="1"' \ | sudo tee /etc/udev/rules.d/43-flipperzero-mm.rules sudo udevadm control --reload-rules && sudo udevadm triggerOr, if you don't use a mobile modem:
sudo systemctl disable --now ModemManager.
macOS
The port is /dev/cu.usbmodemflip_<Name>1. Use the cu.* device, not tty.*. Auto-detection finds it,
and no driver is needed. Bluetooth is not supported on macOS (see Bluetooth LE).
Windows
The Flipper appears as a COMx USB serial device (the built-in usbser driver; Device Manager → Ports).
Auto-detection works. To pin a port, set FLIPPER_ZERO_PORT=COM5. Only one program can have a COM port open
at a time.
Other ways to install
The install puts a flipper-zero-mcp console script into the virtual environment.
python -m flipper_zero_mcp does the same thing. The server speaks MCP over stdio: a client other than
Claude Code starts it with the command flipper-zero-mcp, with no arguments.
pip, with the test dependencies:
pip install -e '.[test]'uv instead of pip:
uv venv && uv pip install -e .uv, run without installing:
uv run --with-editable . flipper-zero-mcpContents
Status
Version 0.1.0. A simulated Flipper (flipper_zero_mcp/testing/fake_flipper.py) and a simulated Bluetooth
peripheral (flipper_zero_mcp/testing/fake_ble.py) cover the whole stack in the test suite, which runs
without hardware. Bluetooth, including pairing, was verified on a real Flipper (Momentum dev firmware) on
2026-11-22 on Windows 11 and on Linux (BlueZ). Bluetooth LE says what was exercised on
each system and what is still tested against the simulated devices only.
Features
Area | What you get |
Virtual GUI | Live screen from the RPC screen stream (PNG plus a half-block text image the model can read), button presses (short / long / hold with auto-repeat / raw press & release), a |
CLI | Any command on the Flipper shell ( |
Storage | List, stat, read, write, upload, download, mkdir, delete, rename and MD5 on |
Apps | Start any app by exact name ( |
System | Device info, battery and power info, RTC get/set, reboot (os / dfu / update), audiovisual "find my Flipper" alert, desktop unlock. |
Sub-GHz analysis |
|
GPIO | Read and write the 8 header pins, set pin mode and pull, and switch 5 V OTG on header pin 1. |
Bluetooth LE | The same RPC tools over Bluetooth instead of USB: scan, pair with the 6-digit code (read from the Flipper's screen when it is also on USB), connect, reconnect. No CLI over Bluetooth. |
Configuration
The server is configured with environment variables, set where the server is registered. With Claude Code
(flipper-zero-mcp stands for the full path used in the quick start when the script is not
on your PATH). To change the settings of a server you already registered, remove it first with
claude mcp remove flipper-zero, then add it again with the variables. Use one of these:
# default: USB, first Flipper found
claude mcp add --scope user flipper-zero -- flipper-zero-mcp
# with an explicit port and debug logs:
claude mcp add --scope user flipper-zero -e FLIPPER_ZERO_PORT=/dev/ttyACM0 -e FLIPPER_ZERO_MCP_LOG=INFO -- flipper-zero-mcp
# over Bluetooth LE (pair first, see "Bluetooth LE" below):
claude mcp add --scope user flipper-zero -e FLIPPER_ZERO_TRANSPORT=ble -e FLIPPER_ZERO_BLE_ADDRESS=80:E1:26:12:34:56 -- flipper-zero-mcp
# through the virtual environment's python instead of the script:
claude mcp add --scope user flipper-zero -- /path/to/Flipper-Zero-MCP/.venv/bin/python -m flipper_zero_mcpOr, for a whole project, put a .mcp.json in the project root. A copy is in
examples/mcp.json. Replace flipper-zero-mcp with the full path from the quick
start if the script is not on your PATH:
{
"mcpServers": {
"flipper-zero": {
"type": "stdio",
"command": "flipper-zero-mcp",
"args": [],
"env": {
"FLIPPER_ZERO_PORT": "${FLIPPER_ZERO_PORT:-auto}",
"FLIPPER_ZERO_MCP_LOG": "WARNING"
}
}
}
}Environment variable | Meaning |
| Serial port ( |
|
|
| Bluetooth address of the paired Flipper ( |
| Apps that leave too little memory for RPC work over Bluetooth (comma-separated, matched on the letters of the name or |
| Seconds a heavy app may run without a button press before the guard arms (default 30; 0 = whenever it runs). |
| Path of the |
| Log level on stderr: |
Bluetooth LE
Over Bluetooth the server uses the Flipper's default BLE profile, which carries protobuf RPC (the same
messages as over USB) but no CLI. Set FLIPPER_ZERO_TRANSPORT=ble and FLIPPER_ZERO_BLE_ADDRESS, or
call flipper_connect(ble_address=...) at run time; flipper_connect(port="auto") switches back to USB.
bleak (installed with the package) does the Bluetooth work. Supported: Windows and Linux (BlueZ). macOS hides
device addresses from programs, so the address-based tools do not work there: on macOS use USB.
Hardware status (2026-11-22, Momentum dev firmware).
Windows 11: in-app pairing with the PIN read automatically from the USB screen (13 s), MTU 414, credit flow control, device info, power, battery and DIS reads, clock, listing with MD5, uploads and downloads up to 100 KB with matching MD5 (about 14 KiB/s up, 11 KiB/s down), screenshots, button input, a 17 ms ping round trip, and reconnecting (about 4 s) all work, both through
FlipperDeviceand through the MCP tools.Linux, BlueZ 5.88 with bleak 3.1: scanning, pairing through
flipper_ble_pairwith the code read from the USB screen, connecting, device and power info, screenshots, button input, file reads, starting and closing apps, and switching between USB and Bluetooth all work through the MCP tools. Throughble_pair.pair()andBleTransport: pairing closes the link it opened and a connection right after it takes about 2 s, and connecting through a link BlueZ still holds takes under a second. Everything else on Linux is tested against the simulated devices only: uploads, and pairing with the code passed in a second call (flipper_ble_pair(address, pin=...)).On both systems, recovery from a Flipper-side link drop is tested against the simulated devices only.
Pairing (once per computer)
The Flipper accepts only authenticated (paired) connections. When a computer pairs, the Flipper shows "Pairing code" and a random 6-digit number, valid for about 30 seconds; every attempt gets a new one. On the Flipper, Bluetooth must be on (Settings > Bluetooth) and no BLE remote/keyboard app may be running.
From the agent:
flipper_ble_scanlists the addresses (80:E1:26:...), thenflipper_ble_pair(address). If the same Flipper is also connected over USB, the server reads the code from its screen and finishes in one call. Otherwise the call returns while the code is on screen: the agent asks you for it and callsflipper_ble_pair(address, pin="123456"). If that is too late or wrong, call it again withoutpinfor a new code. The in-app ceremony uses WinRT custom pairing on Windows and a BlueZ agent (KeyboardDisplay, made the default agent) on Linux.Windows (by hand): Settings > Bluetooth & devices > Add device > Bluetooth, pick the Flipper and type the code. If it is not listed, set "Bluetooth devices discovery" to Advanced (Settings > Bluetooth & devices > Devices).
Linux (by hand):
bluetoothctl, thenagent KeyboardDisplay,default-agent,scan on(wait for the Flipper,scan off),pair <MAC>and type the code at the passkey prompt, thentrust <MAC>.remove <MAC>unpairs.Name: official firmware advertises "Flipper "; Momentum advertises the bare name (for example
Lab01, not "Flipper Lab01"), and that is what Windows Settings lists. The server never relies on the name.Stale pairing: after Settings > Bluetooth > Unpair All Devices on the Flipper, or when the OS still lists the Flipper but connecting fails with "not paired", call
flipper_ble_unpair(address, confirm=true)(or remove it in the OS) and pair again. On Momentum, renaming the Flipper changes its Bluetooth address, so the old pairing no longer applies.
One connection at a time
The Flipper accepts a single Bluetooth connection and stops advertising while connected. If the Flipper app on your phone is connected (it reconnects by itself), the computer cannot see the Flipper: close the app or turn off the phone's Bluetooth. Two programs on the computer cannot both hold the Bluetooth link either; a USB session and a Bluetooth session can run at the same time.
On Linux the system's Bluetooth service (BlueZ) keeps a link open after pairing with bluetoothctl, and after a
program exits without disconnecting. The Flipper does not advertise then. flipper_ble_pair closes the
link it opened itself, and flipper_connect takes a kept link over when the Flipper is paired and no
running program is subscribed to its Bluetooth notifications. While a second copy of this server or another
program is talking to the Flipper over that link, flipper_connect fails with "not found" and leaves the
link alone. A program that holds the link without subscribing is not detected: connecting then shares its
link, and disconnecting ends it for both, so run one Bluetooth program per Flipper.
USB vs Bluetooth tools
Tools | USB | Bluetooth |
| yes | yes (the screen stream runs only on demand; transfers are much slower) |
| yes | no |
| uptime and | no uptime; |
| uptime before and after | a reboot shows as the link dropping |
| heap figures | advice without figures |
| non-PIN locks only | any lock, needs |
| yes | no (they need the CLI; refused before connecting) |
| yes | – (use |
| work whatever the current link |
On Momentum and RogueMaster a Sub-GHz app_button_press stays refused (it crashes the firmware), and
subghz_tx_file needs USB, so there is no Sub-GHz transmission over Bluetooth on those forks.
Heavy apps over Bluetooth
Sub-GHz Read keeps every BinRAW entry of its history on the heap, and the Frequency Analyzer with the
external CC1101 leaves little free. In a field session (Momentum dev, external CC1101, Bluetooth) RPC work
during such a run crashed the Flipper with "out of memory" four times: a screen stream start (every
screenshot over Bluetooth starts one, and so do the "Send" checks of navigate/press_button), a
storage_list with downloads, and a screenshot while leaving Read. About 30 BinRAW history entries were
enough.
The server guards against it. Once a heavy app (FLIPPER_ZERO_HEAVY_APPS, default Sub-GHz, known from
app_start and the app lock status; an RPC-mode app never counts) has run for 30 s
(FLIPPER_ZERO_HEAVY_APP_IDLE_S) without a button press, the guard arms. While it is armed and the app
still runs, the next screen stream start or storage request is refused with an explanation:
screen_capture, press_button, navigate (only steps that look at the screen, and its final
screenshot, which is then left out), type_text, type_hex, wait_for_screen_change, app_start,
app_exit, desktop_unlock, every storage_* tool, flipper_format_read/set and subghz_identify on a
Flipper file.
Each of them takes allow_while_app_running=true to go ahead anyway (which also disarms the guard): use it
when Read and the Frequency Analyzer are not open, for example in the Sub-GHz menu. The guard disarms by
itself when the app is gone. flipper_status reports heavy_app_running (null for an app of unknown
name), heavy_app, heavy_app_guard (armed / not armed) and heavy_app_risk. Over USB nothing is
refused.
Over Bluetooth the server knows the app's name only from app_start: a Sub-GHz opened on the Flipper or
reached through the menus with press_button/navigate is an app of unknown name, which the default
settings do not guard (heavy_app_running: null; heavy_app_risk then says so). Open Sub-GHz with
app_start("Sub-GHz"), or add unknown to FLIPPER_ZERO_HEAVY_APPS to guard every app of unknown name.
Safe capture procedure over Bluetooth:
Open Sub-GHz with
app_start("Sub-GHz")(not the menus, so the guard knows it), set up Read (frequency, modulation, BinRAW, Autosave) with screenshots as usual, then start it.Leave it alone: no screenshots, no file calls. Keep rounds short, about 5 minutes.
Exit blind:
navigate("back left back", screenshot=false, confirm=true). BACK opens "Discard Signals?", LEFT (Continue) leaves Read and frees its history, BACK closes the app.confirm=trueonly skips the "Send" checks before the LEFT step, which would start the screen stream; no Send screen is involved here.Only then take a screenshot, list
/ext/subghz/Autosaveand download.
PIN lock
With a PIN lock set, the firmware turns USB off while locked, but Bluetooth stays up, and the RPC unlock
request does not check the PIN (rpc_desktop.c). A paired computer can therefore unlock a PIN-locked
Flipper over Bluetooth without knowing the PIN. That is why desktop_unlock needs confirm=true over
Bluetooth. Remove pairings you no longer trust (Unpair All Devices on the Flipper). Momentum's behaviour
here has not been checked.
Safety model
The agent drives real hardware that can transmit radio signals and erase data, so risky operations need
two steps. A call without confirm=true fails with a message telling the agent to ask the user, then
retry with confirm=true.
Confirm required (†):
storage_delete,storage_renamewithoverwrite,flipper_format_set,set_datetime,reboot,gpio_write, switching a pin to output, switching OTG 5 V,app_button_press(it transmits),app_startof JS Runner,DANGEROUSCLI commands,flipper_ble_unpair, anddesktop_unlockover Bluetooth.cli_runclassifier (flipper_zero_mcp/safety.py, derived from the firmware CLI sources):FORBIDDEN: always refused. These would break the serial session:start_rpc_session,exit, interactive sub-shells such asnfcandsubshell_demo, rawstorage write_chunk/read_chunks,storage write(Ctrl+C does not stop it while its buffer is empty, which can hang the CLI; usestorage_write), and anything outside printable ASCII. That includes TAB, which the firmware shell uses for command completion (pow<TAB> offrunspower off), and non-ASCII characters, which the line editor silently drops (poéwer offrunspower off).DANGEROUS: needsconfirm=true. Coversfactory_reset,storage format/remove/rename/extract(rename deletes an existing destination, extract overwrites files),update install/restore/backup,crypto store_key,power off/reboot/5v/3v3,gpio set/mode, settingdate,js,loader openof JS Runner,loader signal,onewire search, and every RF transmit:subghz tx*/chat,ir tx/universal,rfid write/emulate,ikey write/emulate,bt txtests. Unknown sub-commands of these families also count as dangerous.CAUTION: streaming commands (log,top,subghz rx,ir rx,rfid read, …). These needinterrupt_after_s, after which Ctrl+C is sent.SAFE: everything else.
OK on a "Send" softkey transmits. In Sub-GHz Read RAW, OK starts a recording, OK stops it, and the next OK press sends it on air; saved Sub-GHz keys and the Infrared Learn result send on OK too.
press_buttonandnavigaterecognise the softkey on the screen (an exact match of theFontSecondary"Send" label in a black box, anywhere on the screen, so a highlighted "Send" menu entry counts too) and refuse an OK press (ok,long:ok,hold:ok,press:ok) there withoutconfirm=true;navigatechecks before every OK step and reports the steps it already ran. On Momentum, Unleashed and RogueMaster a saved key's Send screen also transmits on Up/Down/Left/Right (custom buttons: a rolling-code key goes out with another button code and its counter advances), so on any firmware but the official one an arrow press there is refused too. Read RAW keeps its arrows: its "Send" sits next to an "Erase" / "New" left softkey, and its arrows only erase, save or open a menu.type_textandtype_hexrefuse any Send screen (the keyboard did not open). BACK andapp_exitstay allowed. Infrared remotes have no "Send" label: OK on a button of a saved remote or of Universal Remotes sends at once. So OK is refused withoutconfirm=truewhile the running app is known to be Infrared (by the name given toapp_start, or over USB byloader info; also IR remote.faps), and the held-tap retry never repeats OK there. Over Bluetooth an Infrared app opened from the menu is not recognised and its button lists are not caught. A custom font from an asset pack defeats the match. The recording is already on the SD card (/ext/subghz/RAW_.sub) before Save is pressed.cli_run'sanswermust be exactly one printable character: the firmware y/n prompts read one byte, and any further bytes ("\rpower off\r") would be run by the shell as new commands after the classified one.Storage paths are checked on the host before anything is sent: non-empty, ≤ 255 printable ASCII characters, under
/ext,/intor/any. An empty path can hard-fault the firmware. Deleting or writing the storage roots themselves is refused.
The confirm gate guards against agent mistakes. It is not a security boundary: anyone who can run the server can use the serial port directly.
Troubleshooting
Symptom | Cause / fix |
| Check the cable (some are charge-only) and that the Flipper is on and not in DFU mode (that's PID |
| The Flipper is rebooting or crashed. The server keeps reconnecting for 60 s; then |
| Another process holds the port (qFlipper, fbt |
After a firmware update the port is gone for minutes | The updater runs first. |
Port vanishes while the Flipper looks fine | PIN lock disables USB CDC entirely. Unlock the Flipper with its PIN on the device. The server reconnects on the next call. A plain (non-PIN) desktop lock is fine, and |
| The Flipper's RPC service is stuck while the device itself still runs. |
Bluetooth: | The Flipper is not advertising: Bluetooth off on the Flipper, a BLE remote/keyboard app running, out of range, or another device (the phone app) holds the only connection. |
Bluetooth: | The Flipper is not advertising (see the row above), or BlueZ holds a link to a Flipper that is not paired yet: |
Bluetooth: | Pair first ( |
|
|
| Your user is not allowed to open the serial port: see Linux for the group and the udev rule. |
| Another program has the port open: qFlipper (close it entirely, including the tray icon), the Flipper web lab, |
Garbage or timeouts right after plugging in (Linux) | ModemManager may be probing the port. Add the ignore rule from Linux. |
| See the safety model. Prefer the dedicated RPC tools (storage, apps, gpio). |
| Another app is running. Call |
A Sub-GHz key file sends the wrong button (wrong LED/relay reacts) and the file now holds another key | Momentum/Unleashed "custom button" feature ( |
CLI | Plain |
CLI uses the internal radio although an external CC1101 is connected | Every |
NFC app: the first Write after opening a saved file says "Writing gone wrong!" | Seen repeatedly on Momentum with an NTAG216: Retry writes it. |
| A Momentum CLI quirk; |
"Flipper crashed and was rebooted – out of memory" in Sub-GHz | Sub-GHz alone leaves about 23 KB of heap free on Momentum; opening Saved with many files in |
"Flipper crashed and was rebooted – out of memory" over Bluetooth while Sub-GHz runs | Seen four times on Momentum with the external CC1101: Frequency Analyzer, or Read with 25-36 BinRAW entries in its history, plus a new RPC session, a screen stream start (every screenshot over Bluetooth starts one, and so does an OK step of |
"Flipper crashed and was rebooted – furi_check failed" after a Sub-GHz RPC transmission | A Momentum/RogueMaster firmware bug: their Sub-GHz RPC scene confirms the button release, then confirms again when TX ends with no command pending ( |
| The keyboard layout does not match the firmware. |
| The app name is wrong. Names are exact and case-sensitive (the list is under the table in the tool reference). |
| The loader needs each ELF section in one contiguous block (metroflip's |
A game ignores every button | Apps built on flipperzero-game-engine (air_arkanoid, …) read key state once per frame and miss a press and release within one frame. |
"Flipper crashed and was rebooted – furi_check failed" after |
|
Screen looks stale | Use |
Need more detail | Set |
Tool reference
Tools marked † need confirm=true. The server's instructions tell the agent to ask the user first.
The screen, input, storage, flipper_format_*, subghz_identify, app_start, app_exit and desktop_unlock
tools also take allow_while_app_running=False (left out of the table): see
Heavy apps over Bluetooth.
Tools that return the screen send a PNG plus, with ascii=True (the default), a 128 × 32 text
rendering of about 4 KB; ascii=false leaves the text out when the image is enough.
Screenshot results are [PNG image, text]. The text holds a status line followed by a 32-line half-block
rendering of the screen.
Tool | Parameters (defaults) | Description |
| – | Detected Flipper serial ports (device, name, serial number). |
|
| (Re)connect: |
| – | Close the port or Bluetooth link, for example to let qFlipper or the phone app use it. |
|
| Flippers over Bluetooth: advertising ones plus those paired with this computer ( |
|
| Pair with the 6-digit code the Flipper shows. With the same Flipper on USB the code is read from its screen; otherwise the call returns and the agent calls again with |
|
| Remove this computer's pairing (for a stale one), then pair again. |
| – | Connected?, transport, port, link mode, desktop locked, running app, RPC-app state, battery %, |
|
| Closes this server's connection, then waits for the Flipper to come back (firmware update, reboot, crash) and returns name, firmware, |
|
| Current screen. |
|
|
|
|
| Run a step program (grammar) in one call. Before every OK step the screen settles (up to 1 s) and the step is refused on a "Send" softkey without |
|
| Type on the on-screen keyboard and select ENTER. |
|
| Type bytes on the hex keypad ( |
|
| Waits for the screen to differ from the one the last tool returned (a change between calls is reported at once) and returns the screen, with a "No change" note after the timeout. |
|
| Run a CLI command (see the safety model). |
| – | Hardware, firmware, radio and protobuf details. |
| – | Battery level, voltage, current, temperature, charging state. |
| – | RTC time. |
|
| Set the RTC. Years 2000–2099. |
|
| Reboot. The server reconnects on the next call. |
| – | Beep, vibrate and flash ("find my Flipper"). |
|
|
|
|
| Total and free bytes. |
|
| Type and size, or |
|
| Read a file. A truncated text file is cut at a character boundary. Use |
|
| Write a file. Refuses to replace an existing file unless |
|
| Copy a host file to the Flipper. |
|
| Copy a Flipper file to the host. Sends MCP progress notifications (bytes) when the client asks for them. Over Bluetooth a 1.3 MB Read RAW file takes about 2 minutes. |
|
| Copy the files of a directory in one call, one after the other ( |
|
| Create a directory. An existing one is not an error. |
|
| Delete a file or directory. |
|
| Rename or move. Refuses an existing destination (the firmware would delete it) unless |
|
| MD5 of a file. |
|
| Parse a FlipperFormat file ( |
|
| Change one key and keep every other line, comment and the order; a missing key is appended. A repeated key needs |
|
| Identify the devices in a Sub-GHz |
|
| Start an app by exact name or |
|
| RPC app exit. Falls back to pressing BACK until no app is running (max 10), switching to held BACK taps when a short BACK changes nothing. If BACK only toggles a confirmation dialog (Sub-GHz "Discard Signals?"), it stops with the dialog on screen for the agent to answer. An app that BACK cannot close is reported as still running (look for an Exit entry). Never sends the loader exit signal. |
|
| Start an app, let it run 3 s, check it runs, close it like |
| – | App lock state, the running app's name and the RPC-app state. Safe while an RPC-mode app runs. |
|
| RPC-mode app: load a file. NFC, 125 kHz RFID and iButton start emulating on load, so for them it needs |
|
| RPC-mode app: press a virtual button. This transmits (Sub-GHz, IR, RFID emulation), so it needs |
|
| Runs commands in the NFC CLI subshell ( |
|
| Transmit a saved |
| – | RPC-mode app: release it. |
|
| Unlock the desktop lock screen. Over USB this cannot remove a PIN lock (USB is off while PIN-locked). Over Bluetooth it also removes a PIN lock without the PIN, so there it needs |
|
| Read an input pin (PA7, PA6, PA4, PB3, PB2, PC3, PC1, PC0). |
|
| Drive an output pin. |
|
|
|
|
| Query 5 V OTG. Switching it needs |
Known app names (exact and case-sensitive): Sub-GHz, 125 kHz RFID, NFC, Infrared, GPIO,
iButton, Bad USB, U2F, and the settings apps Bluetooth, Desktop, Power, Storage, System,
About, Passport, Clock & Alarm, LCD and Notifications. A .fap path such as
/ext/apps/Tools/foo.fap also works.
navigate step grammar
Steps are separated by whitespace or commas and are case-insensitive. The whole program is checked before any button is pressed.
Step | Meaning |
| Click: PRESS, SHORT, RELEASE |
| Long press: PRESS, LONG, RELEASE |
| Hold for |
| Raw PRESS / RELEASE event |
| Pause (≤ 10 000 ms; all waits and holds of one call together ≤ 60 s) |
| Repeat a press step N times, e.g. |
Keys are up, down, left, right, ok and back. The aliases enter, select and center mean
ok, and esc means back. There is a limit of 200 presses per call.
Example: "ok down*2 ok wait:500 long:back" opens the menu, moves down two items, opens the app, waits
half a second, then long-presses BACK.
Capturing Sub-GHz signals
A method for finding the devices transmitting around the Flipper, worked out in a field session
(Momentum, external CC1101, Bluetooth). Receiving needs no confirm; transmitting does.
Survey first. Run the Sub-GHz Frequency Analyzer for 5-15 minutes and note the frequencies that light up. Ignore known noise: hits at the edges of the band near LTE, and constant carriers (for example a steady signal on one frequency that records no new samples in Read RAW). A one-off hit is not a band.
Listen on a fixed frequency. Run Read on each busy frequency rather than wide hopping: hopping across many frequencies caught nothing in 2.5 minutes, a fixed 433.92 MHz caught signals at once. Hop only over a short list: the
Hopper_frequencylines in/ext/subghz/assets/setting_user(change them withflipper_format_set, then restart the app).Keep BinRAW on and analyse the files on the computer. Read with BinRAW and Autosave writes every undecoded signal to
/ext/subghz/Autosave. Do not judge them on the screen: copy them withstorage_download_dirand runsubghz_identifyon them (several at once to compare them). FM BinRAWs can hold Manchester packets rtl_433 does not decode (for example 62-bit packets at 245 µs per symbol, about 2 kbit/s);manchester.packetslists them. Weather sensors with pulse position 500/2000/4000 µs (Acurite, Nexus) show up only as BinRAW in Read; the Weather Station app decodes them on the Flipper.Read RAW for long recordings. Read RAW records the signal on its current frequency and preset to
/ext/subghz/RAW_.subwhile it runs, so the file can be downloaded without pressing Save; download it before leaving Read RAW. The OK press after a recording transmits it; leave with BACK. A rising sample counter in Read RAW also shows that the radio works when Read stays silent.Rotate. Once a frequency and modulation have given their devices, move on instead of finding the same sensors again. AM270 decoded about twice as many sensor packets as AM650 with no chance decodes. FM476 also covers what FM238 receives (wider filter). BinRAWs recorded with an FM preset are often the strong AM devices seen through the FSK demodulator, not new FM devices.
Pitfalls:
Restart the Sub-GHz app after changing Radio Settings (internal/external module): after switching the module, Read received nothing for 7.5 minutes while Read RAW on the same settings recorded signals; a restart fixed it.
Read and Read RAW share
/ext/subghz/assets/last_subghz.settings(frequency, preset): each starts with whatever the other used last. Check the Frequency row every time (flipper_format_readshows the file).Turning Hopping off can leave the last hopper frequency (868.35 MHz instead of the
Default_frequency433.92 MHz fromsetting_user). After switching Hopping off in the Read config, re-check the Frequency row and set it back before starting Read.Hopping: trueneeds a number inHoppingThreshold(nanshows "Hopping OFF" in the config while the app hops);flipper_format_readwarns about it.Memory over Bluetooth. Read keeps every BinRAW entry of its history on the heap. In the Frequency Analyzer, or in Read with 25-36 BinRAW entries, a screen stream start, a new RPC session or file reads crashed the Flipper ("out of memory") four times (Momentum, external CC1101). Every screenshot over Bluetooth starts the stream, and so does every OK step of
navigate, even withscreenshot=false: the server checks the screen for a "Send" softkey first (on Momentum, Unleashed and RogueMaster also before the first arrow step after another key). BACK steps never touch the stream. Run Read in rounds of about 5 minutes with no screenshots or transfers, exit it blind (navigate("back left back", screenshot=false, confirm=true)), then list and download; the server refuses screenshots and file calls in between (see Heavy apps over Bluetooth).
Architecture
Claude Code / MCP client
│ stdio (JSON-RPC)
▼
┌──────────────────────────────────────────────────────────────┐
│ server.py MCPServer "flipper-zero": 50 tools, confirm │
│ gating, navigate parser, lazy connect + │
│ auto-reconnect, anyio.Lock + to_thread (the │
│ device API is blocking) │
├──────────────────────────────────────────────────────────────┤
│ device.py FlipperDevice: screen cache (frame seq + Cond.), │
│ input sequences, storage/app/system/gpio RPCs, │
│ cli() that returns to RPC afterwards │
│ ├─ screen.py u8g2 page decode, rotation, PNG / ASCII │
│ ├─ keyboard.py TextInput cursor planner (from firmware) │
│ ├─ safety.py CLI command risk classifier │
│ ├─ flipper_format.py 'Key: value' file parse / edit │
│ └─ subghz_analysis.py .sub -> rtl_433 pulse data, verdicts │
├──────────────────────────────────────────────────────────────┤
│ transport.py FlipperTransport: port discovery, DTR cycle, │
│ CLI <-> RPC state machine (lazy switching), │
│ reader thread, command ids, multi-part replies, │
│ broadcast (id 0) listeners, rpc start/stop hooks │
│ └─ framing.py varint length prefix + StreamDecoder │
│ └─ proto/ vendored flipperzero-protobuf 0.25 (pb2) │
├──────────────────────────────────────────────────────────────┤
│ pyserial → USB CDC ACM (VID 0x0483 / PID 0x5740) │
└──────────────────────────────────────────────────────────────┘
│
▼
Flipper Zero (CLI shell ⇄ `start_rpc_session` protobuf RPC)Over Bluetooth, ble.py (BleTransport, same interface as FlipperTransport, bleak on its own event-loop
thread) replaces transport.py: protobuf RPC over the GATT serial service with the firmware's flow
control. ble_pair.py pairs with the OS APIs (WinRT on Windows, a BlueZ agent on Linux).
The serial link is either in CLI mode (text shell, prompt >: ) or in RPC mode (length-prefixed
protobuf PB.Main messages). The transport only switches when it has to: an RPC call enters RPC mode,
and a cli_run drops to the CLI. After a CLI command, FlipperDevice.cli() returns to RPC mode, which
restarts the screen stream.
Dropping to the CLI ends the RPC session, and the firmware closes every app that was started in RPC mode
(app_start(name, args="RPC")) together with its session (rpc_app.c: RpcAppEventTypeSessionClose).
So while such an app runs, app_status and flipper_status report the name given to app_start
instead of asking the CLI, and cli_run is refused unless close_rpc_app=true. Call app_exit first.
If the link (USB or Bluetooth) drops during a call, the server reconnects and repeats the call once, but only if the call is read-only or none of its bytes reached the device. Button presses, CLI commands, writes and transmissions are never replayed. If the client cancels a call or times out, the work stops at once: held buttons are released, remaining steps are skipped and a running CLI command gets Ctrl+C.
Development
pip install -e '.[test]'
python -m pytest -q # no hardware needed: tests run against the fakes in flipper_zero_mcp/testing/
pip install mypy && python -m mypy src/flipper_zero_mcp # optional type checkThe test suite also runs on GitHub Actions (.github/workflows/tests.yml) on Python 3.10 to 3.13, with a
mypy type check.
docs/DESIGN.md is the design contract and the summary of the protocol facts (with firmware references)
that the implementation relies on.
Credits
qFlipper by Flipper Devices. Its backend was the reference for the serial and RPC session handling, the screen-stream format and the udev rule in Linux. No qFlipper code is included (qFlipper is GPL-3.0).
flipperzero-protobuf by Flipper Devices. The
.protofiles insrc/flipper_zero_mcp/proto/are from release 0.25, and the*_pb2.pymodules were generated from them. See NOTICE.flipperzero-firmware. The CLI,
text_input.ckeyboard and RPC behaviour were taken from its source.flipperzero_protobuf_py, a reference for the RPC calls.
Flipper Android app (MIT), the reference for the Bluetooth connection sequence, flow control and pairing.
Flipper iOS app on GitHub. The Flipper Zero device illustration in the banner comes from it: Copyright (c) 2020 Flipper Zero, used under the MIT License. See NOTICE.
The screenshots in the banner and under What it does show the user interface of the Flipper Zero firmware by Flipper Devices as modified by Momentum firmware (both GPL-3.0). The interface and its graphics belong to their authors.
bleak for Bluetooth LE; pairing follows bleak pull request #1990.
rtl_433 (GPL-2.0) decodes the Sub-GHz captures for
subghz_identify. It runs as a separate program that you install; none of its code is included.
Flipper Zero is a trademark of Flipper Devices Inc. This project is not affiliated with or endorsed by Flipper Devices.
License
MIT (see LICENSE). The vendored protobuf definitions come from their upstream project; see NOTICE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Let Claude, ChatGPT and other agents use your Android phone: see the screen, tap, type, open apps.
Turns a phone into a camera+Bluetooth remote so AI assistants can see and control any PC.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceModular MCP server for interacting with a Flipper Zero from MCP-capable clients (including Claude Desktop). Supports system info, BadUSB scripts, and music playback over USB or WiFi.38MIT
- AlicenseAqualityDmaintenanceDrive a Flipper Zero wirelessly over Bluetooth LE from Claude.381MIT
- AlicenseAqualityBmaintenanceTalk to your Flipper Zero from Claude Code — or any MCP client. Storage, app deployment, screen capture, button automation, JavaScript execution on the device, and honest answers about what is nearby.66MIT
- AlicenseNot gradedqualityBmaintenanceExposes 238 schema-typed tools over streamable-HTTP MCP that let a client drive a Flipper Zero, an AWOK Biscuit (ESP32-C5) and an ESP32 Marauder — scanning, screen mirroring, storage, and other device operations — from natural-language or direct tool calls. Transmit/attack tools stay behind an explicit human confirmation gate.MIT