
AndroJack MCP
io.github.VIKAS9793由 GitHub 账号 VIKAS9793 发布v2.1.0更新于 Oct 25, 2026
Android engineering MCP server with verified documentation grounding and AI validation tools.
概览
本地 MCP 服务器,为 AI 编程助手提供 23 个基于官方文档的 Android 与 Kotlin 参考工具及代码校验器。
- 可以做什么
- 检索并阅读官方 Android 与 Kotlin 文档、架构指南和 API 级别表,可选用 Google Developer Knowledge API 或内置的权威页面索引。检查组件、权限、Gradle 依赖与 Compose BOM 版本,并查询 Kotlin、测试、构建、大屏、可扩展性、Navigation 3、KMP、端侧 AI、Play 政策、XR 与 Wear OS 相关指引。将堆栈跟踪解析为官方文档与问题跟踪链接。按 34 条规则校验生成的代码,覆盖已移除 API、弃用模式及 Android 16/17 合规性,返回结构化的通过或失败结论。还可在 CI 中用命令行运行同一规则引擎,输出文本、JSON 或 SARIF。
- 适用场景
- 在使用 AI 助手开发或审查 Android 与 Kotlin 应用时适用,尤其是需要基于最新官方来源而非过时训练数据回答 Compose、Navigation 3、Gradle 版本、Play 商店合规和 Android 16/17 迁移问题时。
- 运行要求
- 以 npm 包 androjack-mcp 通过 stdio 在本地运行,通常用 npx 启动,需要 Node.js。无需账号或凭据。可选环境变量 ANDROJACK_DEVELOPER_KNOWLEDGE_API_KEY 可将文档搜索切换到 Google 的 API。除非启用离线模式,否则会向 Google、Android 和 Kotlin 官方域名发起 HTTPS 请求。
安装
在 SourceWeft 中
- 打开 控制台中的 AndroJack MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
AndroJack — The Jack of All Android Trades
[图片] [图片] [图片]An MCP server that equips your AI coding assistant with live, verified Android knowledge — so it builds from official sources, not from memory.
[Install in VS Code] [Install in Claude Desktop] [Install in Cursor] [Add to Kiro] [View on npm]
[Official Product Page] [Watch AndroJack in Action on YouTube]
Also works with: Windsurf · VS Code Copilot · Google Antigravity · JetBrains AI — see Manual Config below ↓
VS Code distribution: Also live on the VS Code Marketplace as AndroJack MCP for VS Code.
Table of Contents
- The Crisis That Created This Tool
- What Actually Breaks In Practice
- What AndroJack Does
- Honest Activation Model
- What Can Still Break — Even at Level 3
- Defence-in-Depth
- The Killer Argument
- The 23 Tools
- Quick Start
- Manual Config
- Ecosystem: Google's First-Party Tools
- Security & Privacy
- Changelog
🔥 The Crisis That Created This Tool
In 2025, the Stack Overflow Developer Survey asked 49,000 developers about their experience with AI coding tools. The results should alarm every Android engineer:
- 84% of developers now use AI coding tools — up from 76% the year before.
- Trust in AI accuracy collapsed from 40% to just 29% in a single year.
- 35% of all Stack Overflow visits in 2025 are now triggered by developers debugging and fixing AI-generated code.
The gap between usage and trust is not a coincidence. It is the product of a structural problem: AI models predict tokens, not APIs. They were trained on a snapshot of the world and have no mechanism to know what changed at API 30, what shipped at Google I/O 2025, or what Google Play now rejects at review time.
For Android developers, this failure mode is uniquely dangerous. Android has the fastest-moving ecosystem in mobile development — a new Compose BOM every month, Navigation 3 going stable after seven years of Nav2, Android 16 rewriting the rules on screen orientation locking — and most AI tools have training data that is six months to two years stale by the time you use them.
The result is not just bad code. It is confidently bad code.
⚡ What Actually Breaks In Practice — Documented Evidence
These are not hypothetical risks. They are documented failure modes from real developer projects.
The Navigation 3 Hallucination (January 2026)
A published case study from Atomic Robot documented a live Navigation 2 → Navigation 3 migration using both Gemini and Claude — with internet access enabled on both. The conclusion, verbatim:
"LLMs still hallucinate versions. Even with internet access, both agents wanted to use an outdated release candidate instead of the stable 1.0.0 release."
Navigation 3 went stable in November 2025 after seven years of the same library. It is a complete architectural rethink: back stacks are now plain Kotlin lists, the monolithic nav graph is gone, and NavDisplay replaces NavController. Google's own migration guide is so aware that AI tools get this wrong that it now contains special "AI Agent:" annotations — instructions embedded directly in the official docs for AI tools to follow. An AI tool that generates Nav2 code for a new Compose project in 2026 is not making a small mistake. It is creating an architectural incoherence that requires a full rewrite to fix.
The Compose Deprecation Treadmill
Jetpack Compose ships a new BOM every month. Since most models' training cutoffs, these APIs changed:
Every one of these compiles. Most run without errors. The bugs surface later in CI flakiness, UI regressions, or Play Store review failures.
The Android 16 / API 36 Mandate (in force since August 31, 2026)
Android 16 made a platform-level change affecting every published app: on devices ≥600dp — tablets, foldables, ChromeOS — apps can no longer lock screen orientation or restrict resizability. Since August 31, 2026, Google Play requires new apps and updates to target API 36 (extension available to November 1, 2026). Android 17 / API 37 removes the remaining opt-out.
An AI tool generating android:screenOrientation="portrait" or android:resizeableActivity="false" today is generating code that triggers App Compatibility warnings in Play Console, fails large-screen quality checks, and gets apps demoted in Play Store search results.
The business impact is not theoretical: Foldable users spend 14× more on apps than phone-only users. Tablet + phone users spend 9× more. FlipaClip saw 54% growth in tablet users within four months of going adaptive.
The KMP Silent Failure
Kotlin Multiplatform went mainstream in 2025 — over 900 new KMP libraries published, Room added KMP support, companies now hire specifically for KMP skills. When a developer on a KMP project asks an AI tool to add database support, the AI generates Android-only Room code. It compiles. It runs perfectly on Android. The iOS build fails. The developer spends hours debugging before realizing the root cause: their AI tool does not know KMP exists.
🧩 What AndroJack Does
AndroJack is a documentation-grounded Android engineering MCP server. It gives your AI coding assistant 23 specialized tools that fetch live, verified answers from official Android and Kotlin sources — instead of predicting from stale training data.
It does not make the AI smarter. It makes the AI accountable to evidence.
Think of it as a pre-build linter for LLMs. While other tools retrieve documentation, AndroJack acts as a strict architectural gatekeeper.
⚠️ Honest Activation Model — Two Levels
[!IMPORTANT] This is the most important thing to understand before you install AndroJack.
Level 1 is passive. The tools are available but the AI decides when to use them. An AI building a Compose screen may call architecture_reference but skip material3_expressive — and ship M3E violations silently.
Level 2 is active. The androjack_grounding_gate system prompt maps every task type to the correct tool. Building Compose UI? The AI is mandated to call material3_expressive first. Adding a dependency? It must call gradle_dependency_checker. No exceptions.
Level 3 is the loop-back. android_code_validator runs on every code block the AI generates before returning it to the user. 34 rules covering removed APIs, deprecated patterns, Android 16/17 compliance, and Compose-First migration signals. Comments are ignored, so a migration note like // replaced AsyncTask never triggers a false FAIL. Results come back as text and as structuredContent with an output schema. Verdict FAIL means the AI must fix and re-validate — the user never sees the broken code.
→ For full grounding, always activate Level 2 + Level 3. See Getting the Full Guarantee below.
🪲 What Can Still Break — Even at Level 3
[!IMPORTANT] AndroJack is a documentation-grounding and API-validation tool. It is not a Compose layout engine, a design system enforcer, or a runtime renderer. Level 3 catches removed APIs and deprecated patterns. It cannot catch every class of Android bug. This is not a limitation of AndroJack — it is a fundamental property of static text analysis applied to a visual, runtime-rendered UI framework.
The following bugs were encountered in a real Android app built with AndroJack at Level 2 (v1.4.0). They are documented here honestly so you know exactly what to watch for — and where to reach for different tools.
✅ What Level 3 Catches
⚠️ What Level 3 Cannot Catch
[!WARNING] The following bugs were found in a real project. They are valid, API-current Compose code that violates design system constraints, accessibility minimums, or architectural boundaries. Static text scanning cannot detect them.
Bug PH-UI-001 — Segmented button text truncation
[!NOTE] This is an absence bug. The correct modifier is missing — no wrong one is present. Use visual testing or runtime inspection.
Bug PH-UI-003 — Disabled button contrast failure
[!NOTE] This is a runtime visual property bug. Use paparazzi screenshot tests or Google's Accessibility Scanner.
Bug PH-AR-004 — Raw stack trace rendered to end user
[!WARNING] UDF architecture violations require Detekt with custom rules or unit tests verifying exception mapping.
🗂️ Defence-in-Depth: The Right Tool for Each Bug Class
🎯 The Killer Argument
"Can your
agents.mdfile tell me the Gradle version that shipped last Tuesday?"
No markdown file can. No rules in .cursorrules can. No SKILL.md can.
✅ Only a live tool call can.
That's the job AndroJack exists to do — and nothing else in the current ecosystem does it for Android specifically.
Prompt engineering controls how the AI responds. MCP controls what the AI knows.
✨ What AndroJack Covers — 23 Tools
🚀 Quick Start — Zero Install Required
Option 1 — Interactive CLI (v2.1.0) ✨ Recommended
Launches a full animated terminal wizard with auto-detection for VS Code, Cursor, Claude, Windsurf, JetBrains, Kiro, and Antigravity.
Option 2 — Targeted Installs
Option 3 — Test Without an IDE
Option 4 — Enforce the rules in CI (new in 2.1.0)
The same rule engine the agent is held to, run on every pull request — including code no agent touched:
Flags: --format=text|json|sarif, --target-sdk=N, --min-sdk=N, --fail-on=error|warning|never. Exit codes: 0 pass, 1 violations, 2 usage error or the scan could not check everything (no matching files, a file over 1 MiB, or the 20k-file cap) — a gate never passes on a partial scan.
Optional configuration
🧩 Manual Config / Copy / Paste
If you prefer to wire the server manually, or want to inspect the exact JSON before writing anything:
- Run
npx -y [email protected] install --listto preview detected IDEs and target config paths. - Ready-to-paste examples live in
config/.
Every example keeps AndroJack local by default and runs the published package via npx -y [email protected].
📍 The Ecosystem: AndroJack and Google's First-Party Agent Tools
Google now ships its own agent stack for Android. Being straight about the overlap:
Recommended setup: use Google's tools for retrieval and task skills, and AndroJack as the enforcement step — android_code_validator inside the agent loop and androjack-mcp validate in CI. AndroJack does not try to out-search Google's own documentation index. With ANDROJACK_DEVELOPER_KNOWLEDGE_API_KEY set, it uses that index.
🔒 Security & Privacy
📋 Changelog
v2.1.0 — Fix what didn't work, harden what did, enforce in CI
- Doc search actually returns docs. v2.0 scraped client-rendered search pages and returned no documentation for any query. 2.1 uses Google's Developer Knowledge API (optional key) or a verified index of canonical pages.
- Security: redirect allowlist bypass closed; all fetched content now goes through the untrusted-content boundary (v2.0 claimed this but only one tool did it); boundary-tag spoofing and zero-width/full-width evasion fixed; HTTP session-exhaustion DoS fixed; bearer auth and stateless mode; 7 dependency vulnerabilities (1 critical) patched.
- No more confident wrong answers:
Row→ "DEPRECATED",Task→ "REMOVED" registry false positives fixed; Android 17 games exemption corrected; fabricated Handoff API removed; Room 3 is stable (was described as alpha); Google Maven alphas no longer labelled "Latest Stable"; 19 dead documentation links replaced. - Validator: comments ignored (ends agent fix-loops), Kotlin DSL
kapt(...)detected, API 37 thresholds corrected, 6 new Android 17 rules (34 total), structured output. - New:
androjack-mcp validateCLI (text/JSON/SARIF) for CI; MCP resources for the rule catalogue; full tool annotations; AppFunctions guidance; Android Studio Rabbit 1 / AGP 9.4. - Lower token cost:
tools/list~28.5 KB → ~20.5 KB; repeated identical results in a session are replaced by a short pointer (passrefresh: trueto get them again). - Tests: 85 → 196 (+1 opt-in live), including a 17-scenario black-box UAT suite driven through the real MCP SDK client. See
test/uat/UAT_PLAN.md.
Full details: CHANGELOG.md.
v2.0.0 — Security Hardening, Compose-First, Developer Verification
- Content sanitizer for indirect prompt injection —
src/content-sanitizer.tsneutralizes structural injection patterns (fake role markers, instruction-reset framing) in any externally-fetched text before it reaches the calling agent's context.android_debuggerresults fromissuetracker.google.com— the only allowlisted domain indexing free-text, user-submitted content — are wrapped in an explicit untrusted-data boundary. - Dependency vulnerabilities patched — resolved 7 vulnerabilities (3 high) in transitive
undici/qsvia acheerioupdate. Zero breaking changes, 0 vulnerabilities in the shipped tree. - Tool 23:
android_developer_verification— Google's developer verification program enforces from September 30, 2026 (Brazil, Indonesia, Singapore, Thailand first; global 2027). Covers registration paths, timeline, enterprise exemptions, and CI/CD bulk-registration APIs. - Compose-First platform shift reflected — as of May 19, 2026, Android UI development is officially Compose First; View-based patterns (Fragments, RecyclerView, ViewPager) are flagged as maintenance-mode wherever queried, sourced directly from Google's own announcement rather than left silently outdated.
- Compose 1.11 v2 Testing Framework — full migration guide for the new default
StandardTestDispatcherbehavior, plus a validator rule (UNCONFINED_DISPATCHER_COMPOSE_TEST) that flags the old assumption. - Navigation 3 Scene Decorators (1.1) — persistent chrome (bottom bars, rails, dialogs) without per-screen awareness.
- Android Studio codename corrected — was two full codenames stale ("Panda 2"). Now correctly reflects Quail (2026.1.x) as current stable, AGP 9.2.0.
- Android Skills positioning — documents Google's first-party Android Skills/CLI (April 2026) and positions AndroJack's validator as the complementary post-generation enforcement gate, not a competing retrieval layer.
- 28 validator rules (was 26) — added
UNCONFINED_DISPATCHER_COMPOSE_TESTandNEW_FRAGMENT_CLASS_COMPOSE_FIRST. - Fabricated version numbers removed — a prior session's dependency version catalog example asserted several unverified version numbers. Replaced with only-confirmed values plus explicit
CHECK_LIVE_VIA_gradle_dependency_checkerplaceholders. - Full version sync — closed a gap where
src/version.tshad been bumped without propagating topackage.json, all IDE config files, and manifest files — now enforced as a release checklist item.
v1.7.1 — Engineering Hardening & Community Parity
- 54-Test Coverage — Implemented comprehensive unit and contract tests for validator rules, HTML parser, LRU cache, and HTTP security layer.
- Discovery Parity — Fixed
/.well-known/mcpendpoint to correctly reporttools: 22. - Dependency Sanitization — Removed
node-fetch(migrated to nativefetch) and pruned stale overrides for a cleaner supply chain. - Rule Hardening — Improved Compose component detection for
NavHostandBottomAppBar. - URL Remediation — Fixed broken documentation anchors for Android 17
ACCESS_LOCAL_NETWORKandhandoff.
v1.7.0 — Android 17 / API 37 Support
- Tool 22:
android_api17_compliance— Full reference for Android 17 platform stability (March 26, 2026). - Validator rule expansion — (Corrected in 2.1.0: these notes originally claimed 31 rules, including Room 3.0 and
ACCESS_LOCAL_NETWORKchecks that never shipped. The real count was 26 → 28 in 2.0.0 and 34 in 2.1.0.) - WindowManager 1.5.0 — Added Large (1200dp) and Extra-large (1600dp) breakpoints and layout patterns.
- Room 3.0 alpha — Support for modern SQLiteDriver migration paths.
👥 Authorship & Ownership
Vikas Sahani — Product Lead ([email protected])
Claude AI — AI Engineering Lead
MIT License © 2026 Vikas Sahani | SECURITY.md
Built because 35% of Stack Overflow visits in 2025 are developers debugging AI-generated code.
AndroJack exists so none of those visits are yours.
来源:README.md,提交 3deccda
工具
0版本历史
2- v2.1.0最新Oct 17, 2026
- v2.0.0Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。