Back to Directory/Automation & Workflow

Ghost in the Droid

Give any LLM agent a real Android or iPhone as its body. 62 MCP tools for mobile automation.

Automation & WorkflowPythonv1.3.2

Benchmark (sneak peek)

Early result, with the full methodology writeup still cooking: driven by Claude Code, Ghost completes 115 of 116 tasks (99.1%) on AndroidWorld, Google Research's benchmark for Android agents, on the unmodified upstream harness. Treat this as a preview rather than a citable number. The detailed writeup and trajectories are coming. Watch the releases.


Tech Stack

LayerTechnology
BackendFastAPI, Uvicorn, Python 3.10+
DataSQLAlchemy 2.0, Alembic, Pydantic v2, SQLite (WAL)
FrontendVue 3, TypeScript, Vite, Tailwind CSS 4
Device controlADB for Android; Appium XCUITest/WebDriverAgent for iOS
StreamingAndroid MJPEG/WebRTC via Portal; iOS WDA MJPEG plus screenshot fallback
On-devicellama.cpp, MediaPipe (Android); llama.cpp on Metal, MLX (iOS)
QualityRuff, pytest, Playwright

Running Tests

Most tests are unit/API tests and run without a live device. Live Android and iOS integration tests require the relevant device stack.

# Run all tests on a specific device
DEVICE=<serial> python3 -m pytest tests/ -v --tb=short

For iOS live smoke tests:

IOS_LIVE_NEWS_TEST=1 \
IOS_DEVICE_UDID="<udid>" \
IOS_APPIUM_URL="http://127.0.0.1:4723" \
IOS_BUNDLE_ID="com.google.chrome.ios" \
uv run --extra test python -m pytest tests/test_browser_news.py::test_live_ios_chrome_news_workflow

Get your Android device serial from adb devices.


Database Migrations

The project uses Alembic for schema migrations:

alembic revision --autogenerate -m "add new_field to my_table"   # after editing a model
alembic upgrade head                                              # apply pending
alembic downgrade -1                                              # rollback one

Contributing

The ghost gets stronger with every skill. See CONTRIBUTING.md for adding app skills (highest impact), writing actions and workflows, backend architecture, and the PR process. Join the community on the Skill Hub.


License

MIT. The ghost is free. The ghost is open source. The ghost is yours.

Installation

Source-derived launch command. Check the maintainer’s required arguments and credentials before running:

bash
uvx ghost-in-the-droid

Set up in your AI client

Merge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.

json
{
  "mcpServers": {
    "io-github-ghost-in-the-droid-android-agent": {
      "command": "uvx",
      "args": [
        "ghost-in-the-droid"
      ]
    }
  }
}

Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.

Claude Desktop setup reference

Package

ghost-in-the-droidpypi

Compatible MCP Clients

Ghost in the Droid works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.

  • Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.
  • Cursor~/.cursor/mcp.jsonRestart Cursor for changes to take effect.
  • VS Code.vscode/mcp.jsonReload VS Code window for changes to take effect.
  • Windsurf~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect.
  • Claude Code.mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.

Learn More