Overview¶
The AutoMobile IntelliJ/Android Studio plugin attaches to a running MCP server to render navigation data and manage development workflows. It supports MCP over HTTP (streamable) and STDIO, and falls back to the local daemon socket when needed.
Transport selection¶
The plugin resolves a transport when the user clicks “Attach to MCP”:
- MCP dev server discovered via HTTP health checks on localhost.
AUTOMOBILE_MCP_HTTP_URL/-Dautomobile.mcp.httpUrl(streamable HTTP).AUTOMOBILE_MCP_STDIO_COMMAND/-Dautomobile.mcp.stdioCommand(stdio).- Unix socket fallback at
/tmp/auto-mobile-daemon-<uid>.sock.
MCP dev server discovery¶
Discovery focuses on hot-reload dev servers (bun --watch) and supports multiple worktrees.
- Worktree enumeration: the plugin runs
git worktree list --porcelainusingProcessBuilderand coroutines. - Each worktree record includes a filesystem path and optional branch name.
- Port scan: the plugin scans local listening ports (via
lsof,ss, ornetstatdepending on OS). - Health probing: each listening port is queried at
/health(falling back to/auto-mobile/health). - Responses with
server: "AutoMobile"are treated as MCP servers. - Mapping: discovered servers are matched to worktrees using the
branchvalue from the health payload.
The health response also includes instanceId, port, and activeSessions so the plugin can detect restarts
and show server status.
Tool window UX¶
- The dropdown lists every git worktree and its associated MCP server (if any).
- Worktrees without a running server are shown as “no server”.
- Unmatched MCP servers are shown as standalone entries.
- “Rescan servers” re-runs discovery to pick up cold restarts or newly launched dev servers.
Notes¶
- Streamable HTTP endpoints are assumed to live at
http://localhost:<port>/auto-mobile/streamable. - MCP stdio and daemon transports are still available for non-dev workflows.