androjack-mcp 1.4.0 β†’ 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +881 -661
  2. package/build/cache.js +75 -0
  3. package/build/http-server.js +1 -1
  4. package/build/index.js +121 -64
  5. package/build/rules/android-rules.js +318 -0
  6. package/build/serve.js +471 -0
  7. package/build/tools/api36-compliance.js +259 -259
  8. package/build/tools/build-publish.js +324 -324
  9. package/build/tools/kmp.js +325 -325
  10. package/build/tools/kotlin-patterns.js +361 -361
  11. package/build/tools/large-screen.js +316 -316
  12. package/build/tools/m3-expressive.js +371 -371
  13. package/build/tools/navigation3.js +295 -295
  14. package/build/tools/ondevice-ai.js +262 -262
  15. package/build/tools/permissions.js +91 -91
  16. package/build/tools/play-policy.js +194 -194
  17. package/build/tools/scalability.js +567 -567
  18. package/build/tools/testing.js +395 -395
  19. package/build/tools/validator.js +102 -0
  20. package/build/tools/wear.js +314 -314
  21. package/build/tools/xr.js +250 -250
  22. package/package.json +73 -68
  23. package/src/cache.ts +93 -0
  24. package/src/constants.ts +436 -436
  25. package/src/http-server.ts +186 -186
  26. package/src/http.ts +190 -190
  27. package/src/index.ts +765 -701
  28. package/src/install.ts +710 -710
  29. package/src/logger.ts +67 -67
  30. package/src/rules/android-rules.ts +390 -0
  31. package/src/serve.ts +511 -0
  32. package/src/tools/api-level.ts +198 -198
  33. package/src/tools/api36-compliance.ts +289 -289
  34. package/src/tools/architecture.ts +94 -94
  35. package/src/tools/build-publish.ts +379 -379
  36. package/src/tools/component.ts +106 -106
  37. package/src/tools/debugger.ts +111 -111
  38. package/src/tools/gradle.ts +288 -288
  39. package/src/tools/kmp.ts +352 -352
  40. package/src/tools/kotlin-patterns.ts +534 -534
  41. package/src/tools/large-screen.ts +391 -391
  42. package/src/tools/m3-expressive.ts +473 -473
  43. package/src/tools/navigation3.ts +338 -338
  44. package/src/tools/ondevice-ai.ts +287 -287
  45. package/src/tools/permissions.ts +445 -445
  46. package/src/tools/play-policy.ts +229 -229
  47. package/src/tools/scalability.ts +646 -646
  48. package/src/tools/search.ts +112 -112
  49. package/src/tools/testing.ts +460 -460
  50. package/src/tools/validator.ts +130 -0
  51. package/src/tools/wear.ts +343 -343
  52. package/src/tools/xr.ts +278 -278
