@codedroid/mcp

中文文档
0.1.11发布于 2026/11/10MITES Module近 30 天下载 2229

MCP server for controlling Android devices through CodeDroid from Claude Code, Codex, Gemini CLI, and other MCP clients.

原始使用文档
文档目录8 节
  1. Get started
  2. 1. Install for your coding client
  3. 2. Pair your phone
  4. 3. Ask your agent
  5. What it includes
  6. Privacy and security
  7. Need help?
  8. License

CodeDroid MCP

Let Claude Code, Codex, Gemini CLI, or any MCP client use your Android phone. Read the screen, interact with apps, take screenshots, and test what you build through CodeDroid. Your phone and computer can be on different networks.

Get started

You'll need Node.js 20+ and CodeDroid on your Android phone, signed in with its accessibility service enabled. Both devices need internet access.

1. Install for your coding client

Every client at once — run in your terminal:

npx -y @codedroid/mcp setup

It finds Claude Code, Codex, Gemini CLI, Cursor, VS Code, Claude Desktop, and Windsurf, and adds CodeDroid to each one after you confirm. Run it again after an update; it skips clients that are already set up. Or install for one client:

Claude Code — run inside Claude Code:

/plugin marketplace add codedroid-team/codedroid-mcp
/plugin install codedroid@codedroid

Codex — run in your terminal:

codex plugin marketplace add codedroid-team/codedroid-mcp
codex plugin add codedroid@codedroid

Gemini CLI — run in your terminal:

gemini extensions install https://github.com/codedroid-team/codedroid-mcp

Each installation includes the MCP server and skills for phone control and Android app testing. Restart your coding client after installing.

Using another client? See manual MCP setup.

2. Pair your phone

  1. Open CodeDroid → Settings → Computers → Pair a computer on your phone.

  2. Run the command shown there in your computer's terminal. For example:

    npx -y @codedroid/mcp pair ABCD-EFGH
    
  3. Tap Allow on your phone when prompted.

Use the command exactly as shown. Pairing codes expire after 10 minutes and work once.

3. Ask your agent

Read the screen on my phone and describe what is open.

Then try:

  • “Open Android Settings and check the Android version.”
  • “Open my app, navigate to sign-in, and take a screenshot.”
  • “Install this APK, launch it, and check for crashes.”*

*install_apk works over CodeDroid's connection, with one setting to allow. Reading logs with adb also requires Android platform-tools and a USB or wireless debugging connection. See adb setup.

What it includes

  • MCP tools to read the screen, take screenshots, tap, type, swipe, open apps, and hand CodeDroid's agent a multi-step task, on one phone or several. See the tool list.
  • Skills: codedroid-phone teaches the agent to drive the phone one checked step at a time, and test-on-device walks it through building, installing, and verifying an Android app change. app-e2e tests an app end to end: it explores the app, writes a test PRD, critical user journeys and test cases into its repo (e2e/), stops for your review of each, runs the cases on the phone and writes a report with a screenshot per case. Each step is its own skill (app-e2e-explore, -prd, -cujs, -testcases, -run). Then app-e2e-rerun runs some of the cases (by id, journey or priority, last failures, the ones a change touches, a flaky check), app-e2e-bug turns a bug into a case that reproduces it, and app-e2e-maintain keeps the cases current as the app changes.
  • install_apk to install a build from your computer, with no cable or shared network.
  • An adb tool that runs adb commands on your computer, to read logs and run tests. You can turn it off.

Privacy and security

The plugin runs npx -y @codedroid/mcp@<version>, which downloads this exact release from npm and starts a local MCP server. Everything it sends goes over TLS to the CodeDroid server, orchestrator.codedroid.com unless the pairing command shown on your phone names another:

  • Pairing sends the one-time code, your computer's name, and its OS (for example darwin), so the phone can show which computer is connected.
  • Tool calls are relayed between your agent and the phone: screen contents, screenshots, text you ask it to type, clipboard reads and writes, and task progress. Each call also names the MCP client that made it and its version. The phone asks you to Allow a computer the first time, shows when one is in use, and can stop or revoke it.

The local server listens on 127.0.0.1 only and requires a per-user token. Pairing credentials, the token, and logs stay in ~/.codedroid on your computer. The adb tool runs only on your computer, and its push and pull stay within your project and temp directories. See Architecture for details.

The plugin itself collects no analytics. The CodeDroid app and server keep usage records under your CodeDroid account: pairing and connecting, whether a computer was allowed, and for each phone tool call its name, whether it worked and its error code, how long it took, the MCP client, session and versions involved, your computer's OS and a random id for it, and the task id of a run_task. Usage records never include tool arguments, screen contents, or text you type.

Need help?

Check your connection:

npx -y @codedroid/mcp status

Manage or revoke computer access in CodeDroid → Settings → Computers.

See the reference guide for tools, manual setup, configuration, troubleshooting, and development.

License

MIT © 2026 CodeDroid

版本与发布记录

@codedroid/mcp 共发布 12 个版本,首次发布于 2026/10/22;过去 12 个月发布了 12 个版本。

版本发布日期距今
0.1.11latest2026/11/10今天
0.1.92026/11/073 天前
0.1.82026/11/073 天前
0.1.72026/11/073 天前
0.1.62026/11/073 天前
0.1.52026/11/064 天前

关于 @codedroid/mcp 的常见问题

@codedroid/mcp 是什么?

MCP server for controlling Android devices through CodeDroid from Claude Code, Codex, Gemini CLI, and other MCP clients.

如何安装 @codedroid/mcp?

在项目目录运行 npm install @codedroid/mcp,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 codedroid-mcp,可以用 npx codedroid-mcp 直接运行。

@codedroid/mcp 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/codedroid__mcp 是否存在。

@codedroid/mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@codedroid/mcp 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@codedroid/mcp 可以商用吗?

@codedroid/mcp 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@codedroid/mcp 的下载量有多少?

根据 npm 官方下载统计,@codedroid/mcp 在 2026/10/10 – 2026/11/08 这 30 天内被下载 2,229 次,日均约 74 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@codedroid/mcp 还在维护吗?

最新版本 0.1.11 发布于 2026/11/10(今天);至今共发布 12 个版本,其中过去 12 个月发布了 12 个;首次发布于 2026/10/22。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。