M5Stack Cardputer + Claude Code

Approve AI code changes from your pocket.

PocketClaude turns a $30 hardware device into a physical remote control for Claude Code. See permission prompts on a tiny screen. Approve or deny without touching your laptop. Never block an AI agent waiting for you again.

$30
Hardware Cost
240px
LCD Width
60s
Prompt Timeout
ESP32
Chip
PERMISSION REQUEST ACTION NEEDED
Tool: Write
Claude wants to write:
src/auth/session.ts
+47 lines — JWT token refresh logic
[Y] APPROVE
[N] DENY
timeout in 42s
M5Stack Cardputer — ESP32-S3
Permission Prompts Session Switching Task Notifications LoRa Mesh Networking BLE Remote Control WiFi Scanning USB Mass Storage OTA Firmware Updates Multi-Session Management Response Summaries Permission Prompts Session Switching Task Notifications LoRa Mesh Networking BLE Remote Control WiFi Scanning USB Mass Storage OTA Firmware Updates Multi-Session Management Response Summaries

A physical interface
for AI-assisted development

Claude Code runs in your terminal. It's powerful — but every time it needs permission, your whole flow stops. PocketClaude puts the permission layer in your hand.

The Cardputer

The M5Stack Cardputer ADV is a credit-card-sized computer with a real QWERTY keyboard, a 240x135 color LCD, and an ESP32-S3 running at 240MHz. It was designed for hackers. We turned it into a Claude Code remote.

  • ProcessorESP32-S3FN8 @ 240MHz
  • Display240x135 IPS LCD
  • InputFull QWERTY keyboard
  • ConnectivityWiFi 802.11 b/g/n
  • BatteryUSB-C powered
  • Cost~$30 USD

The Bridge Server

A Node.js server runs on your Mac and connects Claude Code hooks to the device over WebSocket. It tracks your tmux sessions, queues messages when the device is offline, and manages bidirectional communication.

  • ProtocolWebSocket :8765
  • APIHTTP :8766
  • Sessionstmux registry
  • PersistenceSQLite event log
  • Heartbeat15s ping / 30s timeout
  • CostFREE (Node.js)
bridge server — ws://0.0.0.0:8765
[bridge] starting...
[ws] listening on :8765
[http] listening on :8766
 
[ws] device connected 192.168.1.42
[hook] session registered: cardputer
[hook] session registered: edify-mobile
 
[claude] PERMISSION REQUEST
tool: Write
path: src/auth/session.ts
[ws] → prompt sent to device
[ws] ← APPROVED (42s elapsed)
[claude] resume signal sent
 
[hook] task complete: cardputer
[ws] → notification sent
Live right now on a real device

This is not a concept. The firmware, bridge server, and Claude Code hooks are all working code — flashed on a real Cardputer. Clone the repo and have it running in under 30 minutes.

Never touch your laptop
to approve AI actions

The old way: Claude stops, you alt-tab, you read the prompt, you click approve, you alt-tab back, you lose your train of thought. The new way:

01
🤖
Claude needs permission
Claude Code hits a tool call that requires approval — writing a file, running a command, or accessing the network.
02
📳
Your pocket buzzes
The hook fires, the bridge forwards the prompt to your Cardputer over WebSocket. The screen lights up with the full context.
03
⌨️
Press Y or N
Read the tool name, the file path, the change description — all on the tiny screen. Press Y to approve, N to deny. Done.
04
Claude continues
Your response goes back over WebSocket. The bridge injects it into the tmux session. Claude resumes instantly. You never left your flow.
POCKETCLAUDE v2.1 ● AWAITING INPUT
Bash — requires approval
Command: npm run build && npm test
Session: edify-mobile
Risk: runs shell command with network access
[Y] APPROVE
[N] DENY
Timeout: 38s remaining Project: edify-mobile

Everything you need,
in your hand

PocketClaude isn't just a permission approver. It's a full remote control for your AI development environment.

🔐
Permission Control
Claude Code permission prompts routed directly to your Cardputer. Approve or deny Write, Bash, and tool calls from anywhere in the room. 60-second timeout with visual countdown.
Core Feature
🔀
Session Switching
Running 3 Claude projects? Type /go edify-mobile on the Cardputer and your terminal jumps to that tmux session instantly. No alt-tabbing, no mouse.
tmux Integration
🔔
Task Notifications
Get pinged when Claude finishes a task, hits an error, or completes a build. The last 3 sentences of Claude's response appear right on the screen. Reply with a followup without opening your laptop.
Push Events
📡
LoRa Mesh Networking
Optional LoRa module enables off-WiFi mesh networking between multiple Cardputers. Chat, share notifications, and coordinate across a building without infrastructure. Range: hundreds of meters.
Optional Hardware
📲
Launch New Sessions
Type /launch my-project to spin up a new tmux session in ~/Repos/my-project and start Claude — all from the tiny keyboard. No laptop required.
Remote Control
💬
Type to Claude
Any text you type on the Cardputer (not a slash command) is injected directly into the active Claude session's tmux pane. Send follow-up instructions from across the room.
Bidirectional
📊
Activity Summary
/what shows recent activity across all registered Claude sessions — what ran, what completed, what errored. Your AI dev dashboard in 240x135 pixels.
Monitoring
🔄
Resilient Connection
WebSocket heartbeat with 15s ping. Messages queue when device is offline and flush on reconnect. Bridge auto-restarts with exponential backoff. Hardware watchdog reboots on hang. Built to stay connected.
Production-grade
💾
OTA Firmware Updates
Flash new firmware over WiFi without touching a cable. Or use USB Mass Storage mode — the SD card mounts as a USB drive on your Mac. Drop the binary, eject, reboot. Takes 30 seconds.
Developer UX

