← Home

Android · MCP server

Phone Relay

An Android app that runs an MCP server on the phone itself, so Claude can use the phone: read the screen, tap and type, open apps, control media, answer notifications and run Tasker tasks.

Runs on
Android 11 and newer
Reached through
A Cloudflare Tunnel the app runs itself
Sign-in
GitHub, with an allowlist
Status
In daily use. Source is private.

Phone Relay is added to claude.ai as a connector, so it works from the browser, the Claude app, or hands-free in voice mode, and it works on mobile data, not just at home. Things I say to it:

How a request reaches a phone

A phone has no public address, changes networks all day and sits behind whatever router it happens to be near. So the server never opens a port to the network at all. It listens only on the phone's own loopback address, and cloudflared, built into the app, dials out to Cloudflare and carries requests back down that tunnel.

claude.ai calls a hostname on Cloudflare over HTTPS. The request travels down a tunnel that cloudflared, inside the app on the phone, dialed out. It reaches Phone Relay on localhost, which acts on the screen, notifications, media and Tasker. the phoneclaude.aiweb, app, voiceHTTPSCloudflaremy hostnametunnelcloudflaredinside the applocalhostPhone RelayMCP serverscreen · notifications · media · Tasker
The tunnel is opened from the phone outwards, so nothing on the phone accepts a connection from the network.

Keeping everyone else out

A connector like this is a remote login to a phone, so it is treated like one.

A server that has to survive being a phone

The hard part was not the tools, it was staying reachable. Phones sleep, switch from Wi-Fi to mobile data, and put rarely used apps to bed. The app checks its own public address every minute, sooner after a network change, and less often with the screen off. One failed check does not count: it takes two in a row, and failures while the phone is dozing are ignored, because the phone's own network is cut then. The tunnel reconnects by itself when the network changes, and the app's home screen lists every setup check with a button that fixes it.

Other apps can plug in

Phone Relay also fronts two sibling apps. Fridge Labelslets Claude preview and print labels, and WIMS answers "where did I last see this?" from the camera roll. Each one exposes its API only to an app signed with the same key, so nothing else on the phone can call it.

Read the full architecture page →

← All projects