-
Notifications
You must be signed in to change notification settings - Fork 11
feat(container): add first-party Android MCP module #437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
1113f27
19fdc19
c315741
66ed517
8ef4167
3cd6aa8
5e1e25b
a93d231
a80a75c
85c40cb
b221cd1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| "@prover-coder-ai/docker-git": minor | ||
| --- | ||
|
|
||
| Add Android MCP integration alongside the existing Playwright MCP support (issue #436). | ||
|
|
||
| Projects can now opt into a nested Android emulator sidecar driven by the | ||
| first-party Rust `android-connection` MCP server, mirroring how Playwright MCP works. Enable it | ||
| with the new `--mcp-android` / `--no-mcp-android` create flags, the `mcp-android` | ||
| subcommand, the interactive create-flow prompt, or the `enableMcpAndroid` field | ||
| on the web/API create-project request. When enabled, the generated | ||
| `docker-compose.yml` adds a gated `docker-android` emulator service (KVM, | ||
| ADB port forwarding, headless CI mode) and the agent MCP config writers register | ||
| the Android server so it coexists with Playwright. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,6 +71,7 @@ bun run docker-git clone https://github.com/ProverCoderAI/docker-git/issues/122 | |
|
|
||
| - `--force` пересоздаёт окружение и удаляет volumes проекта. | ||
| - `--mcp-playwright` включает Playwright MCP и Chromium sidecar для браузерной автоматизации. | ||
| - `--mcp-android` включает first-party Android MCP (`android-connection`) и вложенный sidecar с Android-эмулятором (`docker-android`) для мобильной автоматизации. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value Упростите формулировку для параллельности со строкой Текущая формулировка: содержит больше деталей реализации, чем описание Playwright выше (line 73). Для лучшей параллельности и читаемости рекомендуется: Либо, если детали важны, добавьте аналогичную детализацию для Playwright: 🤖 Prompt for AI AgentsSource: Path instructions |
||
|
|
||
| Автоматический запуск агента: | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| target/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| [package] | ||
| name = "docker-git-android-connection" | ||
| version = "0.1.0" | ||
| edition = "2021" | ||
| description = "First-party Android MCP and lifecycle module for docker-git" | ||
| license = "MIT" | ||
| repository = "https://github.com/ProverCoderAI/docker-git" | ||
|
|
||
| [lib] | ||
| name = "docker_git_android_connection" | ||
| path = "src/lib.rs" | ||
|
|
||
| [[bin]] | ||
| name = "docker-git-android-connection" | ||
| path = "src/main.rs" | ||
|
|
||
| [[bin]] | ||
| name = "android-connection" | ||
| path = "src/bin/android-connection.rs" | ||
|
|
||
| [dependencies] | ||
| clap = { version = "4.5.53", features = ["derive"] } | ||
| serde = { version = "1.0.228", features = ["derive"] } | ||
| serde_json = "1.0.145" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # docker-git Android connection | ||
|
|
||
| First-party Android MCP module for docker-git. | ||
|
|
||
| The crate provides two binaries: | ||
|
|
||
| - `android-connection`: MCP stdio server used by Codex, Claude, Gemini, and Grok. | ||
| - `docker-git-android-connection`: lifecycle CLI for deterministic Android runtime naming and Docker command construction. | ||
|
|
||
| The core module keeps deterministic naming, endpoint validation, and tool specifications pure. Shell effects are isolated in the binaries and MCP tool handlers. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| use clap::Parser; | ||
| use docker_git_android_connection::mcp::{run_stdio, McpState}; | ||
| use docker_git_android_connection::{ | ||
| android_spec, DEFAULT_ADB_ENDPOINT, DEFAULT_ANDROID_IMAGE, DEFAULT_PROJECT_ID, | ||
| }; | ||
| use std::io::{self, BufReader}; | ||
| use std::path::PathBuf; | ||
| use std::process::ExitCode; | ||
|
|
||
| #[derive(Parser, Debug)] | ||
| #[command(version, about = "Android MCP stdio server for docker-git")] | ||
| struct Cli { | ||
| #[arg(long, default_value = DEFAULT_PROJECT_ID)] | ||
| project: String, | ||
| #[arg(long, default_value = "docker-git-shared")] | ||
| network: String, | ||
| #[arg(long, default_value = DEFAULT_ADB_ENDPOINT)] | ||
| endpoint: String, | ||
| #[arg(long, default_value = DEFAULT_ANDROID_IMAGE)] | ||
| image: String, | ||
| #[arg(long, default_value = ".")] | ||
| workspace: PathBuf, | ||
| #[arg(long)] | ||
| allow_install: bool, | ||
| #[arg(long)] | ||
| no_adb_probe: bool, | ||
| } | ||
|
|
||
| fn main() -> ExitCode { | ||
| match run() { | ||
| Ok(()) => ExitCode::SUCCESS, | ||
| Err(error) => { | ||
| eprintln!("{error}"); | ||
| ExitCode::from(1) | ||
| } | ||
| } | ||
| } | ||
|
|
||
| fn run() -> Result<(), Box<dyn std::error::Error>> { | ||
| let cli = Cli::parse(); | ||
| let spec = android_spec(&cli.project, &cli.network, &cli.endpoint, &cli.image)?; | ||
| let state = McpState { | ||
| spec, | ||
| workspace: cli.workspace, | ||
| adb_probe: !cli.no_adb_probe, | ||
| allow_install: cli.allow_install, | ||
| }; | ||
| let stdin = io::stdin(); | ||
| let stdout = io::stdout(); | ||
| let mut reader = BufReader::new(stdin.lock()); | ||
| let mut writer = stdout.lock(); | ||
| run_stdio(&mut reader, &mut writer, state)?; | ||
| Ok(()) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Уточните упоминание "first-party" и версионирование android-connection.
Строка 8 упоминает "first-party Rust
android-connectionMCP server", но в changeset не указывается:crates/android-connection)Рекомендуется добавить уточнение в скобках: "новый Rust крейт
android-connection" или аналогично для ясности, что это не существующий компонент.🤖 Prompt for AI Agents