Skip to main content

Modular MCP server for Flipper Zero hardware hacking tool

Project description

Flipper Zero MCP Server

Modular Model Context Protocol (MCP) server for interacting with a Flipper Zero from MCP-capable clients (including Claude Desktop).

License: MIT Python 3.10+

Features

  • Modular architecture: functionality is provided by modules under src/flipper_mcp/modules/
  • Multiple transports: USB and WiFi are implemented; Bluetooth is present as a stub transport
  • Protobuf RPC support (nanopb-delimited framing) with generated protobuf code committed in src/flipper_mcp/core/protobuf_gen/
  • Built-in modules:
    • systeminfo: connection/device/SD-card status
    • badusb: generate, validate, store, and execute BadUSB scripts (requires SD card for file operations)
    • music: save/play songs using Flipper Music Format (FMF) (requires SD card)

Documentation

  • docs/index.md: documentation hub
  • docs/claude_setup.md: Claude Desktop setup (kept up to date)
  • docs/wifi_dev_board.md: WiFi Dev Board setup, architecture, and protobuf RPC over WiFi
  • firmware/tcp_uart_bridge/README.md: WiFi Dev Board TCP↔UART bridge firmware (“flirmware”)
  • docs/modules/: built-in module documentation
  • docs/core/: core server documentation

Installation

git clone https://github.com/busse/flipperzero-mcp.git
cd flipperzero-mcp

Quick start

pip install -e .
flipper-mcp

The server communicates over stdio (MCP) and will auto-discover built-in modules at startup.

Quick start with Claude Desktop (USB-only)

  1. Connect your Flipper Zero via USB.
  2. Add one MCP server entry to Claude Desktop config:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\\Claude\\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "flipper-zero": {
      "command": "python3",
      "args": ["-m", "flipper_mcp.cli.main"],
      "cwd": "/path/to/flipperzero-mcp",
      "env": {
        "PYTHONUNBUFFERED": "1",
        "FLIPPER_TRANSPORT": "usb"
      }
    }
  }
}
  1. Restart Claude Desktop and ask: “What tools do you have available?”

Configuration

The CLI currently uses environment variables for configuration:

  • FLIPPER_TRANSPORT: auto (default), usb, wifi, bluetooth/ble
  • FLIPPER_PORT: override the USB serial device path (only used for usb)
  • FLIPPER_WIFI_HOST: Flipper WiFi dev board host/IP (only used for wifi)
  • FLIPPER_WIFI_PORT: Flipper WiFi dev board TCP port (only used for wifi)
  • FLIPPER_DEBUG: enable protobuf RPC debug logging (1, true, yes, on)
  • FLIPPER_FORCE_START_RPC_SESSION: force sending start_rpc_session on connect (1, true, yes, on)
  • FLIPPER_MCP_ALLOW_STUB_MODE: DEV ONLY. If enabled (1, true, yes, on), the server will run in stub mode when it cannot connect to hardware. Default: disabled.

Default behavior (recommended): one MCP config, USB-first with optional WiFi fallback

By default (FLIPPER_TRANSPORT unset), the server uses auto mode:

  • It tries USB first
  • If USB is not available and FLIPPER_WIFI_HOST is set, it falls back to WiFi

Examples:

# Use a specific USB port
export FLIPPER_TRANSPORT=usb
export FLIPPER_PORT=/dev/ttyACM0
flipper-mcp

# Use WiFi transport
export FLIPPER_TRANSPORT=wifi
export FLIPPER_WIFI_HOST=192.168.1.1
export FLIPPER_WIFI_PORT=8080
flipper-mcp

# Auto mode (default): try USB, fall back to WiFi if FLIPPER_WIFI_HOST is set
export FLIPPER_WIFI_HOST=192.168.1.100
export FLIPPER_WIFI_PORT=8080
flipper-mcp

Using with Claude Desktop

See docs/claude_setup.md.

Available tools (built-in)

connection (health/recovery)

  • flipper_connection_health (authoritative transport + protobuf-RPC health)
  • flipper_connection_reconnect (disconnect/connect, then health)

systeminfo

  • systeminfo_get

badusb

  • badusb_list
  • badusb_read
  • badusb_generate
  • badusb_validate
  • badusb_write
  • badusb_delete
  • badusb_diff
  • badusb_rename
  • badusb_execute (requires confirm=true)
  • badusb_workflow

music

  • music_get_format
  • music_play

Contributing

We welcome contributions! This project is pro-AI-assisted coding and engineering - we encourage and welcome contributions that leverage AI tools like Claude Code, GitHub Copilot, ChatGPT, Cursor, or any other AI coding assistants. If you used AI assistance in your contribution, that's great! Please mention it in your pull request.

See CONTRIBUTING.md and docs/module_development.md.

License

MIT License - see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_busse_flipper_mcp-0.1.0.tar.gz (54.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iflow_mcp_busse_flipper_mcp-0.1.0-py3-none-any.whl (70.3 kB view details)

Uploaded Python 3

File details

Details for the file iflow_mcp_busse_flipper_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: iflow_mcp_busse_flipper_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 54.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_busse_flipper_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7ab8abaa9e7078dbab8ad8343a0329c0d5a128fa6397e09f8531863b0f7c4065
MD5 72a63d736fdfa3d51de8c2eb1607add6
BLAKE2b-256 318f18b73c9d5a6851cc3b892f141e137fb13bd8fb1ca901645332be264d2d24

See more details on using hashes here.

File details

Details for the file iflow_mcp_busse_flipper_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_busse_flipper_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 70.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_busse_flipper_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06193a5439e3942ff8077f351bf655d66f9359a70d2b8e416070eb5ac9d79764
MD5 8fdd6c8feaa6632a66b5df46fd26a75b
BLAKE2b-256 8c042791798d72dda0cbcafce7eafb7a747f837436c6d6461b1abad9a56f6d4e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page