claude-devtools: support remote access (non-localhost binding) for mobile/LAN use
Feature Request
Summary
Allow claude-devtools to be accessed from non-localhost clients — specifically mobile devices and remote machines on the same network (e.g. Tailscale).
Current Behavior
The devtools server binds to localhost only, and the frontend JS hardcodes http://localhost:${serverStatus.port} for API/WebSocket connections. This means the UI loads on a remote client but spins indefinitely because the JS tries to connect back to localhost on the client device rather than the host running Claude Code.
Use Case
When away from my desktop, I want to monitor and interact with Claude Code sessions from my Android phone (or any mobile browser) via Tailscale. The devtools UI is perfectly suited for this — but the localhost restriction makes it impossible without patching the JS bundle manually.
Proposed Fix
In the frontend JS, replace:
const serverUrl = `http://localhost:${serverStatus.port}`;
with:
const serverUrl = `${window.location.origin}`;
This makes the client connect back to whatever host served the page — works for both localhost and remote hostnames transparently.
Optionally, also support a --host flag on the devtools server to bind to a specific interface (e.g. 0.0.0.0 or a Tailscale IP).
Environment
- macOS (darwin)
- Claude Code with claude-devtools running on a Tailscale-connected machine
- Attempting to access from Android phone via
http://<tailscale-hostname>:3456
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