Run Claude Code on Android — OpenCode Mobile

Anthropic's Claude is one of the most capable AI coding models available. If you've been searching for a way to use Claude Code on your Android phone — to review PRs, hotfix bugs, or write code from anywhere — OpenCode Mobile is the answer. It connects to an opencode server configured with your Anthropic API key and gives you a full native Android interface to Claude's coding abilities.

Free and open-source. Bring your own Anthropic API key.

Download for Android

How Claude Code works on Android

Anthropic does not publish an official Claude Code mobile app for Android. The way to get Claude's coding capabilities on your phone is to connect to an agentic runtime that uses Claude as its AI engine — and that's exactly what OpenCode Mobile does.

Here's the architecture in plain terms:

  1. You run opencode (the open-source AI coding agent) on your machine — laptop, desktop, or VPS.
  2. You configure opencode to use Claude (Sonnet, Opus, Haiku, or any Anthropic model) with your own Anthropic API key.
  3. OpenCode Mobile on your Android phone connects to that server over the network.
  4. You chat with Claude from your phone — the app streams responses in real time, shows diffs of file changes, and lets you approve or reject what the agent does.

The result is the full power of Claude's coding abilities — multi-file context, shell command execution, web search, test running — controlled from a native Android app designed for touch screens.

Note on terminology: "Claude Code" is Anthropic's own CLI tool. OpenCode Mobile uses the open-source opencode agent (by SST), which supports Claude as one of its AI backends. The experience is similar — an AI agent that reads your code, runs commands, and proposes changes — but the runtime is opencode, not Anthropic's CLI.

Which Claude models can I use?

OpenCode supports the full Anthropic model family. You pick the model in the opencode server config file; the app streams whatever the server produces. Here's how the main options compare for coding tasks:

Model Best for Speed Cost
Claude Sonnet 4 / 3.5
claude-sonnet-4-5
Most coding tasks — strong reasoning, large context, good tool use Fast Mid
Claude Opus 4
claude-opus-4
Complex refactors — highest reasoning capability for hard architectural problems Slower Higher
Claude Haiku 3.5
claude-3-5-haiku-20241022
Quick edits & questions — fastest responses, lowest cost, great for simple tasks Very fast Low

You can switch models by editing the opencode config on the server — no app update required. OpenCode also supports OpenAI (GPT-4o, o3), Google Gemini, AWS Bedrock, and local models via Ollama, so you're not locked in to Anthropic.

What you get with Claude on Android

This is not a chat window where you paste code and copy suggestions back. OpenCode Mobile with Claude gives you a full coding agent that:

  • Reads your entire codebase Claude gets full file-tree access via the opencode server. Ask it to trace a bug across 20 files and it will — no pasting required.
  • Writes and applies changes Claude proposes diffs; you see them in the app's inline viewer and approve or reject per file. Changes apply to the real filesystem on your server.
  • Runs shell commands Need to run tests, build the project, or check a log? Claude can execute shell commands on your machine via the opencode tool-call system.
  • Streams token by token Responses stream live to your phone — you see Claude "thinking" in real time, not a long wait followed by a wall of text.
  • Works across sessions Sessions persist on the server. Pick up a long coding conversation exactly where you left off, even if you closed the app or switched networks.
  • Protects your API key Your Anthropic key lives on the server, not the phone. The app stores only your server URL and access password in the Android Keystore.

Setting up Claude on Android: step by step

Step 1 — Install opencode on your machine

  1. Install Node.js 20+ if you don't already have it.
  2. Install opencode globally:
    npm install -g opencode-ai

Step 2 — Configure Claude as the AI provider

  1. Get an Anthropic API key from console.anthropic.com.
  2. Create or edit ~/.config/opencode/config.json:
    {
      "provider": {
        "anthropic": {
          "apiKey": "sk-ant-your-key-here"
        }
      },
      "model": "claude-sonnet-4-5"
    }
  3. Or set it as an environment variable if you prefer not to write the key to disk:
    export ANTHROPIC_API_KEY=sk-ant-your-key-here

Step 3 — Start the opencode server

  1. Start the server, binding to all interfaces so your phone can reach it:
    OPENCODE_SERVER_PASSWORD=yourpassword opencode serve --hostname 0.0.0.0 --port 4096
  2. From your phone's browser, verify: http://<machine-ip>:4096/global/health should return {"healthy":true}.

Step 4 — Make the server reachable from anywhere

  1. Install Tailscale on both your machine and your Android phone (free tier works).
  2. Note your machine's Tailscale IP (e.g. 100.x.x.x) from the Tailscale app.
  3. Your server URL becomes: http://100.x.x.x:4096

Alternatives: same LAN Wi-Fi, Cloudflare Tunnel, ngrok. See the full guide for details on each.