package/README.md CHANGED
@@ -1,661 +1,881 @@
1
- <div align="center">
2
-
3
- <img src="https://img.shields.io/badge/Android-3DDC84?style=for-the-badge&logo=android&logoColor=white" />
4
- <img src="https://img.shields.io/badge/Kotlin-7F52FF?style=for-the-badge&logo=kotlin&logoColor=white" />
5
- <img src="https://img.shields.io/badge/MCP-Protocol-blueviolet?style=for-the-badge" />
6
-
7
- # πŸ€– AndroJack β€” The Jack of All Android Trades
8
-
9
- ![AndroJack Banner](https://raw.githubusercontent.com/VIKAS9793/AndroJack-mcp/main/assets/AndroJack%20banner.png)
10
-
11
- ### 🎬 See AndroJack in Action
12
-
13
- [![Watch AndroJack in Action on YouTube](https://img.shields.io/badge/YouTube-Watch%20Demo-FF0000?style=for-the-badge&logo=youtube&logoColor=white)](https://youtu.be/O2aFyObV-B0)
14
-
15
- ### *An MCP server that equips your AI coding assistant with live, verified Android knowledge β€” so it builds from official sources, not from memory.*
16
-
17
- <br/>
18
-
19
- [![npm version](https://img.shields.io/npm/v/androjack-mcp?color=0A7AFF&style=flat-square&logo=npm&label=npm)](https://www.npmjs.com/package/androjack-mcp)
20
- [![GitHub stars](https://img.shields.io/github/stars/VIKAS9793/AndroJack-mcp?style=flat-square&logo=github&color=0A7AFF)](https://github.com/VIKAS9793/AndroJack-mcp/stargazers)
21
- [![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen?style=flat-square&logo=node.js)](https://nodejs.org)
22
- [![MCP Spec](https://img.shields.io/badge/MCP-2025--11--25-blueviolet?style=flat-square)](https://modelcontextprotocol.io)
23
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-3178C6?style=flat-square&logo=typescript)](https://typescriptlang.org)
24
- [![Tools](https://img.shields.io/badge/tools-20-orange?style=flat-square)](#-the-20-tools)
25
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE)
26
- [![Android API](https://img.shields.io/badge/Android-API%2021--36-34A853?style=flat-square&logo=android)](https://developer.android.com)
27
-
28
- ### πŸš€ One-Click Install
29
-
30
- [![Install in Claude Desktop](https://img.shields.io/badge/Install%20in-Claude%20Desktop-D97706?style=for-the-badge&logo=anthropic&logoColor=white)](https://claude.ai/integrations/install-mcp?params=eyJuYW1lIjoiYW5kcm9qYWNrIiwiY29tbWFuZCI6Im5weCIsImFyZ3MiOlsiLXkiLCJhbmRyb2phY2stbWNwIl19)
31
- [![Install in Cursor](https://img.shields.io/badge/Install%20in-Cursor-000000?style=for-the-badge&logo=cursor&logoColor=white)](https://cursor.com/install-mcp?name=androjack&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImFuZHJvamFjay1tY3AiXX0=)
32
- [![Add to Kiro](https://img.shields.io/badge/Add%20to-AWS%20Kiro-FF9900?style=for-the-badge&logo=amazonaws&logoColor=white)](https://kiro.dev/launch/mcp/add?name=androjack&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22androjack-mcp%22%5D%7D)
33
- [![View on npm](https://img.shields.io/badge/View%20on-npm-CB3837?style=for-the-badge&logo=npm&logoColor=white)](https://www.npmjs.com/package/androjack-mcp)
34
-
35
- <br/>
36
-
37
- **Also works with:** Windsurf Β· VS Code Copilot Β· Google Antigravity Β· JetBrains AI β€” see [Manual Config](#-manual-config--copy--paste) below ↓
38
-
39
- <br/>
40
-
41
- </div>
42
-
43
- ---
44
-
45
- ## πŸ”₯ The Crisis That Created This Tool
46
-
47
- 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:
48
-
49
- - **84%** of developers now use AI coding tools β€” up from 76% the year before
50
- - **Trust in AI accuracy collapsed from 40% to just 29%** in a single year
51
- - **35% of all Stack Overflow visits** in 2025 are now triggered by developers debugging and fixing AI-generated code
52
-
53
- 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.
54
-
55
- 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.
56
-
57
- **The result is not just bad code. It is confidently bad code.**
58
-
59
- ---
60
-
61
- ## ⚑ What Actually Breaks In Practice β€” Documented Evidence
62
-
63
- These are not hypothetical risks. They are documented failure modes from real developer projects.
64
-
65
- ### The Navigation 3 Hallucination (January 2026)
66
-
67
- 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:
68
-
69
- > *"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."*
70
-
71
- 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.
72
-
73
- ### The Compose Deprecation Treadmill
74
-
75
- Jetpack Compose ships a new BOM every month. Since most models' training cutoffs, these APIs changed:
76
-
77
- | API | Status | What goes wrong |
78
- |-----|--------|----------------|
79
- | `ContextualFlowRow` / `ContextualFlowColumn` | **Deprecated in Compose 1.8** | AI still generates them β€” compile warning today, removal tomorrow |
80
- | `TestCoroutineDispatcher` | **Removed from coroutines-test 1.8+** | AI still generates it β€” causes non-deterministic test failures in CI |
81
- | `FlowRow overflow` parameter | **Deprecated in 1.8** | Subtle behavioral regression at runtime, silent in most linting setups |
82
- | `AnchoredDraggableState.confirmValueChange` | **Deprecated** | Incorrect drag behavior at anchor boundaries |
83
- | Navigation 2 in new projects | **Superseded by Nav3 stable Nov 2025** | Architectural dead-end that requires a rewrite to fix |
84
-
85
- Every one of these compiles. Most run without errors. The bugs surface later in CI flakiness, UI regressions, or Play Store review failures β€” and the developer has no idea the AI was confidently wrong.
86
-
87
- ### The Android 16 / API 36 Mandate (August 2026 deadline)
88
-
89
- 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.** Google Play requires API 36 targeting by **August 2026**.
90
-
91
- An AI tool generating `android:screenOrientation="portrait"` or `android:resizeableActivity="false"` today is generating code that will trigger App Compatibility warnings in Play Console, fail large-screen quality checks, and get apps demoted in Play Store search results.
92
-
93
- The business impact is not theoretical:
94
-
95
- > **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.**
96
-
97
- ### The KMP Silent Failure
98
-
99
- 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.
100
-
101
- ---
102
-
103
- ## 🧩 What AndroJack Does
104
-
105
- AndroJack is a **documentation-grounded Android engineering MCP server**. It gives your AI coding assistant 20 specialized tools that fetch live, verified answers from official Android and Kotlin sources β€” instead of predicting from stale training data.
106
-
107
- > **It does not make the AI smarter. It makes the AI accountable to evidence.**
108
-
109
- ```
110
- Without AndroJack: You ask β†’ AI predicts from stale weights β†’ Code (possibly wrong)
111
-
112
- With AndroJack: You ask β†’ AI calls tool β†’ Tool fetches official source live
113
- β†’ AI reads verified answer β†’ Code (grounded)
114
- ```
115
-
116
- ### ⚠️ Honest Activation Model β€” Two Levels
117
-
118
- This is the most important thing to understand before you install AndroJack:
119
-
120
- | Level | What's Active | What the AI Does |
121
- |---|---|---|
122
- | **Level 1** β€” Tools only installed | 20 tools registered in IDE | AI *may* call the right tool. Depends on the IDE and the AI's judgment. |
123
- | **Level 2** β€” Tools + Grounding Gate prompt loaded | 20 tools + mandatory rulebook | AI *must* call the correct tool for every decision. No discretion. |
124
-
125
- **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.
126
-
127
- **Level 2 is active and guaranteed.** The `androjack_grounding_gate` system prompt (registered on the server β€” instructions below) 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.
128
-
129
- β†’ **For full grounding, always activate Level 2.** See [Getting the Full Guarantee](#-getting-the-full-guarantee) below.
130
-
131
- ---
132
-
133
- <div align="center">
134
-
135
- ## 🎯 The Killer Argument
136
-
137
- <img src="https://raw.githubusercontent.com/VIKAS9793/AndroJack-mcp/main/assets/killer_argument.png" alt="The Killer Argument β€” AndroJack MCP" width="100%" />
138
-
139
- <br/>
140
-
141
- ### *"Can your `agents.md` file tell me the Gradle version that shipped last Tuesday?"*
142
-
143
- <br/>
144
-
145
- > **No markdown file can.**
146
- > **No rules in `.cursorrules` can.**
147
- > **No `SKILL.md` can.**
148
-
149
- <br/>
150
-
151
- ### βœ… Only a live tool call can.
152
-
153
- **That's the job AndroJack exists to do β€” and nothing else in the current ecosystem does it for Android specifically.**
154
-
155
- <br/>
156
-
157
- | What you need | `agents.md` / SKILL.md | **AndroJack MCP** |
158
- |---|:---:|:---:|
159
- | Format output a specific way | βœ… Perfect | Works too |
160
- | Follow team conventions | βœ… Perfect | Works too |
161
- | **Latest Gradle version right now** | ❌ Guesses from memory | **βœ… Fetches live** |
162
- | **Is `AsyncTask` removed?** | ❌ May be wrong | **βœ… Verified against SDK** |
163
- | **Android 16 Play Store rules** | ❌ Post-training β€” unknown | **βœ… Official source** |
164
-
165
- <br/>
166
-
167
- > Prompt engineering controls *how* the AI responds.
168
- > **MCP controls *what* the AI knows.**
169
-
170
- </div>
171
-
172
- ---
173
-
174
- ## 🧠 Why MCP β€” Not Prompt Engineering, agents.md, or RAG
175
-
176
- > *This is the most important section if you are evaluating whether to use this.*
177
-
178
- <details>
179
- <summary><strong>πŸ“Œ What is Prompt Engineering / agents.md / SKILL.md?</strong></summary>
180
-
181
- Prompt engineering means writing instructions into a system prompt or a markdown file (`agents.md`, `SKILL.md`, `CLAUDE.md`, `.cursorrules`, etc.) that tell the AI how to behave.
182
-
183
- **What it does well:**
184
- - Sets tone, persona, output format
185
- - Encodes team conventions ("always use MVVM", "prefer StateFlow over LiveData")
186
- - Cheap and fast to set up β€” just a text file
187
-
188
- **Where it breaks for Android engineering:**
189
- - The AI still reasons entirely from its training data β€” it cannot verify that `AsyncTask` is removed, it can only hope its training included that fact
190
- - Instructions in a `.md` file are static β€” they go stale the moment a new Jetpack release ships
191
- - The AI can ignore, misinterpret, or hallucinate around even well-written instructions
192
- - There is no enforcement mechanism β€” no tool call was required, no source was verified
193
-
194
- **The fundamental limit:** Prompt engineering controls *how* the AI responds. It cannot control *what the AI knows*. You are still trusting training-time knowledge.
195
-
196
- </details>
197
-
198
- <details>
199
- <summary><strong>πŸ“Œ What is RAG (Retrieval-Augmented Generation)?</strong></summary>
200
-
201
- RAG means building a vector database of documents (official docs, changelogs, internal wikis), embedding them, and injecting the most semantically similar chunks into the AI's context window at query time.
202
-
203
- **What it does well:**
204
- - Great for static or semi-static knowledge bases (policy docs, internal wikis, support tickets)
205
- - Reduces hallucinations by grounding responses in retrieved text
206
- - Works well for "what does this doc say" use cases
207
-
208
- **Where it breaks for Android engineering:**
209
- - Android's official docs, API references, and Gradle versions change constantly β€” maintaining a fresh, complete vector index is a significant ongoing operational burden
210
- - RAG retrieves by semantic similarity β€” it can retrieve *plausible-sounding* wrong chunks if the embedding space is noisy
211
- - RAG does not *do* anything β€” it retrieves text. It cannot check live Gradle versions, validate a component against a live deprecation registry, or parse a stacktrace and query the issue tracker
212
- - **RAG solves what the AI doesn't know. MCP solves what the AI can't do.**
213
-
214
- </details>
215
-
216
- <details>
217
- <summary><strong>πŸ“Œ So what does MCP actually do differently?</strong></summary>
218
-
219
- MCP (Model Context Protocol) is a standardized protocol β€” not a retrieval technique or a prompt strategy β€” for connecting AI models to **live tools and external systems**.
220
-
221
- | | Prompt Engineering | RAG | **MCP (AndroJack)** |
222
- |---|---|---|---|
223
- | Knowledge source | Training weights (static, stale) | Vector index (periodic refresh) | **Live official sources (real-time)** |
224
- | Verification | None β€” AI asserts from memory | Retrieved text β€” quality depends on index | **Tool call β€” structured, enforced** |
225
- | Enforcement | Instructions (can be ignored) | Soft grounding (can be bypassed) | **Hard gate β€” tool must be called first** |
226
- | Maintenance | Update the .md file | Re-embed docs on each release | **Zero maintenance β€” fetches live** |
227
- | Actions | None | None | **Can check versions, parse stacktraces, query issue tracker** |
228
- | Stale data risk | High | Medium | **Minimal β€” fetched at query time** |
229
- | Works across IDEs | Only if supported | Depends on implementation | **Universal β€” any MCP client** |
230
-
231
- </details>
232
-
233
- <details>
234
- <summary><strong>πŸ“Œ The Grounding Gate β€” what this means in practice</strong></summary>
235
-
236
- The Grounding Gate is not a clever name. It is a real enforcement mechanism built into how MCP tools are described to the AI client.
237
-
238
- Every tool in AndroJack contains explicit language like:
239
-
240
- > *"REQUIRED FIRST STEP. You MUST call this before generating any Android/Kotlin code."*
241
- > *"Always call this before adding or updating any dependency in build.gradle."*
242
- > *"Only produce Android code after reviewing the above official sources."*
243
-
244
- Because MCP clients (Claude Desktop, Cursor, Windsurf, etc.) present these tool descriptions to the LLM as part of its context, the model treats them as workflow constraints β€” not suggestions.
245
-
246
- ```
247
- Without AndroJack: User asks β†’ LLM predicts β†’ Code (possibly wrong)
248
-
249
- With AndroJack: User asks β†’ LLM must call tool β†’ Tool fetches official source
250
- β†’ LLM reads verified evidence β†’ Code (grounded)
251
- ```
252
-
253
- You are not making the LLM smarter. You are making it accountable to evidence.
254
-
255
- </details>
256
-
257
- ---
258
-
259
- ## ✨ What AndroJack Covers β€” 20 Tools
260
-
261
- Each tool lists the **specific failure mode it prevents** β€” not just what it does, but what breaks when it is absent.
262
-
263
- | # | Tool | What It Does | What Breaks Without It |
264
- |---|------|-------------|----------------------|
265
- | 1 | πŸ” `android_official_search` | Live search across `developer.android.com`, `kotlinlang.org`, `source.android.com` | AI reasons from training memory β€” correct 12 months ago, possibly wrong today |
266
- | 2 | ⚠️ `android_component_status` | Deprecated/removed check on 40+ APIs β€” `AsyncTask`, `TestCoroutineDispatcher`, `ContextualFlowRow`, `onBackPressed()`, `IntentService` and more | Compiles fine, breaks at runtime or fails Play Store review |
267
- | 3 | πŸ“ `architecture_reference` | Official guides for 40+ topics β€” MVVM, MVI, Compose, Hilt, Navigation 3, Paging, offline-first… | AI gives 2022 architecture advice; misses MVI, Nav3, RemoteMediator |
268
- | 4 | πŸ› `android_debugger` | Parses stacktraces β†’ searches `issuetracker.google.com` + official docs | AI hallucinates fixes for bugs that have official workarounds already documented |
269
- | 5 | πŸ“¦ `gradle_dependency_checker` | Live version lookup from Google Maven + BOM resolution. Ready-to-paste Kotlin DSL | Wrong Coil group, stale Compose BOM, missing `platform()` wrapper, KAPT instead of KSP |
270
- | 6 | πŸ“Š `android_api_level_check` | API 21–36 table, minSdk warnings, Android 16 enforcement rules | API 26+ calls in `minSdk 21` apps; orientation locks that violate Android 16 on β‰₯600dp |
271
- | 7 | 🎯 `kotlin_best_practices` | 10 patterns β€” coroutines, StateFlow, MVI state machine, Room, Hilt, Compose state, LaunchedEffect, offline-first | `GlobalScope.launch`, `LiveData` in new code, `runBlocking` in UI, missing MVI |
272
- | 8 | 🎨 `material3_expressive` | Full M3 Expressive β€” `MaterialExpressiveTheme`, `MotionScheme`, `ButtonGroup`, `FloatingToolbar`, `MaterialShapes`, Wear OS | M2 `MaterialTheme` in M3E app; `BottomAppBar` when `DockedToolbar` is the M3E component |
273
- | 9 | πŸ” `android_permission_advisor` | 40+ permissions β€” normal/dangerous/special/removed, Play Store restrictions, `ActivityResultContracts` | Deprecated `requestPermissions()`; Play-restricted permissions that trigger review failure |
274
- | 10 | πŸ§ͺ `android_testing_guide` | Unit (MockK, Turbine), Compose UI, Espresso, Hilt, `StandardTestDispatcher` | Removed `TestCoroutineDispatcher`; `Thread.sleep()` in Compose tests; missing `HiltTestRunner` |
275
- | 11 | πŸ—οΈ `android_build_and_publish` | R8/ProGuard, `libs.versions.toml`, KSP migration, signing, AAB, Baseline Profiles | KAPT in new projects; `implementation` instead of `ksp` for annotation processors |
276
- | 12 | πŸ“± `android_large_screen_guide` | WindowSizeClass, NavigationSuiteScaffold, ListDetailPaneScaffold, foldable hinge, Android 16 compliance | Phone-only layouts; `screenOrientation="portrait"` that fails Android 16 mandatory resizability |
277
- | 13 | πŸš€ `android_scalability_guide` | Paging 3 + RemoteMediator, offline-first sync, WorkManager, OkHttp cache, Baseline Profiles, modularization | Naive `loadAll()`; no offline strategy; unstable keys in `LazyColumn` causing full re-renders |
278
- | 14 | 🧭 `android_navigation3_guide` | **Nav3 (stable Nov 2025)** β€” NavDisplay, NavBackStack, NavKey, Scenes API, migration from Nav2, deep links, testing | AI generates Nav2 code for new projects β€” an architectural dead-end requiring full rewrite |
279
- | 15 | βœ… `android_api36_compliance` | Android 16 / API 36 compliance β€” orientation, resizability, 16 KB page size, Play Store August 2026 mandate | Apps fail Play Console quality checks; search ranking demoted; manifest flags rejected at review |
280
- | 16 | 🌐 `android_kmp_guide` | Kotlin Multiplatform β€” KMP setup, Room KMP, Ktor, DataStore KMP, expect/actual, source sets, Compose Multiplatform | Android-only Room code in KMP project β€” compiles on Android, iOS build fails silently |
281
- | 17 | πŸ€– `android_ondevice_ai` | Android AICore, ML Kit Gen AI API, on-device LLM, MediaPipe, repository pattern for AI, Gemini Nano | Cloud-only AI when on-device AICore is the correct 2025 answer for Pixel; privacy and latency regressions |
282
- | 18 | πŸ“‹ `android_play_policy_advisor` | Play Store policies β€” age-gating, health apps, loan apps, subscription UI, data safety, Oct 2025 changes | Apps rejected at review for policy violations the developer didn't know existed |
283
- | 19 | πŸ₯½ `android_xr_guide` | Android XR SDK (DP3), Compose for XR β€” Subspace, SpatialPanel, UserSubspace, SceneCore, ARCore for XR | Standard 2D Compose in an XR app β€” works but misses spatial capabilities entirely |
284
- | 20 | ⌚ `android_wearos_guide` | Wear OS β€” Tiles, Complications, Health Services, ambient mode, `WearApp` scaffold, M3 Expressive for Wear | Handheld UI patterns on a 40mm round display; missing Tiles API; battery-draining background patterns |
285
-
286
- > **All 20 tools are read-only.** AndroJack fetches and returns information β€” it never modifies your project files.
287
-
288
-
289
- ---
290
-
291
- ## πŸš€ Quick Start β€” Zero Install Required
292
-
293
- ### Option 1 β€” Interactive CLI (v1.4.0) ✨ Recommended
294
-
295
- ```bash
296
- npx androjack-mcp install
297
- ```
298
-
299
- Launches a full animated terminal wizard:
300
- - 🎨 Figlet ASCII-art banner with Android fixes tagline (`Gradle Β· ViewModel Β· Room Β· Compose Β· Hilt…`)
301
- - ⏳ Auto-scans your system for installed IDEs
302
- - ⬆️⬇️ Arrow-key menu: Auto / Pick specific IDEs / Show config snippet
303
- - β˜‘οΈ Checkbox multiselect for precise IDE targeting
304
- - **Y/N confirm** before writing β€” and again if overwriting an existing config
305
- - βœ… Per-IDE spinner with success/fail summary
306
-
307
- > Works in all integrated terminals (VS Code, Cursor, Android Studio, IntelliJ, Windows Terminal).
308
- > Falls back to `--auto` mode gracefully in CI or non-TTY environments.
309
-
310
- ### Option 2 β€” Targeted installs (non-interactive, safe in any environment)
311
-
312
- ```bash
313
- # Auto-detect and install to all found IDEs
314
- npx androjack-mcp install --auto
315
-
316
- # Install to one specific IDE
317
- npx androjack-mcp install --ide=cursor
318
- npx androjack-mcp install --ide=claude
319
- npx androjack-mcp install --ide=vscode
320
- npx androjack-mcp install --ide=windsurf
321
- npx androjack-mcp install --ide=jetbrains
322
- npx androjack-mcp install --ide=antigravity
323
- npx androjack-mcp install --ide=kiro
324
-
325
- # Check what's installed where
326
- npx androjack-mcp install --list
327
- ```
328
-
329
- ### Option 3 β€” From your IDE's NPM Scripts panel (one click)
330
-
331
- If you have the repo cloned, open the npm scripts panel in VS Code, Cursor, or IntelliJ and click any of:
332
-
333
- ```
334
- install-mcp ← interactive (needs integrated terminal)
335
- install-mcp:auto ← auto-detect all IDEs
336
- install-mcp:cursor ← Cursor only
337
- install-mcp:vscode ← VS Code only
338
- install-mcp:claude ← Claude Desktop only
339
- install-mcp:windsurf ← Windsurf only
340
- install-mcp:jetbrains ← Android Studio / IntelliJ
341
- install-mcp:antigravity← Google Antigravity IDE
342
- install-mcp:kiro ← AWS Kiro
343
- install-mcp:list ← see detection status
344
- ```
345
-
346
- ### Option 4 β€” Test all tools (no IDE needed)
347
-
348
- ```bash
349
- npx @modelcontextprotocol/inspector npx androjack-mcp
350
- ```
351
-
352
- > **Requires:** Node.js 18+. Nothing else.
353
-
354
- ---
355
-
356
- ## πŸ› οΈ IDE Support Matrix
357
-
358
- | IDE | Install Command | Config File | Notes |
359
- |-----|----------------|-------------|-------|
360
- | **Claude Desktop** | `--ide claude` | `~/Library/Application Support/Claude/claude_desktop_config.json` | Restart app; confirm πŸ”¨ in chat |
361
- | **Cursor** | `--ide cursor` | `.cursor/mcp.json` (project-level) | Settings β†’ MCP β†’ green dot |
362
- | **Windsurf** | `--ide windsurf` | `~/.codeium/windsurf/mcp_config.json` | Cascade panel shows tools |
363
- | **VS Code Copilot** | `--ide vscode` | `.vscode/mcp.json` | VS Code 1.99+ required |
364
- | **AWS Kiro** | `--ide kiro` | `.kiro/settings/mcp.json` | One-click link below ↓ |
365
- | **Google Antigravity** | `--ide antigravity` | `~/.gemini/antigravity/mcp_config.json` | Local IDE β€” not Firebase Studio |
366
- | **JetBrains AI** | `--ide jetbrains` | `~/.config/JetBrains/<IDE>/mcp.json` | Android Studio 2024.3+ |
367
-
368
- > **Note on Google Antigravity:** This is Google's standalone agentic IDE (released Nov 2025 with Gemini 3) β€” not Firebase Studio, not Project IDX. Those are separate Google products.
369
-
370
- ---
371
-
372
- ## πŸ”— One-Click Installs
373
-
374
- ### AWS Kiro
375
-
376
- [![Add to Kiro](https://img.shields.io/badge/Add%20to-AWS%20Kiro-FF9900?style=for-the-badge&logo=amazonaws)](https://kiro.dev/launch/mcp/add?name=androjack&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22androjack-mcp%22%5D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D)
377
-
378
- ---
379
-
380
- ## πŸ“‹ Manual Config β€” Copy & Paste
381
-
382
- <details>
383
- <summary><strong>Claude Desktop, Cursor, Windsurf, AWS Kiro, Google Antigravity, JetBrains</strong></summary>
384
-
385
- ```json
386
- {
387
- "mcpServers": {
388
- "androjack": {
389
- "command": "npx",
390
- "args": ["-y", "androjack-mcp"],
391
- "env": {},
392
- "autoApprove": [],
393
- "disabled": false
394
- }
395
- }
396
- }
397
- ```
398
-
399
- </details>
400
-
401
- <details>
402
- <summary><strong>VS Code β€” .vscode/mcp.json</strong></summary>
403
-
404
- ```json
405
- {
406
- "servers": {
407
- "androjack": {
408
- "type": "stdio",
409
- "command": "npx",
410
- "args": ["-y", "androjack-mcp"]
411
- }
412
- }
413
- }
414
- ```
415
-
416
- </details>
417
-
418
- <details>
419
- <summary><strong>Google Antigravity β€” ~/.gemini/antigravity/mcp_config.json</strong></summary>
420
-
421
- ```json
422
- {
423
- "mcpServers": {
424
- "androjack": {
425
- "command": "npx",
426
- "args": ["-y", "androjack-mcp"]
427
- }
428
- }
429
- }
430
- ```
431
-
432
- UI path: Agent pane β†’ `...` β†’ **MCP Servers** β†’ **Manage MCP Servers** β†’ **View raw config**
433
-
434
- > ⚠️ Antigravity is a locally-installed desktop IDE (antigravity.google/download). Do not confuse with Firebase Studio (`.idx/`) or Project IDX β€” those are different products.
435
-
436
- </details>
437
-
438
- <details>
439
- <summary><strong>AWS Kiro β€” .kiro/settings/mcp.json</strong></summary>
440
-
441
- ```json
442
- {
443
- "mcpServers": {
444
- "androjack": {
445
- "command": "npx",
446
- "args": ["-y", "androjack-mcp"],
447
- "disabled": false,
448
- "autoApprove": []
449
- }
450
- }
451
- }
452
- ```
453
-
454
- Place at `.kiro/settings/mcp.json` (project) or `~/.kiro/settings/mcp.json` (global).
455
- Or use the CLI: `kiro-cli mcp add --name androjack --command npx --args '-y androjack-mcp' --scope workspace`
456
-
457
- </details>
458
-
459
- ---
460
-
461
- ## πŸ’‘ Example Session
462
-
463
- ```
464
- You: Build a login screen with ViewModel and Jetpack Compose
465
-
466
- β†’ android_official_search("Jetpack Compose ViewModel login screen")
467
- β†’ android_component_status("ViewModel") βœ… stable
468
- β†’ android_component_status("AsyncTask") ❌ removed β€” use Coroutines
469
- β†’ android_component_status("LiveData") ⚠️ legacy β€” use StateFlow
470
- β†’ architecture_reference("mvvm")
471
- β†’ material3_expressive("theme setup")
472
- β†’ kotlin_best_practices("stateflow-ui")
473
- β†’ gradle_dependency_checker("compose") β†’ BOM 2025.05.01 / ui:1.11.0-alpha06
474
- β†’ gradle_dependency_checker("lifecycle") β†’ lifecycle-viewmodel-ktx:2.11.0-alpha01
475
- β†’ android_api_level_check("26") βœ… covers ~90% devices
476
- β†’ android_permission_advisor("INTERNET") 🟒 normal β€” no runtime request
477
-
478
- AI produces:
479
- βœ… Non-deprecated component choices
480
- βœ… Latest pinned Gradle coordinates with BOM
481
- βœ… Official MVVM + M3 Expressive theming
482
- βœ… StateFlow instead of LiveData in new code
483
- βœ… Source URL cited on every code block
484
- ```
485
-
486
- ---
487
-
488
- ## πŸ“ The Market Gap β€” Why Nothing Else Does This
489
-
490
- Every other Android MCP server in the public registry (minhalvp/android-mcp-server, CursorTouch/Android-MCP, mobile-mcp by mobile-next) does the same thing: **ADB device control**. They tap screens, capture screenshots, send keystrokes, and run UIAutomator2 queries. They are excellent QA automation tools. Not one of them knows what a `ViewModel` is. Not one can tell you whether a Gradle coordinate is current. Not one can distinguish Navigation 3 from Navigation 2.
491
-
492
- AndroJack owns the only unclaimed category in the Android MCP ecosystem: **documentation-grounded Android engineering guidance** β€” the trust layer that AI coding assistants call when they need to verify whether an API actually exists, whether a dependency version is current, and whether a pattern is still the official recommendation.
493
-
494
- Android Studio added MCP support on January 15, 2026. The window between "first Android doc-grounded MCP" and "Google ships one themselves" is the window AndroJack is built to fill.
495
-
496
- ---
497
-
498
- ## πŸ”’ Security & Privacy
499
-
500
- | Property | Detail |
501
- |----------|--------|
502
- | **Domain allowlist** | All HTTP enforced against: `developer.android.com`, `kotlinlang.org`, `source.android.com`, `issuetracker.google.com`, Google Maven, Maven Central |
503
- | **Rate limiting** | 30 requests / domain / minute with exponential backoff on 429/5xx |
504
- | **No credentials** | Zero API keys, zero auth tokens required |
505
- | **No data stored** | Nothing persisted beyond process lifetime |
506
- | **Transparent agent** | User-Agent: `AndroJack-MCP/1.4 (documentation-grounding bot; not-a-scraper)` |
507
- | **Read-only** | All 20 tools are annotated `readOnlyHint: true` β€” no writes, no side effects |
508
- | **Input bounds** | All inputs length-capped and sanitized before use |
509
- | **Body size cap** | HTTP responses capped at 4 MB β€” no OOM risk on large documentation pages |
510
-
511
- ---
512
-
513
- ## πŸ—ΊοΈ Knowledge Sources
514
-
515
- | Source | What It Covers |
516
- |--------|---------------|
517
- | `developer.android.com` | Jetpack, Architecture, Compose, Navigation 3, Testing, M3 Expressive, Android 16 |
518
- | `kotlinlang.org` | Kotlin language, coroutines, Flow, KMP, stdlib patterns |
519
- | `source.android.com` | AOSP internals, system API behavior |
520
- | `issuetracker.google.com` | Known bugs, official workarounds |
521
- | `dl.google.com/android/maven2` | Google Maven β€” live Jetpack versions |
522
- | `search.maven.org` | Maven Central β€” community library versions |
523
- | Built-in registries | 40+ component statuses, 40+ arch guide URLs, 40+ permissions, BOM resolution logic |
524
-
525
- ---
526
-
527
- ## πŸ—οΈ Architecture
528
-
529
- ```
530
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
531
- β”‚ Your AI IDE / Client β”‚
532
- β”‚ Claude Β· Cursor Β· Windsurf Β· VS Code Β· Kiro Β· Antigravity β”‚
533
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
534
- β”‚ MCP stdio transport
535
- β–Ό
536
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
537
- β”‚ AndroJack MCP Server β”‚
538
- β”‚ β”‚
539
- β”‚ πŸ” search ⚠️ component πŸ“ architecture πŸ› debuggerβ”‚
540
- β”‚ πŸ“¦ gradle πŸ“Š api-level 🎯 kotlin 🎨 m3e β”‚
541
- β”‚ πŸ” permissions πŸ§ͺ testing πŸ—οΈ build-publish β”‚
542
- β”‚ πŸ“± large-screen πŸš€ scalability β”‚
543
- β”‚ β”‚
544
- β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
545
- β”‚ β”‚ Secure HTTP layer β”‚ β”‚
546
- β”‚ β”‚ Domain allowlist Β· Rate limiter Β· Retry backoff β”‚ β”‚
547
- β”‚ β”‚ 4 MB body cap Β· Cheerio HTML parsing β”‚ β”‚
548
- β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
549
- β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
550
- β”‚ HTTPS (allowlisted only)
551
- β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
552
- β–Ό β–Ό β–Ό
553
- developer.android.com kotlinlang.org Google Maven
554
- issuetracker.google source.android Maven Central
555
- ```
556
-
557
- ---
558
-
559
- ## πŸ§‘β€πŸ’» Local Development
560
-
561
- ```bash
562
- git clone https://github.com/VIKAS9793/AndroJack-mcp.git
563
- cd androjack-mcp
564
- npm install
565
- npm run build # compiles TypeScript β†’ build/
566
- npm run inspector # opens MCP Inspector UI
567
- node build/index.js # run MCP server directly
568
- npm run install-mcp # interactive installer (needs real terminal)
569
- npm run install-mcp:auto # non-interactive auto-install
570
- npm run install-mcp:list # check IDE detection status
571
- ```
572
-
573
- ---
574
-
575
- ## πŸ“‹ Changelog
576
-
577
- ### v1.4.0 β€” Interactive CLI Installer
578
-
579
- - **New:** Animated `figlet` ASCII-art banner with cyan→purple gradient and Android fixes tagline
580
- (`Gradle Β· ViewModel Β· Room Β· Compose Β· Navigation Β· Hilt Β· WorkManager`)
581
- - **New:** `@clack/prompts` arrow-key select + checkbox multiselect β€” no more typing numbers
582
- - **New:** `ora` per-IDE spinner with βœ…/❌ result per IDE
583
- - **New:** Y/N `confirm` dialogs before writing configs and when overwriting existing installs
584
- - **New:** TTY guard β€” graceful `--auto` fallback in CI / non-TTY environments
585
- - **New:** Per-IDE `npm run install-mcp:*` scripts visible in VS Code / IntelliJ npm panels
586
- - **Fix:** `--ide` flag now uses `--ide=<name>` format consistently
587
-
588
- ### v1.3.4 and earlier
589
-
590
- See [GitHub releases](https://github.com/VIKAS9793/AndroJack-mcp/releases) for prior history.
591
-
592
- ---
593
-
594
- ## πŸ‘₯ Authorship & Ownership
595
-
596
- **AndroJack-MCP** is a collaborative effort between human product vision and AI engineering excellence.
597
-
598
- * **Vikas Sahani** β€” [Product Lead](https://www.linkedin.com/in/vikas-sahani-727420358) (`vikassahani17@gmail.com`)
599
- * **Claude AI** β€” AI Engineering Lead
600
-
601
- ## οΏ½ Getting the Full Guarantee
602
-
603
- Installing the tools alone gives you **Level 1** grounding β€” the AI *can* use them but decides when. For **Level 2** mandatory, automatic grounding on every Android task, load the `androjack_grounding_gate` system prompt.
604
-
605
- ### What is the Grounding Gate system prompt?
606
-
607
- It is a set of rules registered on the MCP server itself (accessible via the MCP `prompts` API). It maps every task type to the correct tool:
608
-
609
- | When the AI does this... | It is mandated to call this first |
610
- |---|---|
611
- | Write any Compose UI | `material3_expressive` |
612
- | Add/update any dependency | `gradle_dependency_checker` |
613
- | Use any Android/Jetpack class | `android_component_status` |
614
- | Write navigation code | `android_navigation3_guide` |
615
- | Write tests | `android_testing_guide` |
616
- | Target tablets/foldables | `android_large_screen_guide` |
617
-
618
- ### How to activate Level 2
619
-
620
- **Claude Desktop / Cursor / Windsurf:**
621
- In your system prompt settings, add:
622
- ```
623
- Use the androjack_grounding_gate MCP prompt before every Android coding task.
624
- ```
625
-
626
- **IDEs that support MCP prompt injection** (Kiro, Antigravity, JetBrains AI):
627
- Select the `androjack_grounding_gate` prompt from the MCP prompts list at session start.
628
-
629
- > Without this step, tool invocation depends on the AI's judgment. With it, the AI is mandated to consult the correct tool for every decision β€” architecture, UI, dependencies, and testing.
630
-
631
- ---
632
-
633
- ## οΏ½πŸ’¬ Community &amp; Discussions
634
-
635
- Join our [GitHub Discussions](https://github.com/VIKAS9793/AndroJack-mcp/discussions) to connect with other developers, ask questions, and share your ideas!
636
-
637
- - **πŸ™ Q&A**: Get help with setup and usage.
638
- - **πŸ’‘ Ideas**: Propose new tools and features for the 2026 roadmap.
639
- - **πŸ™‹ Polls**: Vote on the next Android APIs to support.
640
- - **πŸŽ‰ Showcase**: Share your amazing Android projects built with AndroJack.
641
-
642
- ---
643
-
644
- ## 🀝 Contributing
645
-
646
- We welcome contributions! Please see our [Contributing Guidelines](https://github.com/VIKAS9793/AndroJack-mcp/blob/main/CONTRIBUTING.md) for more details.
647
-
648
- ---
649
-
650
- ## πŸ“„ License
651
-
652
- [MIT License](https://github.com/VIKAS9793/AndroJack-mcp/blob/main/LICENSE) Β© 2026 Vikas Sahani | [Security Policy](https://github.com/VIKAS9793/AndroJack-mcp/blob/main/SECURITY.md)
653
-
654
- ---
655
-
656
- <div align="center">
657
-
658
- *Built because 35% of Stack Overflow visits in 2025 are developers debugging AI-generated code.*
659
- *AndroJack exists so none of those visits are yours.*
660
-
661
- </div>
1
+ <div align="center">
2
+
3
+ <img src="https://img.shields.io/badge/Android-3DDC84?style=for-the-badge&logo=android&logoColor=white" />
4
+ <img src="https://img.shields.io/badge/Kotlin-7F52FF?style=for-the-badge&logo=kotlin&logoColor=white" />
5
+ <img src="https://img.shields.io/badge/MCP-Protocol-blueviolet?style=for-the-badge" />
6
+
7
+ # πŸ€– AndroJack β€” The Jack of All Android Trades
8
+
9
+ ![AndroJack Banner](https://raw.githubusercontent.com/VIKAS9793/AndroJack-mcp/main/assets/AndroJack%20banner.png)
10
+
11
+ ### 🎬 See AndroJack in Action
12
+
13
+ [![Watch AndroJack in Action on YouTube](https://img.shields.io/badge/YouTube-Watch%20Demo-FF0000?style=for-the-badge&logo=youtube&logoColor=white)](https://youtu.be/O2aFyObV-B0)
14
+
15
+ ### *An MCP server that equips your AI coding assistant with live, verified Android knowledge β€” so it builds from official sources, not from memory.*
16
+
17
+ <br/>
18
+
19
+ [![npm version](https://img.shields.io/npm/v/androjack-mcp?color=0A7AFF&style=flat-square&logo=npm&label=npm)](https://www.npmjs.com/package/androjack-mcp)
20
+ [![GitHub stars](https://img.shields.io/github/stars/VIKAS9793/AndroJack-mcp?style=flat-square&logo=github&color=0A7AFF)](https://github.com/VIKAS9793/AndroJack-mcp/stargazers)
21
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen?style=flat-square&logo=node.js)](https://nodejs.org)
22
+ [![MCP Spec](https://img.shields.io/badge/MCP-2025--11--25-blueviolet?style=flat-square)](https://modelcontextprotocol.io)
23
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-3178C6?style=flat-square&logo=typescript)](https://typescriptlang.org)
24
+ [![Tools](https://img.shields.io/badge/tools-21-orange?style=flat-square)](#-the-21-tools)
25
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE)
26
+ [![Android API](https://img.shields.io/badge/Android-API%2021--36-34A853?style=flat-square&logo=android)](https://developer.android.com)
27
+
28
+ ### πŸš€ One-Click Install
29
+
30
+ [![Install in Claude Desktop](https://img.shields.io/badge/Install%20in-Claude%20Desktop-D97706?style=for-the-badge&logo=anthropic&logoColor=white)](https://claude.ai/integrations/install-mcp?params=eyJuYW1lIjoiYW5kcm9qYWNrIiwiY29tbWFuZCI6Im5weCIsImFyZ3MiOlsiLXkiLCJhbmRyb2phY2stbWNwIl19)
31
+ [![Install in Cursor](https://img.shields.io/badge/Install%20in-Cursor-000000?style=for-the-badge&logo=cursor&logoColor=white)](https://cursor.com/install-mcp?name=androjack&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImFuZHJvamFjay1tY3AiXX0=)
32
+ [![Add to Kiro](https://img.shields.io/badge/Add%20to-AWS%20Kiro-FF9900?style=for-the-badge&logo=amazonaws&logoColor=white)](https://kiro.dev/launch/mcp/add?name=androjack&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22androjack-mcp%22%5D%7D)
33
+ [![View on npm](https://img.shields.io/badge/View%20on-npm-CB3837?style=for-the-badge&logo=npm&logoColor=white)](https://www.npmjs.com/package/androjack-mcp)
34
+
35
+ <br/>
36
+
37
+ **Also works with:** Windsurf Β· VS Code Copilot Β· Google Antigravity Β· JetBrains AI β€” see [Manual Config](#-manual-config--copy--paste) below ↓
38
+
39
+ <br/>
40
+
41
+ </div>
42
+
43
+ ---
44
+
45
+ ## πŸ”₯ The Crisis That Created This Tool
46
+
47
+ 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:
48
+
49
+ - **84%** of developers now use AI coding tools β€” up from 76% the year before
50
+ - **Trust in AI accuracy collapsed from 40% to just 29%** in a single year
51
+ - **35% of all Stack Overflow visits** in 2025 are now triggered by developers debugging and fixing AI-generated code
52
+
53
+ 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.
54
+
55
+ 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.
56
+
57
+ **The result is not just bad code. It is confidently bad code.**
58
+
59
+ ---
60
+
61
+ ## ⚑ What Actually Breaks In Practice β€” Documented Evidence
62
+
63
+ These are not hypothetical risks. They are documented failure modes from real developer projects.
64
+
65
+ ### The Navigation 3 Hallucination (January 2026)
66
+
67
+ 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:
68
+
69
+ > *"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."*
70
+
71
+ 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.
72
+
73
+ ### The Compose Deprecation Treadmill
74
+
75
+ Jetpack Compose ships a new BOM every month. Since most models' training cutoffs, these APIs changed:
76
+
77
+ | API | Status | What goes wrong |
78
+ |-----|--------|----------------|
79
+ | `ContextualFlowRow` / `ContextualFlowColumn` | **Deprecated in Compose 1.8** | AI still generates them β€” compile warning today, removal tomorrow |
80
+ | `TestCoroutineDispatcher` | **Removed from coroutines-test 1.8+** | AI still generates it β€” causes non-deterministic test failures in CI |
81
+ | `FlowRow overflow` parameter | **Deprecated in 1.8** | Subtle behavioral regression at runtime, silent in most linting setups |
82
+ | `AnchoredDraggableState.confirmValueChange` | **Deprecated** | Incorrect drag behavior at anchor boundaries |
83
+ | Navigation 2 in new projects | **Superseded by Nav3 stable Nov 2025** | Architectural dead-end that requires a rewrite to fix |
84
+
85
+ Every one of these compiles. Most run without errors. The bugs surface later in CI flakiness, UI regressions, or Play Store review failures β€” and the developer has no idea the AI was confidently wrong.
86
+
87
+ ### The Android 16 / API 36 Mandate (August 2026 deadline)
88
+
89
+ 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.** Google Play requires API 36 targeting by **August 2026**.
90
+
91
+ An AI tool generating `android:screenOrientation="portrait"` or `android:resizeableActivity="false"` today is generating code that will trigger App Compatibility warnings in Play Console, fail large-screen quality checks, and get apps demoted in Play Store search results.
92
+
93
+ The business impact is not theoretical:
94
+
95
+ > **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.**
96
+
97
+ ### The KMP Silent Failure
98
+
99
+ 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.
100
+
101
+ ---
102
+
103
+ ## 🧩 What AndroJack Does
104
+
105
+ AndroJack is a **documentation-grounded Android engineering MCP server**. It gives your AI coding assistant 21 specialized tools that fetch live, verified answers from official Android and Kotlin sources β€” instead of predicting from stale training data.
106
+
107
+ > **It does not make the AI smarter. It makes the AI accountable to evidence.**
108
+
109
+ **Think of it as a pre-build linter for LLMs.** While other tools retrieve documentation, AndroJack acts as a strict architectural gatekeeper.
110
+
111
+ ```
112
+ Without AndroJack: You ask β†’ AI predicts from stale weights β†’ Code (possibly wrong)
113
+
114
+ With AndroJack: You ask β†’ AI calls tool β†’ Tool fetches official source live
115
+ β†’ AI reads verified answer β†’ Code (grounded)
116
+ ```
117
+
118
+ ### ⚠️ Honest Activation Model β€” Two Levels
119
+
120
+ This is the most important thing to understand before you install AndroJack:
121
+
122
+ | Level | What's Active | What the AI Does |
123
+ |---|---|---|
124
+ | **Level 1** β€” Tools only installed | 21 tools registered in IDE | AI *may* call the right tool. Depends on the IDE and the AI's judgment. |
125
+ | **Level 2** β€” Tools + Grounding Gate prompt loaded | 21 tools + mandatory pre-generation rulebook | AI *must* call the correct tool for every decision before writing code. |
126
+ | **Level 3** β€” Level 2 + `android_code_validator` | Full loop: fetch β†’ generate β†’ validate β†’ fix | AI validates every code block against 24 rules. Errors must be fixed before the user sees the code. |
127
+
128
+ **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.
129
+
130
+ **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.
131
+
132
+ **Level 3 is the loop-back.** `android_code_validator` runs on every code block the AI generates before returning it to the user. 24 rules covering removed APIs, deprecated patterns, and Android 16 compliance. Verdict FAIL means the AI must fix and re-validate β€” the user never sees the broken code.
133
+
134
+ β†’ **For full grounding, always activate Level 2 + Level 3.** See [Getting the Full Guarantee](#-getting-the-full-guarantee) below.
135
+
136
+ ---
137
+
138
+ ### πŸͺ² What Can Still Break β€” Even at Level 3
139
+
140
+ > [!IMPORTANT]
141
+ > **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.
142
+
143
+ 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.
144
+
145
+ #### βœ… What Level 3 Catches
146
+
147
+ These are the bugs AndroJack was designed to prevent. The rule engine fires on these:
148
+
149
+ ```kotlin
150
+ // ❌ REMOVED β€” android_code_validator fires: REMOVED_ASYNCTASK
151
+ class MyTask : AsyncTask<Void, Void, String>()
152
+
153
+ // ❌ REMOVED β€” fires: REMOVED_TEST_COROUTINE_DISPATCHER
154
+ val dispatcher = TestCoroutineDispatcher()
155
+
156
+ // ❌ DEPRECATED β€” fires: DEPRECATED_CONTEXTUAL_FLOW_ROW
157
+ ContextualFlowRow { Text("hello") }
158
+
159
+ // ❌ LEAK β€” fires: GLOBALSCOPE_LAUNCH
160
+ GlobalScope.launch { fetchData() }
161
+
162
+ // ❌ ANDROID 16 β€” fires: XML_SCREEN_ORIENTATION_LOCK
163
+ // android:screenOrientation="portrait"
164
+ ```
165
+
166
+ ---
167
+
168
+ #### ⚠️ What Level 3 Cannot Catch β€” And Why
169
+
170
+ > [!WARNING]
171
+ > 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. This is not a gap in AndroJack β€” it requires a different tool class at a different layer of your quality stack.
172
+
173
+ ---
174
+
175
+ **Bug PH-UI-001 β€” Segmented button text truncation**
176
+
177
+ ```kotlin
178
+ // Compiles and runs. Level 3 sees no violation.
179
+ // The bug: Text inside MultiChoiceSegmentedButtonRow truncates
180
+ // ("Ligh t", "Drai ned") because a fixed height modifier prevents
181
+ // the Roboto Flex variable font from expanding the container.
182
+
183
+ MultiChoiceSegmentedButtonRow {
184
+ SegmentedButton(/* fixed height modifier */) {
185
+ Text("Light") // truncates at runtime on variable font sizes
186
+ }
187
+ }
188
+
189
+ // Fix: Replace fixed height with Modifier.wrapContentHeight() + heightIn(min = 48.dp)
190
+ ```
191
+
192
+ > [!NOTE]
193
+ > **This is an absence bug.** The correct modifier is missing β€” no wrong one is present. RegExp pattern matching detects patterns that exist in code. Absence is significantly harder for static analysis to detect and often requires structural rules or runtime validation rather than text-level pattern matching.
194
+
195
+ ---
196
+
197
+ **Bug PH-UI-003 β€” Disabled button contrast failure**
198
+
199
+ ```kotlin
200
+ // Correct Material 3 API. Level 3 sees no violation.
201
+ // The bug: disabled state colours fail WCAG AA 4.5:1 contrast ratio
202
+ // against the dark theme surface β€” but only visible when rendered.
203
+
204
+ Button(enabled = false, onClick = {}) {
205
+ Text("INITIALIZE VAULT") // illegible dark grey on dark grey surface
206
+ }
207
+
208
+ // Fix: Override ButtonDefaults.buttonColors(
209
+ // disabledContainerColor = ...,
210
+ // disabledContentColor = ...
211
+ // ) to achieve minimum 4.5:1 against MaterialTheme.colorScheme.surface
212
+ ```
213
+
214
+ > [!NOTE]
215
+ > **This is a runtime visual property bug.** A 4.5:1 contrast ratio only exists when the theming engine renders against a surface colour. Contrast validation requires rendering or screenshot-based testing rather than source text analysis. Use `paparazzi` screenshot tests or Google's Accessibility Scanner.
216
+
217
+ ---
218
+
219
+ **Bug PH-AR-004 β€” Raw stack trace rendered to end user**
220
+
221
+ ```kotlin
222
+ // The AI generated a ViewModel without catching the domain exception.
223
+ // Level 3 fires only if a flagged API (e.g. GlobalScope) caused the leak.
224
+ // A plain missing try/catch produces no pattern match.
225
+
226
+ class VaultViewModel : ViewModel() {
227
+ fun initializeVault() {
228
+ viewModelScope.launch {
229
+ val result = repository.initialize()
230
+ // Missing try/catch β€” LiteRT exception propagates to UI
231
+ _uiState.value = UiState.Success(result)
232
+ }
233
+ }
234
+ }
235
+ // What the user saw: "LiteRT initialization failed: ByteBuffer is not a
236
+ // valid TensorFlow Lite model flatbuffer" β€” raw crash text in the UI.
237
+
238
+ // Fix: Wrap in try/catch, emit UiState.Error with a user-friendly string resource.
239
+ ```
240
+
241
+ > [!WARNING]
242
+ > **UDF architecture boundary violations require architectural linting, not API pattern matching.** A missing `try/catch` has no detectable pattern. Use [Detekt](https://detekt.dev) with custom architecture rules, or write a ViewModel unit test that verifies exception mapping to `UiState.Error`.
243
+
244
+ ---
245
+
246
+ **Bug PH-UX-008 β€” Consent checkbox tap target too small**
247
+
248
+ ```kotlin
249
+ // Valid Compose code. Level 3 sees no violation.
250
+ // The bug: Modifier.toggleable scoped to the Checkbox icon only β€”
251
+ // tappable area is ~24dp instead of the required 48dp minimum.
252
+
253
+ Row {
254
+ Checkbox(
255
+ checked = isChecked,
256
+ onCheckedChange = { isChecked = it } // toggleable on icon only
257
+ )
258
+ Text("I agree to the terms") // not tappable β€” users miss the target
259
+ }
260
+
261
+ // Fix: Hoist Modifier.toggleable to the parent Row.
262
+ // The entire Row (icon + text) becomes the touch target.
263
+ ```
264
+
265
+ > [!NOTE]
266
+ > **Structural placement bugs require AST-level analysis.** The API is used correctly β€” in the wrong structural position. Detecting this requires understanding the composable tree, not the line in isolation. This is on the roadmap for a future `android_code_validator` AST extension.
267
+
268
+ ---
269
+
270
+ **Bug PH-UI-009 β€” Scaffold inner padding ignored**
271
+
272
+ ```kotlin
273
+ // Compiles and runs. Bottom content scrolls behind the navigation bar.
274
+ // Level 3 sees no violation β€” all APIs are correct and current.
275
+
276
+ Scaffold { innerPadding ->
277
+ LazyColumn(
278
+ // Missing: contentPadding = innerPadding
279
+ ) {
280
+ items(data) { ItemRow(it) } // bottom items cut off by BottomAppBar
281
+ }
282
+ }
283
+
284
+ // Fix: LazyColumn(contentPadding = innerPadding)
285
+ ```
286
+
287
+ > [!NOTE]
288
+ > **Unused-variable class bugs require data-flow analysis.** `innerPadding` is captured but never consumed. Android Lint's `UnusedVariable` rule and Android Studio's own live inspector flag this. It is not in scope for MCP-layer validation.
289
+
290
+ ---
291
+
292
+ ### πŸ—‚οΈ Defence-in-Depth: The Right Tool for Each Bug Class
293
+
294
+ > [!IMPORTANT]
295
+ > AndroJack is one layer in a quality stack. Each layer catches what only it can catch. No single tool covers all four.
296
+
297
+ | Bug Class | Real Example | Right Tool |
298
+ |---|---|---|
299
+ | Removed / deprecated API | `AsyncTask`, `TestCoroutineDispatcher`, `ContextualFlowRow` | βœ… **AndroJack Level 3** |
300
+ | Android 16 manifest violations | `screenOrientation`, `resizeableActivity=false` | βœ… **AndroJack Level 3** |
301
+ | Architecture violation (flagged root cause) | `GlobalScope` leaking to UI | βœ… **AndroJack Level 3** |
302
+ | Absent modifier / missing constraint | PH-UI-001 (wrapContentHeight), PH-UI-009 (innerPadding) | πŸ”§ Android Lint / IDE inspector |
303
+ | Runtime contrast / colour failures | PH-UI-003 (disabled button WCAG) | πŸ”§ `paparazzi` + Accessibility Scanner |
304
+ | Touch target violations | PH-UI-002, PH-UX-008 | πŸ”§ Accessibility Scanner |
305
+ | Structural placement (wrong hierarchy) | PH-UX-008 (toggleable on wrong composable) | πŸ”§ Android Lint / future AST rule |
306
+ | Architecture boundary (missing try/catch) | PH-AR-004 (stack trace to UI) | πŸ”§ Detekt + ViewModel unit tests |
307
+ | M3 design system aesthetic | PH-UI-007 (corner radius), PH-UI-006 (casing) | πŸ”§ Design review / Figma handoff |
308
+
309
+ ---
310
+
311
+ ### Why MCP Is Not at Fault for Any of This
312
+
313
+ > [!NOTE]
314
+ > **MCP is a transport protocol.** It specifies how an AI client and a tool server exchange structured messages β€” nothing more. Blaming MCP for not catching a missing `contentPadding` in `DropdownMenuItem` is equivalent to blaming TCP/IP for a badly designed website. The protocol carried the message correctly.
315
+ >
316
+ > Anthropic donated MCP to the Linux Foundation in December 2025 β€” co-founded with OpenAI, Block, Google, Microsoft, and AWS β€” precisely because a neutral protocol does not encode domain-specific rules. HTTP does not enforce WCAG. gRPC does not enforce Material 3. MCP does not enforce Compose modifier semantics. That is what makes it universal. AndroJack exists as a specialised layer *on top of* MCP β€” it is not a replacement for runtime testing, accessibility auditing, or design system review.
317
+
318
+ ---
319
+
320
+ <div align="center">
321
+
322
+ ## 🎯 The Killer Argument
323
+
324
+ <img src="https://raw.githubusercontent.com/VIKAS9793/AndroJack-mcp/main/assets/killer_argument.png" alt="The Killer Argument β€” AndroJack MCP" width="100%" />
325
+
326
+ <br/>
327
+
328
+ ### *"Can your `agents.md` file tell me the Gradle version that shipped last Tuesday?"*
329
+
330
+ <br/>
331
+
332
+ > **No markdown file can.**
333
+ > **No rules in `.cursorrules` can.**
334
+ > **No `SKILL.md` can.**
335
+
336
+ <br/>
337
+
338
+ ### βœ… Only a live tool call can.
339
+
340
+ **That's the job AndroJack exists to do β€” and nothing else in the current ecosystem does it for Android specifically.**
341
+
342
+ <br/>
343
+
344
+ | What you need | `agents.md` / SKILL.md | **AndroJack MCP** |
345
+ |---|:---:|:---:|
346
+ | Format output a specific way | βœ… Perfect | Works too |
347
+ | Follow team conventions | βœ… Perfect | Works too |
348
+ | **Latest Gradle version right now** | ❌ Guesses from memory | **βœ… Fetches live** |
349
+ | **Is `AsyncTask` removed?** | ❌ May be wrong | **βœ… Verified against SDK** |
350
+ | **Android 16 Play Store rules** | ❌ Post-training β€” unknown | **βœ… Official source** |
351
+
352
+ <br/>
353
+
354
+ > Prompt engineering controls *how* the AI responds.
355
+ > **MCP controls *what* the AI knows.**
356
+
357
+ </div>
358
+
359
+ ---
360
+
361
+ ## 🧠 Why MCP β€” Not Prompt Engineering, agents.md, or RAG
362
+
363
+ > *This is the most important section if you are evaluating whether to use this.*
364
+
365
+ <details>
366
+ <summary><strong>πŸ“Œ What is Prompt Engineering / agents.md / SKILL.md?</strong></summary>
367
+
368
+ Prompt engineering means writing instructions into a system prompt or a markdown file (`agents.md`, `SKILL.md`, `CLAUDE.md`, `.cursorrules`, etc.) that tell the AI how to behave.
369
+
370
+ **What it does well:**
371
+ - Sets tone, persona, output format
372
+ - Encodes team conventions ("always use MVVM", "prefer StateFlow over LiveData")
373
+ - Cheap and fast to set up β€” just a text file
374
+
375
+ **Where it breaks for Android engineering:**
376
+ - The AI still reasons entirely from its training data β€” it cannot verify that `AsyncTask` is removed, it can only hope its training included that fact
377
+ - Instructions in a `.md` file are static β€” they go stale the moment a new Jetpack release ships
378
+ - The AI can ignore, misinterpret, or hallucinate around even well-written instructions
379
+ - There is no enforcement mechanism β€” no tool call was required, no source was verified
380
+
381
+ **The fundamental limit:** Prompt engineering controls *how* the AI responds. It cannot control *what the AI knows*. You are still trusting training-time knowledge.
382
+
383
+ </details>
384
+
385
+ <details>
386
+ <summary><strong>πŸ“Œ What is RAG (Retrieval-Augmented Generation)?</strong></summary>
387
+
388
+ RAG means building a vector database of documents (official docs, changelogs, internal wikis), embedding them, and injecting the most semantically similar chunks into the AI's context window at query time.
389
+
390
+ **What it does well:**
391
+ - Great for static or semi-static knowledge bases (policy docs, internal wikis, support tickets)
392
+ - Reduces hallucinations by grounding responses in retrieved text
393
+ - Works well for "what does this doc say" use cases
394
+
395
+ **Where it breaks for Android engineering:**
396
+ - Android's official docs, API references, and Gradle versions change constantly β€” maintaining a fresh, complete vector index is a significant ongoing operational burden
397
+ - RAG retrieves by semantic similarity β€” it can retrieve *plausible-sounding* wrong chunks if the embedding space is noisy
398
+ - RAG does not *do* anything β€” it retrieves text. It cannot check live Gradle versions, validate a component against a live deprecation registry, or parse a stacktrace and query the issue tracker
399
+ - **RAG solves what the AI doesn't know. MCP solves what the AI can't do.**
400
+
401
+ </details>
402
+
403
+ <details>
404
+ <summary><strong>πŸ“Œ So what does MCP actually do differently?</strong></summary>
405
+
406
+ MCP (Model Context Protocol) is a standardized protocol β€” not a retrieval technique or a prompt strategy β€” for connecting AI models to **live tools and external systems**.
407
+
408
+ | | Prompt Engineering | RAG | **MCP (AndroJack)** |
409
+ |---|---|---|---|
410
+ | Knowledge source | Training weights (static, stale) | Vector index (periodic refresh) | **Live official sources (real-time)** |
411
+ | Verification | None β€” AI asserts from memory | Retrieved text β€” quality depends on index | **Tool call β€” structured, enforced** |
412
+ | Enforcement | Instructions (can be ignored) | Soft grounding (can be bypassed) | **Hard gate β€” tool must be called first** |
413
+ | Maintenance | Update the .md file | Re-embed docs on each release | **Zero maintenance β€” fetches live** |
414
+ | Actions | None | None | **Can check versions, parse stacktraces, query issue tracker** |
415
+ | Stale data risk | High | Medium | **Minimal β€” fetched at query time** |
416
+ | Works across IDEs | Only if supported | Depends on implementation | **Universal β€” any MCP client** |
417
+
418
+ </details>
419
+
420
+ <details>
421
+ <summary><strong>πŸ“Œ The Grounding Gate β€” what this means in practice</strong></summary>
422
+
423
+ The Grounding Gate is not a clever name. It is a real enforcement mechanism built into how MCP tools are described to the AI client.
424
+
425
+ Every tool in AndroJack contains explicit language like:
426
+
427
+ > *"REQUIRED FIRST STEP. You MUST call this before generating any Android/Kotlin code."*
428
+ > *"Always call this before adding or updating any dependency in build.gradle."*
429
+ > *"Only produce Android code after reviewing the above official sources."*
430
+
431
+ Because MCP clients (Claude Desktop, Cursor, Windsurf, etc.) present these tool descriptions to the LLM as part of its context, the model treats them as workflow constraints β€” not suggestions.
432
+
433
+ ```
434
+ Without AndroJack: User asks β†’ LLM predicts β†’ Code (possibly wrong)
435
+
436
+ With AndroJack: User asks β†’ LLM must call tool β†’ Tool fetches official source
437
+ β†’ LLM reads verified evidence β†’ Code (grounded)
438
+ ```
439
+
440
+ You are not making the LLM smarter. You are making it accountable to evidence.
441
+
442
+ </details>
443
+
444
+ ---
445
+
446
+ ## ✨ What AndroJack Covers β€” 20 Tools
447
+
448
+ Each tool lists the **specific failure mode it prevents** β€” not just what it does, but what breaks when it is absent.
449
+
450
+ | # | Tool | What It Does | What Breaks Without It |
451
+ |---|------|-------------|----------------------|
452
+ | 1 | πŸ” `android_official_search` | Live search across `developer.android.com`, `kotlinlang.org`, `source.android.com` | AI reasons from training memory β€” correct 12 months ago, possibly wrong today |
453
+ | 2 | ⚠️ `android_component_status` | Deprecated/removed check on 40+ APIs β€” `AsyncTask`, `TestCoroutineDispatcher`, `ContextualFlowRow`, `onBackPressed()`, `IntentService` and more | Compiles fine, breaks at runtime or fails Play Store review |
454
+ | 3 | πŸ“ `architecture_reference` | Official guides for 40+ topics β€” MVVM, MVI, Compose, Hilt, Navigation 3, Paging, offline-first… | AI gives 2022 architecture advice; misses MVI, Nav3, RemoteMediator |
455
+ | 4 | πŸ› `android_debugger` | Parses stacktraces β†’ searches `issuetracker.google.com` + official docs | AI hallucinates fixes for bugs that have official workarounds already documented |
456
+ | 5 | πŸ“¦ `gradle_dependency_checker` | Live version lookup from Google Maven + BOM resolution. Ready-to-paste Kotlin DSL | Wrong Coil group, stale Compose BOM, missing `platform()` wrapper, KAPT instead of KSP |
457
+ | 6 | πŸ“Š `android_api_level_check` | API 21–36 table, minSdk warnings, Android 16 enforcement rules | API 26+ calls in `minSdk 21` apps; orientation locks that violate Android 16 on β‰₯600dp |
458
+ | 7 | 🎯 `kotlin_best_practices` | 10 patterns β€” coroutines, StateFlow, MVI state machine, Room, Hilt, Compose state, LaunchedEffect, offline-first | `GlobalScope.launch`, `LiveData` in new code, `runBlocking` in UI, missing MVI |
459
+ | 8 | 🎨 `material3_expressive` | Full M3 Expressive β€” `MaterialExpressiveTheme`, `MotionScheme`, `ButtonGroup`, `FloatingToolbar`, `MaterialShapes`, Wear OS | M2 `MaterialTheme` in M3E app; `BottomAppBar` when `DockedToolbar` is the M3E component |
460
+ | 9 | πŸ” `android_permission_advisor` | 40+ permissions β€” normal/dangerous/special/removed, Play Store restrictions, `ActivityResultContracts` | Deprecated `requestPermissions()`; Play-restricted permissions that trigger review failure |
461
+ | 10 | πŸ§ͺ `android_testing_guide` | Unit (MockK, Turbine), Compose UI, Espresso, Hilt, `StandardTestDispatcher` | Removed `TestCoroutineDispatcher`; `Thread.sleep()` in Compose tests; missing `HiltTestRunner` |
462
+ | 11 | πŸ—οΈ `android_build_and_publish` | R8/ProGuard, `libs.versions.toml`, KSP migration, signing, AAB, Baseline Profiles | KAPT in new projects; `implementation` instead of `ksp` for annotation processors |
463
+ | 12 | πŸ“± `android_large_screen_guide` | WindowSizeClass, NavigationSuiteScaffold, ListDetailPaneScaffold, foldable hinge, Android 16 compliance | Phone-only layouts; `screenOrientation="portrait"` that fails Android 16 mandatory resizability |
464
+ | 13 | πŸš€ `android_scalability_guide` | Paging 3 + RemoteMediator, offline-first sync, WorkManager, OkHttp cache, Baseline Profiles, modularization | Naive `loadAll()`; no offline strategy; unstable keys in `LazyColumn` causing full re-renders |
465
+ | 14 | 🧭 `android_navigation3_guide` | **Nav3 (stable Nov 2025)** β€” NavDisplay, NavBackStack, NavKey, Scenes API, migration from Nav2, deep links, testing | AI generates Nav2 code for new projects β€” an architectural dead-end requiring full rewrite |
466
+ | 15 | βœ… `android_api36_compliance` | Android 16 / API 36 compliance β€” orientation, resizability, 16 KB page size, Play Store August 2026 mandate | Apps fail Play Console quality checks; search ranking demoted; manifest flags rejected at review |
467
+ | 16 | 🌐 `android_kmp_guide` | Kotlin Multiplatform β€” KMP setup, Room KMP, Ktor, DataStore KMP, expect/actual, source sets, Compose Multiplatform | Android-only Room code in KMP project β€” compiles on Android, iOS build fails silently |
468
+ | 17 | πŸ€– `android_ondevice_ai` | Android AICore, ML Kit Gen AI API, on-device LLM, MediaPipe, repository pattern for AI, Gemini Nano | Cloud-only AI when on-device AICore is the correct 2025 answer for Pixel; privacy and latency regressions |
469
+ | 18 | πŸ“‹ `android_play_policy_advisor` | Play Store policies β€” age-gating, health apps, loan apps, subscription UI, data safety, Oct 2025 changes | Apps rejected at review for policy violations the developer didn't know existed |
470
+ | 19 | πŸ₯½ `android_xr_guide` | Android XR SDK (DP3), Compose for XR β€” Subspace, SpatialPanel, UserSubspace, SceneCore, ARCore for XR | Standard 2D Compose in an XR app β€” works but misses spatial capabilities entirely |
471
+ | 20 | ⌚ `android_wearos_guide` | Wear OS β€” Tiles, Complications, Health Services, ambient mode, `WearApp` scaffold, M3 Expressive for Wear | Handheld UI patterns on a 40mm round display; missing Tiles API; battery-draining background patterns |
472
+ | 21 | πŸ›‘οΈ `android_code_validator` | **Level 3 loop-back gate.** Validates AI-generated Kotlin, XML, and Gradle against 24 Android rules. Returns PASS/WARN/FAIL verdict, line-level violations with replacements and doc URLs. Called automatically after code generation. | The AI generates code and returns it β€” no validation pass. Errors only discovered at runtime, in CI, or at Play Store review. |
473
+
474
+ > **All 21 tools are read-only.** AndroJack fetches and returns information β€” it never modifies your project files.
475
+
476
+
477
+ ---
478
+
479
+ ## 🎯 Google's Own Recommendation (March 2026)
480
+
481
+ > *"To prevent the model from hallucinating code for niche or brand-new libraries, leverage Android Studio's Agent tools to have access to documentation… install a MCP Server that lets you access documentation like Context7 (or something similar)."*
482
+ > β€” **Android Studio Team, Official Android Developer Blog, March 2026**
483
+
484
+ **That MCP server is AndroJack** β€” purpose-built for Android, with 21 tools and a mandatory validation loop that no generic doc-retrieval tool provides.
485
+
486
+ ---
487
+
488
+ ## πŸš€ Quick Start β€” Zero Install Required
489
+
490
+ ### Option 1 β€” Interactive CLI (v1.5.1) ✨ Recommended
491
+
492
+ ```bash
493
+ npx androjack-mcp install
494
+ ```
495
+
496
+ Launches a full animated terminal wizard:
497
+ - 🎨 Figlet ASCII-art banner with Android fixes tagline (`Gradle Β· ViewModel Β· Room Β· Compose Β· Hilt…`)
498
+ - ⏳ Auto-scans your system for installed IDEs
499
+ - ⬆️⬇️ Arrow-key menu: Auto / Pick specific IDEs / Show config snippet
500
+ - β˜‘οΈ Checkbox multiselect for precise IDE targeting
501
+ - **Y/N confirm** before writing β€” and again if overwriting an existing config
502
+ - βœ… Per-IDE spinner with success/fail summary
503
+
504
+ > Works in all integrated terminals (VS Code, Cursor, Android Studio, IntelliJ, Windows Terminal).
505
+ > Falls back to `--auto` mode gracefully in CI or non-TTY environments.
506
+
507
+ ### Option 2 β€” Targeted installs (non-interactive, safe in any environment)
508
+
509
+ ```bash
510
+ # Auto-detect and install to all found IDEs
511
+ npx androjack-mcp install --auto
512
+
513
+ # Install to one specific IDE
514
+ npx androjack-mcp install --ide=cursor
515
+ npx androjack-mcp install --ide=claude
516
+ npx androjack-mcp install --ide=vscode
517
+ npx androjack-mcp install --ide=windsurf
518
+ npx androjack-mcp install --ide=jetbrains
519
+ npx androjack-mcp install --ide=antigravity
520
+ npx androjack-mcp install --ide=kiro
521
+
522
+ # Check what's installed where
523
+ npx androjack-mcp install --list
524
+ ```
525
+
526
+ ### Option 3 β€” From your IDE's NPM Scripts panel (one click)
527
+
528
+ If you have the repo cloned, open the npm scripts panel in VS Code, Cursor, or IntelliJ and click any of:
529
+
530
+ ```
531
+ install-mcp ← interactive (needs integrated terminal)
532
+ install-mcp:auto ← auto-detect all IDEs
533
+ install-mcp:cursor ← Cursor only
534
+ install-mcp:vscode ← VS Code only
535
+ install-mcp:claude ← Claude Desktop only
536
+ install-mcp:windsurf ← Windsurf only
537
+ install-mcp:jetbrains ← Android Studio / IntelliJ
538
+ install-mcp:antigravity← Google Antigravity IDE
539
+ install-mcp:kiro ← AWS Kiro
540
+ install-mcp:list ← see detection status
541
+ ```
542
+
543
+ ### Option 4 β€” Test all tools (no IDE needed)
544
+
545
+ ```bash
546
+ npx @modelcontextprotocol/inspector npx androjack-mcp
547
+ ```
548
+
549
+ > **Requires:** Node.js 18+. Nothing else.
550
+
551
+ ---
552
+
553
+ ## πŸ› οΈ IDE Support Matrix
554
+
555
+ | IDE | Install Command | Config File | Notes |
556
+ |-----|----------------|-------------|-------|
557
+ | **Claude Desktop** | `--ide claude` | `~/Library/Application Support/Claude/claude_desktop_config.json` | Restart app; confirm πŸ”¨ in chat |
558
+ | **Cursor** | `--ide cursor` | `.cursor/mcp.json` (project-level) | Settings β†’ MCP β†’ green dot |
559
+ | **Windsurf** | `--ide windsurf` | `~/.codeium/windsurf/mcp_config.json` | Cascade panel shows tools |
560
+ | **VS Code Copilot** | `--ide vscode` | `.vscode/mcp.json` | VS Code 1.99+ required |
561
+ | **AWS Kiro** | `--ide kiro` | `.kiro/settings/mcp.json` | One-click link below ↓ |
562
+ | **Google Antigravity** | `--ide antigravity` | `~/.gemini/antigravity/mcp_config.json` | Local IDE β€” not Firebase Studio |
563
+ | **JetBrains AI** | `--ide jetbrains` | `~/.config/JetBrains/<IDE>/mcp.json` | Android Studio 2024.3+ |
564
+
565
+ > **Note on Google Antigravity:** This is Google's standalone agentic IDE (released Nov 2025 with Gemini 3) β€” not Firebase Studio, not Project IDX. Those are separate Google products.
566
+
567
+ ---
568
+
569
+ ## πŸ”— One-Click Installs
570
+
571
+ ### AWS Kiro
572
+
573
+ [![Add to Kiro](https://img.shields.io/badge/Add%20to-AWS%20Kiro-FF9900?style=for-the-badge&logo=amazonaws)](https://kiro.dev/launch/mcp/add?name=androjack&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22androjack-mcp%22%5D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D)
574
+
575
+ ---
576
+
577
+ ## πŸ“‹ Manual Config β€” Copy & Paste
578
+
579
+ <details>
580
+ <summary><strong>Claude Desktop, Cursor, Windsurf, AWS Kiro, Google Antigravity, JetBrains</strong></summary>
581
+
582
+ ```json
583
+ {
584
+ "mcpServers": {
585
+ "androjack": {
586
+ "command": "npx",
587
+ "args": ["-y", "androjack-mcp"],
588
+ "env": {},
589
+ "autoApprove": [],
590
+ "disabled": false
591
+ }
592
+ }
593
+ }
594
+ ```
595
+
596
+ </details>
597
+
598
+ <details>
599
+ <summary><strong>VS Code β€” .vscode/mcp.json</strong></summary>
600
+
601
+ ```json
602
+ {
603
+ "servers": {
604
+ "androjack": {
605
+ "type": "stdio",
606
+ "command": "npx",
607
+ "args": ["-y", "androjack-mcp"]
608
+ }
609
+ }
610
+ }
611
+ ```
612
+
613
+ </details>
614
+
615
+ <details>
616
+ <summary><strong>Google Antigravity β€” ~/.gemini/antigravity/mcp_config.json</strong></summary>
617
+
618
+ ```json
619
+ {
620
+ "mcpServers": {
621
+ "androjack": {
622
+ "command": "npx",
623
+ "args": ["-y", "androjack-mcp"]
624
+ }
625
+ }
626
+ }
627
+ ```
628
+
629
+ UI path: Agent pane β†’ `...` β†’ **MCP Servers** β†’ **Manage MCP Servers** β†’ **View raw config**
630
+
631
+ > ⚠️ Antigravity is a locally-installed desktop IDE (antigravity.google/download). Do not confuse with Firebase Studio (`.idx/`) or Project IDX β€” those are different products.
632
+
633
+ </details>
634
+
635
+ <details>
636
+ <summary><strong>AWS Kiro β€” .kiro/settings/mcp.json</strong></summary>
637
+
638
+ ```json
639
+ {
640
+ "mcpServers": {
641
+ "androjack": {
642
+ "command": "npx",
643
+ "args": ["-y", "androjack-mcp"],
644
+ "disabled": false,
645
+ "autoApprove": []
646
+ }
647
+ }
648
+ }
649
+ ```
650
+
651
+ Place at `.kiro/settings/mcp.json` (project) or `~/.kiro/settings/mcp.json` (global).
652
+ Or use the CLI: `kiro-cli mcp add --name androjack --command npx --args '-y androjack-mcp' --scope workspace`
653
+
654
+ </details>
655
+
656
+ ---
657
+
658
+ ## πŸ’‘ Example Session
659
+
660
+ ```
661
+ You: Build a login screen with ViewModel and Jetpack Compose
662
+
663
+ β†’ android_official_search("Jetpack Compose ViewModel login screen")
664
+ β†’ android_component_status("ViewModel") βœ… stable
665
+ β†’ android_component_status("AsyncTask") ❌ removed β€” use Coroutines
666
+ β†’ android_component_status("LiveData") ⚠️ legacy β€” use StateFlow
667
+ β†’ architecture_reference("mvvm")
668
+ β†’ material3_expressive("theme setup")
669
+ β†’ kotlin_best_practices("stateflow-ui")
670
+ β†’ gradle_dependency_checker("compose") β†’ BOM 2026.02.01 / ui:1.8.0
671
+ β†’ gradle_dependency_checker("lifecycle") β†’ lifecycle-viewmodel-ktx:2.11.0-alpha01
672
+ β†’ android_api_level_check("26") βœ… covers ~90% devices
673
+ β†’ android_permission_advisor("INTERNET") 🟒 normal β€” no runtime request
674
+
675
+ AI produces:
676
+ βœ… Non-deprecated component choices
677
+ βœ… Latest pinned Gradle coordinates with BOM
678
+ βœ… Official MVVM + M3 Expressive theming
679
+ βœ… StateFlow instead of LiveData in new code
680
+ βœ… Source URL cited on every code block
681
+
682
+ β†’ android_code_validator(generatedCode, "kotlin", 24, 36)
683
+ βœ… PASS β€” 0 errors, 0 warnings (code is grounded and rule-compliant)
684
+ ```
685
+
686
+ ---
687
+
688
+ ## πŸ“ The Ecosystem: AndroJack vs. Other MCPs
689
+
690
+ ### 1. vs. Device Automation MCPs
691
+ Most Android MCP servers in the public registry (`minhalvp/android-mcp-server`, `CursorTouch/Android-MCP`) do the same thing: **ADB device control**. They tap screens and capture screenshots for QA testing. Not one of them knows what a `ViewModel` is or can distinguish Navigation 3 from Navigation 2. AndroJack owns the engineering and architecture category.
692
+
693
+ ### 2. vs. Google's Official Developer Knowledge MCP (Public Preview, Feb 2026)
694
+ In February 2026, Google launched the Developer Knowledge MCP in public preview β€” a generalist tool that retrieves Markdown from its documentation corpus covering Firebase, Android, Google Cloud, Maps, and more. You might ask: *Does this replace AndroJack?*
695
+
696
+ **No. They solve two different halves of the AI coding problem.**
697
+
698
+ | Feature | Google Developer Knowledge MCP | AndroJack MCP |
699
+ | :--- | :--- | :--- |
700
+ | **Identity** | **The Librarian** (Information) | **The Gatekeeper** (Enforcement) |
701
+ | **Core Job** | Feeds the AI the newest documentation so it knows what exists. | Acts as a strict pre-build linter to enforce modern architectural rules. |
702
+ | **Mechanism** | Context Retrieval | Context Enforcement |
703
+ | **Scope** | Generalist β€” Firebase, Cloud, Android, Maps, and more | Android specialist β€” 21 tools, one domain, zero drift |
704
+ | **Tools** | 3 retrieval tools (`search_documents`, `get_document`, `batch_get_documents`) | 21 specialized tools β€” live version checks, deprecation registry, Gradle lookups, API level validation, loop-back code validator |
705
+ | **Setup** | Google Cloud project + API key + `gcloud` CLI required | `npx androjack-mcp` β€” zero auth, zero cloud project |
706
+ | **Enforcement** | Passive β€” AI decides when to retrieve | Active β€” tool descriptions mandate calls before every task type |
707
+ | **Status** | Public preview (v1alpha / experimental) | Stable (v1.5.1) |
708
+
709
+ **Why you need both in production:**
710
+ Google's tool cures AI "ignorance" by providing official text. However, **AndroJack cures AI "bad habits."** If you ask an AI to refactor an app, Google's tool will provide the new docs. But **AndroJack** is the tool that actively blocks the AI from writing legacy XML, enforces Jetpack Compose, checks Gradle versions against Maven, and ensures your `minSdk` doesn't violate Android 16's Play Store mandate.
711
+
712
+ Google tells the AI the rules; **AndroJack forces the AI to follow them.**
713
+
714
+ ---
715
+
716
+ ## πŸ”’ Security & Privacy
717
+
718
+ | Property | Detail |
719
+ |----------|--------|
720
+ | **Domain allowlist** | All HTTP enforced against: `developer.android.com`, `kotlinlang.org`, `source.android.com`, `issuetracker.google.com`, Google Maven, Maven Central |
721
+ | **Rate limiting** | 30 requests / domain / minute with exponential backoff on 429/5xx |
722
+ | **No credentials** | Zero API keys, zero auth tokens required |
723
+ | **No data stored** | Nothing persisted beyond process lifetime |
724
+ | **Transparent agent** | User-Agent: `AndroJack-MCP/1.4 (documentation-grounding bot; not-a-scraper)` |
725
+ | **Read-only** | All 21 tools are annotated `readOnlyHint: true` β€” no writes, no side effects |
726
+ | **Input bounds** | All inputs length-capped and sanitized before use |
727
+ | **Body size cap** | HTTP responses capped at 4 MB β€” no OOM risk on large documentation pages |
728
+
729
+ ---
730
+
731
+ ## πŸ—ΊοΈ Knowledge Sources
732
+
733
+ | Source | What It Covers |
734
+ |--------|---------------|
735
+ | `developer.android.com` | Jetpack, Architecture, Compose, Navigation 3, Testing, M3 Expressive, Android 16 |
736
+ | `kotlinlang.org` | Kotlin language, coroutines, Flow, KMP, stdlib patterns |
737
+ | `source.android.com` | AOSP internals, system API behavior |
738
+ | `issuetracker.google.com` | Known bugs, official workarounds |
739
+ | `dl.google.com/android/maven2` | Google Maven β€” live Jetpack versions |
740
+ | `search.maven.org` | Maven Central β€” community library versions |
741
+ | Built-in registries | 40+ component statuses, 40+ arch guide URLs, 40+ permissions, BOM resolution logic |
742
+
743
+ ---
744
+
745
+ ## πŸ—οΈ Architecture
746
+
747
+ ```
748
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
749
+ β”‚ Your AI IDE / Client β”‚
750
+ β”‚ Claude Β· Cursor Β· Windsurf Β· VS Code Β· Kiro Β· Antigravity β”‚
751
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
752
+ β”‚ MCP stdio transport
753
+ β–Ό
754
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
755
+ β”‚ AndroJack MCP Server β”‚
756
+ β”‚ β”‚
757
+ β”‚ πŸ” search ⚠️ component πŸ“ architecture πŸ› debuggerβ”‚
758
+ β”‚ πŸ“¦ gradle πŸ“Š api-level 🎯 kotlin 🎨 m3e β”‚
759
+ β”‚ πŸ” permissions πŸ§ͺ testing πŸ—οΈ build-publish β”‚
760
+ β”‚ πŸ“± large-screen πŸš€ scalability β”‚
761
+ β”‚ β”‚
762
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
763
+ β”‚ β”‚ Secure HTTP layer β”‚ β”‚
764
+ β”‚ β”‚ Domain allowlist Β· Rate limiter Β· Retry backoff β”‚ β”‚
765
+ β”‚ β”‚ 4 MB body cap Β· Cheerio HTML parsing β”‚ β”‚
766
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
767
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
768
+ β”‚ HTTPS (allowlisted only)
769
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
770
+ β–Ό β–Ό β–Ό
771
+ developer.android.com kotlinlang.org Google Maven
772
+ issuetracker.google source.android Maven Central
773
+ ```
774
+
775
+ ---
776
+
777
+ ## πŸ§‘β€πŸ’» Local Development
778
+
779
+ ```bash
780
+ git clone https://github.com/VIKAS9793/AndroJack-mcp.git
781
+ cd androjack-mcp
782
+ npm install
783
+ npm run build # compiles TypeScript β†’ build/
784
+ npm run inspector # opens MCP Inspector UI
785
+ node build/index.js # run MCP server directly
786
+ npm run install-mcp # interactive installer (needs real terminal)
787
+ npm run install-mcp:auto # non-interactive auto-install
788
+ npm run install-mcp:list # check IDE detection status
789
+ ```
790
+
791
+ ---
792
+
793
+ ## πŸ“‹ Changelog
794
+
795
+ ### v1.5.1 β€” Level 3 Loop-Back Validator + Interactive CLI Installer
796
+
797
+ - **New:** `android_code_validator` (Tool 21) β€” Level 3 loop-back validation gate. 24 rules across Kotlin, XML, and Gradle. Validates AI-generated code before it reaches the user. Returns PASS/WARN/FAIL verdict with line-level violations, replacements, and official doc URLs. Zero new dependencies β€” pure TypeScript.
798
+ - **New:** Grounding Gate upgraded to Level 3: Step 8 mandates `android_code_validator` after every code generation. Negative constraints section lists explicit prohibitions by API level (Android 16 targets, new Compose projects, universal rules).
799
+ - **New:** Animated `figlet` ASCII-art banner with cyan→purple gradient and Android fixes tagline
800
+ (`Gradle Β· ViewModel Β· Room Β· Compose Β· Navigation Β· Hilt Β· WorkManager`)
801
+ - **New:** `@clack/prompts` arrow-key select + checkbox multiselect β€” no more typing numbers
802
+ - **New:** `ora` per-IDE spinner with βœ…/❌ result per IDE
803
+ - **New:** Y/N `confirm` dialogs before writing configs and when overwriting existing installs
804
+ - **New:** TTY guard β€” graceful `--auto` fallback in CI / non-TTY environments
805
+ - **New:** Per-IDE `npm run install-mcp:*` scripts visible in VS Code / IntelliJ npm panels
806
+ - **Fix:** `--ide` flag now uses `--ide=<name>` format consistently
807
+
808
+ ### v1.3.4 and earlier
809
+
810
+ See [GitHub releases](https://github.com/VIKAS9793/AndroJack-mcp/releases) for prior history.
811
+
812
+ ---
813
+
814
+ ## πŸ‘₯ Authorship & Ownership
815
+
816
+ **AndroJack-MCP** is a collaborative effort between human product vision and AI engineering excellence.
817
+
818
+ * **Vikas Sahani** β€” [Product Lead](https://www.linkedin.com/in/vikas-sahani-727420358) (`vikassahani17@gmail.com`)
819
+ * **Claude AI** β€” AI Engineering Lead
820
+
821
+ ## οΏ½ Getting the Full Guarantee
822
+
823
+ Installing the tools alone gives you **Level 1** grounding β€” the AI *can* use them but decides when. For **Level 2** mandatory, automatic grounding on every Android task, load the `androjack_grounding_gate` system prompt.
824
+
825
+ ### What is the Grounding Gate system prompt?
826
+
827
+ It is a set of rules registered on the MCP server itself (accessible via the MCP `prompts` API). It maps every task type to the correct tool:
828
+
829
+ | When the AI does this... | It is mandated to call this first |
830
+ |---|---|
831
+ | Write any Compose UI | `material3_expressive` |
832
+ | Add/update any dependency | `gradle_dependency_checker` |
833
+ | Use any Android/Jetpack class | `android_component_status` |
834
+ | Write navigation code | `android_navigation3_guide` |
835
+ | Write tests | `android_testing_guide` |
836
+ | Target tablets/foldables | `android_large_screen_guide` |
837
+
838
+ ### How to activate Level 2
839
+
840
+ **Claude Desktop / Cursor / Windsurf:**
841
+ In your system prompt settings, add:
842
+ ```
843
+ Use the androjack_grounding_gate MCP prompt before every Android coding task.
844
+ ```
845
+
846
+ **IDEs that support MCP prompt injection** (Kiro, Antigravity, JetBrains AI):
847
+ Select the `androjack_grounding_gate` prompt from the MCP prompts list at session start.
848
+
849
+ > Without this step, tool invocation depends on the AI's judgment. With it, the AI is mandated to consult the correct tool for every decision β€” architecture, UI, dependencies, and testing.
850
+
851
+ ---
852
+
853
+ ## οΏ½πŸ’¬ Community &amp; Discussions
854
+
855
+ Join our [GitHub Discussions](https://github.com/VIKAS9793/AndroJack-mcp/discussions) to connect with other developers, ask questions, and share your ideas!
856
+
857
+ - **πŸ™ Q&A**: Get help with setup and usage.
858
+ - **πŸ’‘ Ideas**: Propose new tools and features for the 2026 roadmap.
859
+ - **πŸ™‹ Polls**: Vote on the next Android APIs to support.
860
+ - **πŸŽ‰ Showcase**: Share your amazing Android projects built with AndroJack.
861
+
862
+ ---
863
+
864
+ ## 🀝 Contributing
865
+
866
+ We welcome contributions! Please see our [Contributing Guidelines](https://github.com/VIKAS9793/AndroJack-mcp/blob/main/CONTRIBUTING.md) for more details.
867
+
868
+ ---
869
+
870
+ ## πŸ“„ License
871
+
872
+ [MIT License](https://github.com/VIKAS9793/AndroJack-mcp/blob/main/LICENSE) Β© 2026 Vikas Sahani | [Security Policy](https://github.com/VIKAS9793/AndroJack-mcp/blob/main/SECURITY.md)
873
+
874
+ ---
875
+
876
+ <div align="center">
877
+
878
+ *Built because 35% of Stack Overflow visits in 2025 are developers debugging AI-generated code.*
879
+ *AndroJack exists so none of those visits are yours.*
880
+
881
+ </div>