What you need to build this

Total hardware cost: around $30. The firmware and bridge run on ESP32 and Node.js.

ComponentDetails
MCUESP32-S3FN8 (StampS3A)
Clock Speed240 MHz dual-core
Flash8MB (onboard)
PSRAM8MB
Display240×135 IPS LCD, 1.14"
KeyboardFull QWERTY, 56 keys
WiFi802.11 b/g/n (2.4GHz only)
BluetoothBLE 5.0
StorageMicroSD slot (TF card)
PowerUSB-C, 5V
GPIOExpansion header
Price~$30 USD

Optional: LoRa Module

Add a LoRa radio to the expansion port for off-grid mesh networking between devices. Enables inter-device chat and notification sharing without WiFi infrastructure. Module cost: ~$10.

🖥️

M5Stack Cardputer ADV

Available from M5Stack store, Amazon, AliExpress

🔌

USB-C Cable

For initial flashing. After that, WiFi-based OTA.

💻

Mac / Linux with Claude Code

macOS or Linux host running Claude Code in tmux sessions

you have this
⚙️

PlatformIO CLI

For building and flashing the ESP32 firmware

FREE
🟢

Node.js 18+

For running the bridge server on your host machine

FREE
📦

PocketClaude Firmware + Bridge

Open-source, MIT licensed. Clone and go.

FREE

Running in under 30 minutes

Four steps from unboxed hardware to approved AI permissions.

Flash Firmware

Clone the repo. Use PlatformIO to build and flash the ESP32-S3 firmware over USB.

# Install PlatformIO CLI first cd firmware pio run pio run -t upload

Configure WiFi

Connect via serial at 115200 baud to set your WiFi credentials and bridge IP address.

python3 scripts/export-mac-wifi.py --send --port /dev/cu.usbmodem1101 # Or manually: set ssid YOUR_WIFI set host 192.168.1.x

Start Bridge

Run the Node.js bridge server inside a tmux session. It must live in tmux for session switching to work.

cd bridge npm install # Supervised mode with auto-restart: ./run.sh --dev # Or with tmux: tmux new -s bridge npm run dev

Install Hooks

Add the cardputer hook to your Claude Code settings. It fires on every Claude event and registers the session.

// .claude/settings.local.json { "hooks": { "Stop": [{ "type": "command", "command": "/path/to/cardputer-hook.sh" }] } }
verification — confirm everything is working
$ curl http://localhost:8766/status
{
"connected": true,
"uptime_s": 342,
"queue_depth": 0,
"device_ip": "192.168.1.42",
"last_pong_ago_s": 3
}
 
$ curl http://localhost:8766/sessions
[
{ "project": "cardputer", "tmuxSession": "cardputer" },
{ "project": "edify-mobile", "tmuxSession": "edify-mobile" }
]
 
✓ Device connected. Sessions registered. You're ready.

How it all fits together

Three tiers: the device in your pocket, the bridge on your Mac, and Claude Code in tmux.

📱

Cardputer

ESP32-S3
240x135 LCD
QWERTY keyboard
WiFi + optional LoRa

WebSocket
:8765
🌉

Bridge Server

Node.js + TypeScript
WebSocket server
HTTP API :8766
SQLite event log

send-keys
tmux IPC

tmux Sessions

cardputer
edify-mobile
other-project
+ claude in each

Stop / Perm
hooks
🤖

Claude Code

AI agent
tool use
permission model
hook events

DEVICE → CLAUDE (input path)

  • Key press on Cardputer keyboard
  • WebSocket message to bridge
  • Bridge routes: command or inject
  • /go → tmux switch-client
  • Text → tmux send-keys -l into session
  • Claude receives input, responds

CLAUDE → DEVICE (event path)

  • Claude fires Stop / Permission hook
  • Hook POSTs to bridge HTTP :8766
  • Bridge formats message for device
  • WebSocket push to Cardputer
  • LCD renders prompt or notification
  • User presses Y/N → back through bridge
Open-source hardware project

Your AI agent.
Your pocket.
Your control.

A $30 piece of hardware that keeps you in control of Claude Code without breaking your focus. Build it. Hack it. Make it yours.

Early Access ESP32-S3 Firmware Node.js Bridge Claude Code Hooks PlatformIO Build