Step 5 — Install OpenCode Mobile and connect

  1. On your phone, install OpenCode Mobile via F-Droid or direct APK.
  2. Tap Add Connection.
  3. Enter your server URL (http://100.x.x.x:4096) and the password you set.
  4. Tap Connect. You're now running Claude Code on Android.

Total setup time: about 15 minutes. After that, opening a new coding session with Claude from your phone takes seconds.

What people use Claude on Android for

Code review anywhere

Get a review request while away from your desk. Open OpenCode Mobile, connect, and ask Claude to pull the branch, summarize the changes, and flag anything risky. Claude reads the full diff from your machine — not just what you paste — and explains it in plain English. You can drill in with follow-up questions, ask for specific suggestions, and even apply fixes from your phone before you get back to a laptop.

Debugging production incidents

Something goes wrong at 11pm and you're not at your computer. Open the app, describe the symptom, and let Claude locate the relevant code, trace the execution path, and propose a fix. You review the diff on your phone, approve it, and your CI pipeline kicks off — all without a laptop. Claude's strong reasoning makes it particularly good at connecting dots across multiple files and log outputs.

Writing code during idle time

Commuting, waiting in a queue, between meetings. Short bursts of directed AI coding can scaffold a new feature, write tests for an existing function, or refactor a messy module. Claude handles the actual code; you approve the diffs. The streaming UI makes it feel responsive even on a mobile connection.

Learning a new codebase

Onboarding to a new project or returning to old code after months away? Claude with full file access can map the architecture, explain how a function is called, trace data flow from endpoint to database, and answer "why is this done this way?" questions by reading the actual code — not a stale summary you typed into a chat.

Writing and running tests

Ask Claude to write unit tests for a function. It reads the function, writes the tests, runs them via the opencode shell tool, sees the failures, and iterates — all without you doing anything except reviewing the final output. From your phone, you get the full red-green-refactor loop.

Privacy: where your code goes

When you use Claude via OpenCode Mobile:

  • Your prompts and code go from your phone → to your opencode server → to Anthropic's Claude API. OpenCode Mobile itself never sees or stores your code.
  • The path from phone to server is over your private network (LAN or Tailscale) — not through any third-party relay.
  • The path from server to Claude is via Anthropic's standard API — subject to Anthropic's privacy policy.
  • If data privacy is critical, you can configure opencode to use a local model (e.g. Ollama + a code-capable LLM) so no data ever leaves your network.

Your Anthropic API key lives in the opencode server config on your machine — not in the app, not in any cloud service. The app stores only your server URL and access password, encrypted in the Android Keystore.

OpenCode Mobile vs. Anthropic's Claude Code CLI

Anthropic publishes Claude Code as a CLI tool for desktop/laptop use. OpenCode Mobile is not a replacement for that — it's the mobile interface to the opencode agent, which is a separate open-source project that happens to support Claude among other models.

Practical differences:

  • Anthropic's Claude Code CLI is designed for terminal use on macOS/Linux. There is no official Android client.
  • OpenCode (the runtime OpenCode Mobile connects to) is designed from the ground up as a server with an HTTP API, making it suitable for remote clients like a mobile app.
  • OpenCode Mobile adds the native Android UI layer: touch-optimised chat, diff viewer, biometric unlock, credential storage — things that have no equivalent in a CLI tool.
  • You can run opencode alongside Claude Code CLI on the same machine — they don't conflict.

If you use Claude Code on your laptop and want to do lighter tasks from your phone, OpenCode Mobile with Claude is the natural complement.

Frequently asked questions

Can I run Claude Code on Android?

Yes — via OpenCode Mobile. The app connects to an opencode server configured with your Anthropic API key, giving you Claude's full coding abilities from your Android phone. Anthropic does not publish an official Claude Code Android app; this is the practical alternative.

Which Claude models does OpenCode Mobile support?

OpenCode Mobile works with any model your opencode server supports. For Claude, that includes Sonnet 4 / 3.5, Opus 4, and Haiku 3.5. You set the model in the opencode config file on the server. You can change it at any time without updating the app.

Do I need an Anthropic API key?

Yes — to use Claude models you need an Anthropic API key configured on your opencode server. You can get one from console.anthropic.com. OpenCode also supports other providers, so you can use OpenAI, Gemini, or a local model if you prefer.

Is this the official Claude android app?

No. OpenCode Mobile is an independent open-source project (MIT licensed), not an official Anthropic product. It connects to the open-source opencode agent, which supports Claude as an AI backend. Anthropic has not published an official Claude coding agent app for Android.

How much does it cost to use Claude via OpenCode Mobile?

OpenCode Mobile itself is free. Claude usage is billed by Anthropic based on tokens — the same pricing as using Claude via any API client. Claude Haiku is the most affordable option; Sonnet offers the best balance of cost and capability for most coding tasks. See Anthropic's pricing page for current rates.

Does it work if I'm not on Wi-Fi?

Yes. As long as your phone can reach your opencode server — over mobile data via Tailscale, or any other reachable URL — it works on cellular connections. The SSE streaming protocol is efficient and tolerates brief network hiccups gracefully.

Get started with Claude on Android today

OpenCode Mobile is free, open-source, and available now on Android via F-Droid or direct APK. You need a machine running opencode serve and an Anthropic API key — both of which you can set up in under 15 minutes by following the complete setup guide.

Claude Code on your Android phone — no official app needed.

Download OpenCode Mobile Setup guide

Also see: full feature list · OpenCode Mobile vs ChatGPT & Copilot · vs Termux · troubleshooting connection issues