androjack-mcp 1.6.4 โ†’ 1.7.0

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 (40) hide show
  1. package/README.md +440 -343
  2. package/build/constants.js +21 -0
  3. package/build/http-server.js +1 -1
  4. package/build/install.js +4 -4
  5. package/build/rules/android-rules.js +22 -0
  6. package/build/serve.js +3 -3
  7. package/build/server-factory.js +24 -0
  8. package/build/tools/android17-compliance.js +285 -0
  9. package/build/tools/api36-compliance.js +271 -259
  10. package/build/tools/build-publish.js +459 -326
  11. package/build/tools/kmp.js +377 -327
  12. package/build/tools/large-screen.js +424 -316
  13. package/build/tools/permissions.js +110 -91
  14. package/build/tools/play-policy.js +249 -195
  15. package/build/version.js +1 -1
  16. package/config/antigravity_mcp.json +1 -1
  17. package/config/claude_desktop_config.json +1 -1
  18. package/config/cursor_mcp.json +1 -1
  19. package/config/jetbrains_mcp.json +2 -2
  20. package/config/kiro_mcp.json +4 -4
  21. package/config/vscode_mcp.json +1 -1
  22. package/config/windsurf_mcp.json +1 -1
  23. package/manifest.json +2 -2
  24. package/package.json +2 -2
  25. package/server.json +2 -2
  26. package/src/constants.ts +459 -438
  27. package/src/http-server.ts +350 -350
  28. package/src/install.ts +4 -4
  29. package/src/rules/android-rules.ts +415 -390
  30. package/src/serve.ts +153 -153
  31. package/src/server-factory.ts +32 -0
  32. package/src/stdio.ts +41 -41
  33. package/src/tools/android17-compliance.ts +292 -0
  34. package/src/tools/api36-compliance.ts +306 -289
  35. package/src/tools/build-publish.ts +513 -379
  36. package/src/tools/kmp.ts +403 -352
  37. package/src/tools/large-screen.ts +501 -391
  38. package/src/tools/permissions.ts +464 -445
  39. package/src/tools/play-policy.ts +284 -229
  40. package/src/version.ts +3 -3
package/README.md CHANGED
@@ -1,343 +1,440 @@
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
- ### ๐ŸŽฌ Discover AndroJack
12
-
13
- [![Official Product Page](https://img.shields.io/badge/Product-Landing%20Page-00C7B7?style=for-the-badge)](https://androjack-web.netlify.app/)
14
- [![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)
15
-
16
- ### *An MCP server that equips your AI coding assistant with live, verified Android knowledge โ€” so it builds from official sources, not from memory.*
17
-
18
- <br/>
19
-
20
- [![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)
21
- [![VS Code](https://img.shields.io/visual-studio-marketplace/v/VIKAS9793.androjack-vscode?color=0A7AFF&style=flat-square&logo=visual-studio-code&label=VS%20Code)](https://marketplace.visualstudio.com/items?itemName=VIKAS9793.androjack-vscode)
22
- [![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)
23
- [![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen?style=flat-square&logo=node.js)](https://nodejs.org)
24
- [![MCP Spec](https://img.shields.io/badge/MCP-2025--11--25-blueviolet?style=flat-square)](https://modelcontextprotocol.io)
25
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-3178C6?style=flat-square&logo=typescript)](https://typescriptlang.org)
26
- [![Tools](https://img.shields.io/badge/tools-21-orange?style=flat-square)](#-the-21-tools)
27
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE)
28
- [![Security Policy](https://img.shields.io/badge/security-policy-0A7AFF?style=flat-square&logo=github)](SECURITY.md)
29
- [![Android API](https://img.shields.io/badge/Android-API%2021--36-34A853?style=flat-square&logo=android)](https://developer.android.com)
30
-
31
- ### ๐Ÿš€ One-Click Install
32
-
33
- [![Install in VS Code](https://img.shields.io/badge/Install%20in-VS%20Code-007ACC?style=for-the-badge&logo=visual-studio-code&logoColor=white)](https://marketplace.visualstudio.com/items?itemName=VIKAS9793.androjack-vscode)
34
- [![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=eyJuYW1lIjoiYW5kcm9qYWNrIiwiY29tbWFuZCI6Im5weCIsImFyZ3MiOlsiLXkiLCJhbmRyb2phY2stbWNwQDEuNi4zIl19)
35
- [![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=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImFuZHJvamFjay1tY3BAMS42LjMiXX0=)
36
- [![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%401.6.4%22%5D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D)
37
- [![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)
38
-
39
- **VS Code distribution:** AndroJack MCP is also live on the VS Code Marketplace as [AndroJack MCP for VS Code](https://marketplace.visualstudio.com/items?itemName=VIKAS9793.androjack-vscode). The `VS Code` badge above always reflects the currently published Marketplace version.
40
-
41
- **PM / APM docs:** Product strategy, JTBD, personas, roadmap, user stories, competitive analysis, and GTM materials now live under [product-management/README.md](product-management/README.md).
42
-
43
- <br/>
44
-
45
- **Also works with:** Windsurf ยท VS Code Copilot ยท Google Antigravity ยท JetBrains AI โ€” see [Manual Config](#-manual-config--copy--paste) below โ†“
46
-
47
- <br/>
48
-
49
- </div>
50
-
51
- ---
52
-
53
- ## ๐Ÿ”ฅ The Crisis That Created This Tool
54
-
55
- 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:
56
-
57
- * **84% of developers** now use AI coding tools โ€” up from 76% the year before.
58
- * **Trust in AI accuracy collapsed** from 40% to just **29%** in a single year.
59
- * **35% of all Stack Overflow visits in 2025** are now triggered by developers debugging and fixing AI-generated code.
60
-
61
- 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.
62
-
63
- 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.
64
-
65
- The result is not just bad code. It is **confidently bad code.**
66
-
67
- ## โšก What Actually Breaks In Practice โ€” Documented Evidence
68
-
69
- These are not hypothetical risks. They are documented failure modes from real developer projects.
70
-
71
- ### The Navigation 3 Hallucination (January 2026)
72
- 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:
73
-
74
- > "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."
75
-
76
- 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.
77
-
78
- ### The Compose Deprecation Treadmill
79
- Jetpack Compose ships a new BOM every month. Since most models' training cutoffs, these APIs changed:
80
-
81
- | API | Status | What goes wrong |
82
- | :--- | :--- | :--- |
83
- | `ContextualFlowRow` / `ContextualFlowColumn` | Deprecated in Compose 1.8 | AI still generates them โ€” compile warning today, removal tomorrow |
84
- | `TestCoroutineDispatcher` | Removed from coroutines-test 1.8+ | AI still generates it โ€” causes non-deterministic test failures in CI |
85
- | `FlowRow` overflow parameter | Deprecated in 1.8 | Subtle behavioral regression at runtime, silent in most linting setups |
86
- | `AnchoredDraggableState.confirmValueChange` | Deprecated | Incorrect drag behavior at anchor boundaries |
87
- | Navigation 2 in new projects | Superseded by Nav3 stable Nov 2025 | Architectural dead-end that requires a rewrite to fix |
88
-
89
- 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.
90
-
91
- ### The Android 16 / API 36 Mandate (August 2026 deadline)
92
- 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.
93
-
94
- 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.
95
-
96
- The business impact is not theoretical: **Foldable users spend 14ร— more on apps** than phone-only users. Tablet + phone users spend 9ร— more. FlipaClip saw 54% growth in tablet users within four months of going adaptive.
97
-
98
- ### The KMP Silent Failure
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
- ## ๐Ÿงฉ What AndroJack Does
102
-
103
- 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.
104
-
105
- It does not make the AI smarter. It makes the AI **accountable to evidence.**
106
-
107
- Think of it as a pre-build linter for LLMs. While other tools retrieve documentation, AndroJack acts as a strict architectural gatekeeper.
108
-
109
- **Without AndroJack:** You ask โ†’ AI predicts from stale weights โ†’ Code (possibly wrong)
110
-
111
- **With AndroJack:** You ask โ†’ AI calls tool โ†’ Tool fetches official source live โ†’ AI reads verified answer โ†’ Code (grounded)
112
-
113
- ## โš ๏ธ Honest Activation Model โ€” Two Levels
114
-
115
- This is the most important thing to understand before you install AndroJack:
116
-
117
- | Level | What's Active | What the AI Does |
118
- | :--- | :--- | :--- |
119
- | **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. |
120
- | **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. |
121
- | **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. |
122
-
123
- **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.
124
-
125
- **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.
126
-
127
- **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.
128
-
129
- โ†’ *For full grounding, always activate Level 2 + Level 3. See Getting the Full Guarantee below.*
130
-
131
- ## ๐Ÿชฒ What Can Still Break โ€” Even at Level 3
132
-
133
- > [!IMPORTANT]
134
- > 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.
135
-
136
- 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.
137
-
138
- ### โœ… What Level 3 Catches
139
- These are the bugs AndroJack was designed to prevent. The rule engine fires on these:
140
-
141
- ```kotlin
142
- // โŒ REMOVED โ€” android_code_validator fires: REMOVED_ASYNCTASK
143
- class MyTask : AsyncTask<Void, Void, String>()
144
-
145
- // โŒ REMOVED โ€” fires: REMOVED_TEST_COROUTINE_DISPATCHER
146
- val dispatcher = TestCoroutineDispatcher()
147
-
148
- // โŒ DEPRECATED โ€” fires: DEPRECATED_CONTEXTUAL_FLOW_ROW
149
- ContextualFlowRow { Text("hello") }
150
-
151
- // โŒ LEAK โ€” fires: GLOBALSCOPE_LAUNCH
152
- GlobalScope.launch { fetchData() }
153
- ```
154
-
155
- ### โš ๏ธ What Level 3 Cannot Catch โ€” And Why
156
- > [!WARNING]
157
- > 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.
158
-
159
- #### Bug PH-UI-001 โ€” Segmented button text truncation
160
- ```kotlin
161
- // Compiles and runs. Level 3 sees no violation.
162
- // The bug: Text inside MultiChoiceSegmentedButtonRow truncates because a
163
- // fixed height modifier prevents the Roboto Flex variable font from expanding.
164
- MultiChoiceSegmentedButtonRow {
165
- SegmentedButton(/* fixed height modifier */) {
166
- Text("Light")
167
- }
168
- }
169
- ```
170
- > [!NOTE]
171
- > This is an **absence** bug. The correct modifier is missing โ€” no wrong one is present. Use visual testing or runtime inspection.
172
-
173
- #### Bug PH-UI-003 โ€” Disabled button contrast failure
174
- ```kotlin
175
- // Correct Material 3 API. Level 3 sees no violation.
176
- // The bug: disabled state colours fail WCAG AA 4.5:1 contrast against surface.
177
- Button(enabled = false, onClick = {}) {
178
- Text("INITIALIZE VAULT")
179
- }
180
- ```
181
- > [!NOTE]
182
- > This is a **runtime visual property** bug. Use paparazzi screenshot tests or Google's Accessibility Scanner.
183
-
184
- #### Bug PH-AR-004 โ€” Raw stack trace rendered to end user
185
- ```kotlin
186
- // A missing try/catch produces no pattern match.
187
- class VaultViewModel : ViewModel() {
188
- fun initializeVault() {
189
- viewModelScope.launch {
190
- val result = repository.initialize() // Missing try/catch
191
- _uiState.value = UiState.Success(result)
192
- }
193
- }
194
- }
195
- ```
196
- > [!WARNING]
197
- > **UDF architecture violations** require Detekt with custom rules or unit tests verifying exception mapping.
198
-
199
- ## ๐Ÿ—‚๏ธ Defence-in-Depth: The Right Tool for Each Bug Class
200
-
201
- | Bug Class | Real Example | Right Tool |
202
- | :--- | :--- | :--- |
203
- | Removed / deprecated API | `AsyncTask`, `TestCoroutineDispatcher` | โœ… AndroJack Level 3 |
204
- | Android 16 violations | `screenOrientation`, `resizeableActivity=false` | โœ… AndroJack Level 3 |
205
- | Architecture (flagged root) | `GlobalScope` leaking to UI | โœ… AndroJack Level 3 |
206
- | Absent modifier / missing constraint | `PH-UI-009` (innerPadding) | ๐Ÿ”ง Android Lint / IDE inspector |
207
- | Runtime contrast / colour failures | `PH-UI-003` (WCAG) | ๐Ÿ”ง paparazzi + Accessibility Scanner |
208
- | Touch target violations | `PH-UX-008` | ๐Ÿ”ง Accessibility Scanner |
209
- | Architecture boundary (missing catch) | `PH-AR-004` (stack trace to UI) | ๐Ÿ”ง Detekt + ViewModel unit tests |
210
-
211
- ## ๐ŸŽฏ The Killer Argument
212
-
213
- > "Can your `agents.md` file tell me the Gradle version that shipped last Tuesday?"
214
-
215
- No markdown file can. No rules in `.cursorrules` can. No `SKILL.md` can.
216
-
217
- **โœ… Only a live tool call can.**
218
-
219
- That's the job AndroJack exists to do โ€” and nothing else in the current ecosystem does it for Android specifically.
220
-
221
- | What you need | agents.md / SKILL.md | AndroJack MCP |
222
- | :--- | :--- | :--- |
223
- | Format output a specific way | โœ… Perfect | Works too |
224
- | Follow team conventions | โœ… Perfect | Works too |
225
- | Latest Gradle version right now | โŒ Guesses from memory | โœ… Fetches live |
226
- | Is AsyncTask removed? | โŒ May be wrong | โœ… Verified against SDK |
227
- | Android 16 Play Store rules | โŒ Unknown | โœ… Official source |
228
-
229
- **Prompt engineering controls how the AI responds. MCP controls what the AI knows.**
230
-
231
- ## โœจ What AndroJack Covers โ€” 21 Tools
232
-
233
- | # | Tool | What It Does | What Breaks Without It |
234
- | :--- | :--- | :--- | :--- |
235
- | 1 | `๐Ÿ” search` | Live search across official Android/Kotlin docs | AI reasons from memory โ€” possibly wrong today |
236
- | 2 | `โš ๏ธ component` | Deprecated/removed check on 40+ APIs | Compiles fine, breaks at runtime/review |
237
- | 3 | `๐Ÿ“ architecture` | Guides for 40+ topics โ€” MVVM, Nav3, MVI... | AI gives 2022 advice; misses Nav3 |
238
- | 4 | `๐Ÿ› debugger` | Parses stacktraces โ†’ searches Issue Tracker | AI hallucinates fixes for known bugs |
239
- | 5 | `๐Ÿ“ฆ gradle` | Live lookup from Google Maven + BOM resolution | Stale Compose BOM, KAPT instead of KSP |
240
- | 6 | `๐Ÿ“Š api-level` | API 21โ€“36 table, minSdk warnings | API 26+ calls in minSdk 21 apps |
241
- | 7 | `๐ŸŽฏ kotlin` | 10 patterns โ€” coroutines, MVI, Compose state | `GlobalScope.launch`, `runBlocking` in UI |
242
- | 8 | `๐ŸŽจ m3e` | Material 3 Expressive components & Motion | M2 MaterialTheme in M3E app |
243
- | 9 | `๐Ÿ” permissions` | 40+ permissions rules & contracts | `deprecated requestPermissions()` |
244
- | 10| `๐Ÿงช testing` | Unit/Compose UI testing official patterns | `Thread.sleep()` in tests; missing Hilt |
245
- | 11| `๐Ÿ—๏ธ build` | R8, libs.versions.toml, signing, AAB | implementation instead of ksp |
246
- | 12| `๐Ÿ“ฑ large-screen` | WindowSizeClass, Adaptive Scaffolds | Phone-only layouts on foldables |
247
- | 13| `๐Ÿš€ scalability` | Paging 3, WorkManager, modularization | Naive `loadAll()`; unstable keys in lists |
248
- | 14| `๐Ÿงญ nav3` | Nav3 (Nov 2025) โ€” Scenes, migration | AI generates Nav2 dead-ends |
249
- | 15| `โœ… compliance` | API 36 / Android 16 / 16 KB page size | Apps fail Play Store August 2026 mandate |
250
- | 16| `๐ŸŒ kmp` | Room KMP, Ktor, source sets | Android-only code in KMP projects |
251
- | 17| `๐Ÿค– ondevice-ai` | AICore, ML Kit Gen AI, Gemini Nano | Cloud-only AI when offline is required |
252
- | 18| `๐Ÿ“‹ policy` | Play Store age-gating, health, data safety | Apps rejected for unknown policy changes |
253
- | 19| `๐Ÿฅฝ xr` | Android XR SDK, SpatialPanel, Orbiter | Works as 2D panel, misses spatial value |
254
- | 20| `โŒš wear` | Tiles, Health, M3 Expressive for Wear OS | Handheld patterns on round displays |
255
- | 21| `๐Ÿ›ก๏ธ validator` | Level 3 loop-back validation gate | AI ships broken code without checking |
256
-
257
- ---
258
-
259
- ## ๐Ÿš€ Quick Start โ€” Zero Install Required
260
-
261
- ### Option 1 โ€” Interactive CLI (v1.6.4) โœจ Recommended
262
- ```bash
263
- npx -y androjack-mcp@1.6.4 install
264
- ```
265
- Launches a full animated terminal wizard with auto-detection for **VS Code, Cursor, Claude, Windsurf, JetBrains, Kiro, and Antigravity.**
266
-
267
- ### Option 2 โ€” Targeted installs
268
- ```bash
269
- # Preview detected IDEs and config paths
270
- npx -y androjack-mcp@1.6.4 install --list
271
-
272
- # Auto-detect all
273
- npx -y androjack-mcp@1.6.4 install --auto
274
-
275
- # Install to specific IDE
276
- npx -y androjack-mcp@1.6.4 install --ide=cursor
277
- npx -y androjack-mcp@1.6.4 install --ide=claude
278
- npx -y androjack-mcp@1.6.4 install --ide=vscode
279
- npx -y androjack-mcp@1.6.4 install --ide=windsurf
280
- npx -y androjack-mcp@1.6.4 install --ide=jetbrains
281
- npx -y androjack-mcp@1.6.4 install --ide=kiro
282
- npx -y androjack-mcp@1.6.4 install --ide=antigravity
283
- ```
284
-
285
- ### Option 3 โ€” Test without IDE
286
- ```bash
287
- npx -y @modelcontextprotocol/inspector npx -y androjack-mcp@1.6.4
288
- ```
289
-
290
- ## ๐Ÿงฉ Manual Config / Copy / Paste
291
-
292
- If you prefer to wire the server manually, or want to inspect the exact JSON before writing anything:
293
-
294
- - Run `npx -y androjack-mcp@1.6.4 install --list` to preview detected IDEs and target config paths.
295
- - Ready-to-paste examples live in [`config/`](config/).
296
- - Use [`config/claude_desktop_config.json`](config/claude_desktop_config.json) for Claude Desktop.
297
- - Use [`config/cursor_mcp.json`](config/cursor_mcp.json) for Cursor.
298
- - Use [`config/vscode_mcp.json`](config/vscode_mcp.json) for VS Code / GitHub Copilot.
299
- - Use [`config/windsurf_mcp.json`](config/windsurf_mcp.json) for Windsurf.
300
- - Use [`config/jetbrains_mcp.json`](config/jetbrains_mcp.json) for Android Studio / IntelliJ.
301
- - Use [`config/kiro_mcp.json`](config/kiro_mcp.json) for AWS Kiro.
302
- - Use [`config/antigravity_mcp.json`](config/antigravity_mcp.json) for Google Antigravity.
303
- - Every example keeps AndroJack local by default and runs the published package via `npx -y androjack-mcp@1.6.4`.
304
-
305
- ---
306
-
307
- ## ๐Ÿ“ The Ecosystem: AndroJack vs. Other MCPs
308
-
309
- | Feature | Google Developer Knowledge MCP | AndroJack MCP |
310
- | :--- | :--- | :--- |
311
- | **Identity** | The Librarian (Information) | The Gatekeeper (Enforcement) |
312
- | **Mechanism** | Context Retrieval | Context Enforcement |
313
- | **Scope** | Generalist โ€” Firebase, Cloud, Maps | Android engineering specialist |
314
- | **Tools** | 3 retrieval tools | 21 specialized tools |
315
- | **Setup** | Google Cloud project + API key required | `npx androjack-mcp@1.6.4` โ€” zero auth |
316
- | **Enforcement**| Passive โ€” AI decides when to retrieve | Active โ€” mandating calls by task type |
317
-
318
- ## ๐Ÿ”’ Security & Privacy
319
- * **Domain allowlist**: Requests only to Google/Android/Kotlin official domains.
320
- * **HTTPS only**: Outbound documentation fetches refuse non-HTTPS URLs, cap body size, and redact query strings in retry logs.
321
- * **Local by default**: `serve` binds to loopback only unless you explicitly pass `--allow-remote`.
322
- * **HTTP hardening**: Streamable HTTP validates `Origin` and `Host` headers and caps request bodies and active sessions.
323
- * **Transparent agent**: User-Agent: `AndroJack-MCP/1.6.4`.
324
- * **Read-only**: All 21 tools are annotated `readOnlyHint: true`.
325
- * **Zero credentials**: No API keys or tokens required for documentation fetching.
326
- * **Security policy**: Disclosure process and supported versions live in [SECURITY.md](SECURITY.md).
327
-
328
- ## ๐Ÿ“‹ Changelog
329
- ### v1.6.4 โ€” CLI Routing Fixes and Local Transport Hardening
330
- - **Fix:** `npx androjack-mcp install`, `install --auto`, `install --ide=...`, `help`, and `--version` now route correctly instead of falling through to the stdio server.
331
- - **Fix:** `install --auto` no longer over-detects IDEs from parent directories and create configs in a clean workspace.
332
- - **Fix:** HTTP serve mode now fails closed on non-loopback binds unless `--allow-remote` is explicit.
333
- - **Security:** Streamable HTTP now validates `Origin` and `Host` headers and enforces request body and session limits.
334
- - **Security:** Outbound fetches now enforce HTTPS, cap response size, and redact sensitive URL parts from retry logs.
335
-
336
- ## ๐Ÿ‘ฅ Authorship & Ownership
337
- **Vikas Sahani** โ€” Product Lead (vikassahani17@gmail.com)
338
- **Claude AI** โ€” AI Engineering Lead
339
-
340
- ---
341
- MIT License ยฉ 2026 Vikas Sahani | [SECURITY.md](SECURITY.md)
342
-
343
- *Built because 35% of Stack Overflow visits in 2025 are developers debugging AI-generated code. AndroJack exists so none of those visits are yours.*
1
+ <div align="center">
2
+
3
+ ![AndroJack Banner](https://raw.githubusercontent.com/VIKAS9793/AndroJack-mcp/main/assets/AndroJack%20banner.png)
4
+
5
+ # AndroJack โ€” The Jack of All Android Trades
6
+
7
+ <img src="https://img.shields.io/badge/Android-3DDC84?style=for-the-badge&logo=android&logoColor=white" />
8
+ <img src="https://img.shields.io/badge/Kotlin-7F52FF?style=for-the-badge&logo=kotlin&logoColor=white" />
9
+ <img src="https://img.shields.io/badge/MCP-Protocol-blueviolet?style=for-the-badge" />
10
+
11
+ ### *An MCP server that equips your AI coding assistant with live, verified Android knowledge โ€” so it builds from official sources, not from memory.*
12
+
13
+ <br/>
14
+
15
+ [![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)
16
+ [![VS Code](https://img.shields.io/visual-studio-marketplace/v/VIKAS9793.androjack-vscode?color=0A7AFF&style=flat-square&logo=visual-studio-code&label=VS%20Code)](https://marketplace.visualstudio.com/items?itemName=VIKAS9793.androjack-vscode)
17
+ [![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)
18
+ [![GitHub clones](https://img.shields.io/badge/dynamic/json?color=34A853&label=clones&query=clones&url=https%3A%2F%2Fraw.githubusercontent.com%2FVIKAS9793%2FAndroJack-mcp%2Fmain%2Fassets%2Fclones.json&logo=github)](https://github.com/VIKAS9793/AndroJack-mcp/graphs/traffic)
19
+ [![Tools](https://img.shields.io/badge/tools-22-orange?style=flat-square)](#-the-22-tools)
20
+ [![MCP Spec](https://img.shields.io/badge/MCP-2025--11--25-blueviolet?style=flat-square)](https://modelcontextprotocol.io)
21
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-3178C6?style=flat-square&logo=typescript)](https://typescriptlang.org)
22
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen?style=flat-square&logo=node.js)](https://nodejs.org)
23
+ [![Android API](https://img.shields.io/badge/Android-API%2021--37-34A853?style=flat-square&logo=android)](https://developer.android.com)
24
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE)
25
+ [![Security Policy](https://img.shields.io/badge/security-policy-0A7AFF?style=flat-square&logo=github)](SECURITY.md)
26
+
27
+ <br/>
28
+
29
+ [![Install in VS Code](https://img.shields.io/badge/Install%20in-VS%20Code-007ACC?style=for-the-badge&logo=visual-studio-code&logoColor=white)](https://marketplace.visualstudio.com/items?itemName=VIKAS9793.androjack-vscode)
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=eyJuYW1lIjoiYW5kcm9qYWNrIiwiY29tbWFuZCI6Im5weCIsImFyZ3MiOlsiLXkiLCJhbmRyb2phY2stbWNwQDEuNy4wIl19)
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=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImFuZHJvamFjay1tY3BAMS43LjAiXX0=)
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%401.7.0%22%5D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%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
+ [![Official Product Page](https://img.shields.io/badge/Product-Landing%20Page-00C7B7?style=for-the-badge)](https://androjack-web.netlify.app/)
38
+ [![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)
39
+
40
+ <br/>
41
+
42
+ **Also works with:** Windsurf ยท VS Code Copilot ยท Google Antigravity ยท JetBrains AI โ€” see [Manual Config](#-manual-config--copy--paste) below โ†“
43
+
44
+ **VS Code distribution:** Also live on the VS Code Marketplace as [AndroJack MCP for VS Code](https://marketplace.visualstudio.com/items?itemName=VIKAS9793.androjack-vscode).
45
+
46
+ **PM / APM docs:** Product strategy, JTBD, personas, roadmap, user stories, competitive analysis, and GTM materials live under [product-management/README.md](product-management/README.md).
47
+
48
+ </div>
49
+
50
+ ---
51
+
52
+ ## Table of Contents
53
+
54
+ - [The Crisis That Created This Tool](#-the-crisis-that-created-this-tool)
55
+ - [What Actually Breaks In Practice](#-what-actually-breaks-in-practice--documented-evidence)
56
+ - [What AndroJack Does](#-what-androjack-does)
57
+ - [Honest Activation Model](#๏ธ-honest-activation-model--two-levels)
58
+ - [What Can Still Break โ€” Even at Level 3](#-what-can-still-break--even-at-level-3)
59
+ - [Defence-in-Depth](#๏ธ-defence-in-depth-the-right-tool-for-each-bug-class)
60
+ - [The Killer Argument](#-the-killer-argument)
61
+ - [The 22 Tools](#-what-androjack-covers--22-tools)
62
+ - [Quick Start](#-quick-start--zero-install-required)
63
+ - [Manual Config](#-manual-config--copy--paste)
64
+ - [Ecosystem Comparison](#-the-ecosystem-androjack-vs-other-mcps)
65
+ - [Security & Privacy](#-security--privacy)
66
+ - [Changelog](#-changelog)
67
+
68
+ ---
69
+
70
+ ## ๐Ÿ”ฅ The Crisis That Created This Tool
71
+
72
+ 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:
73
+
74
+ - **84% of developers** now use AI coding tools โ€” up from 76% the year before.
75
+ - **Trust in AI accuracy collapsed** from 40% to just **29%** in a single year.
76
+ - **35% of all Stack Overflow visits in 2025** are now triggered by developers debugging and fixing AI-generated code.
77
+
78
+ 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.
79
+
80
+ 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.
81
+
82
+ The result is not just bad code. It is **confidently bad code.**
83
+
84
+ ---
85
+
86
+ ## โšก What Actually Breaks In Practice โ€” Documented Evidence
87
+
88
+ > These are not hypothetical risks. They are documented failure modes from real developer projects.
89
+
90
+ <details>
91
+ <summary><strong>The Navigation 3 Hallucination (January 2026)</strong></summary>
92
+
93
+ 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:
94
+
95
+ > *"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."*
96
+
97
+ 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.
98
+
99
+ </details>
100
+
101
+ <details>
102
+ <summary><strong>The Compose Deprecation Treadmill</strong></summary>
103
+
104
+ Jetpack Compose ships a new BOM every month. Since most models' training cutoffs, these APIs changed:
105
+
106
+ | API | Status | What goes wrong |
107
+ |:----|:-------|:----------------|
108
+ | `ContextualFlowRow` / `ContextualFlowColumn` | Deprecated in Compose 1.8 | AI still generates them โ€” compile warning today, removal tomorrow |
109
+ | `TestCoroutineDispatcher` | Removed from coroutines-test 1.8+ | AI still generates it โ€” non-deterministic test failures in CI |
110
+ | `FlowRow` overflow parameter | Deprecated in 1.8 | Subtle behavioral regression at runtime, silent in most linting setups |
111
+ | `AnchoredDraggableState.confirmValueChange` | Deprecated | Incorrect drag behavior at anchor boundaries |
112
+ | Navigation 2 in new projects | Superseded by Nav3 stable Nov 2025 | Architectural dead-end that requires a rewrite to fix |
113
+
114
+ Every one of these compiles. Most run without errors. The bugs surface later in CI flakiness, UI regressions, or Play Store review failures.
115
+
116
+ </details>
117
+
118
+ <details>
119
+ <summary><strong>The Android 16 / API 36 Mandate (August 2026 deadline)</strong></summary>
120
+
121
+ 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.
122
+
123
+ 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.
124
+
125
+ The business impact is not theoretical: **Foldable users spend 14ร— more on apps** than phone-only users. Tablet + phone users spend 9ร— more. FlipaClip saw 54% growth in tablet users within four months of going adaptive.
126
+
127
+ </details>
128
+
129
+ <details>
130
+ <summary><strong>The KMP Silent Failure</strong></summary>
131
+
132
+ 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.
133
+
134
+ </details>
135
+
136
+ ---
137
+
138
+ ## ๐Ÿงฉ What AndroJack Does
139
+
140
+ AndroJack is a **documentation-grounded Android engineering MCP server**. It gives your AI coding assistant **22 specialized tools** that fetch live, verified answers from official Android and Kotlin sources โ€” instead of predicting from stale training data.
141
+
142
+ It does not make the AI smarter. It makes the AI **accountable to evidence.**
143
+
144
+ Think of it as a pre-build linter for LLMs. While other tools retrieve documentation, AndroJack acts as a strict architectural gatekeeper.
145
+
146
+ ```
147
+ Without AndroJack: You ask โ†’ AI predicts from stale weights โ†’ Code (possibly wrong)
148
+
149
+ With AndroJack: You ask โ†’ AI calls tool โ†’ Tool fetches official source live
150
+ โ†’ AI reads verified answer โ†’ Code (grounded)
151
+ ```
152
+
153
+ ---
154
+
155
+ ## โš ๏ธ Honest Activation Model โ€” Two Levels
156
+
157
+ > [!IMPORTANT]
158
+ > This is the most important thing to understand before you install AndroJack.
159
+
160
+ | Level | What's Active | What the AI Does |
161
+ |:------|:--------------|:-----------------|
162
+ | **Level 1 โ€” Tools only** | 22 tools registered in IDE | AI *may* call the right tool. Depends on the IDE and the AI's judgment. |
163
+ | **Level 2 โ€” Tools + Grounding Gate** | 22 tools + mandatory pre-generation rulebook | AI *must* call the correct tool for every decision before writing code. |
164
+ | **Level 3 โ€” Full loop-back** | Level 2 + `android_code_validator` | AI validates every code block against 24 rules. Errors must be fixed before the user sees the code. |
165
+
166
+ **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.
167
+
168
+ **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.
169
+
170
+ **Level 3 is the loop-back.** `android_code_validator` runs on every code block the AI generates before returning it to the user. 31 rules covering removed APIs, deprecated patterns, Android 16 and Android 17 compliance. Verdict **FAIL** means the AI must fix and re-validate โ€” the user never sees the broken code.
171
+
172
+ โ†’ *For full grounding, always activate Level 2 + Level 3. See Getting the Full Guarantee below.*
173
+
174
+ ---
175
+
176
+ ## ๐Ÿชฒ What Can Still Break โ€” Even at Level 3
177
+
178
+ > [!IMPORTANT]
179
+ > 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.
180
+
181
+ 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.
182
+
183
+ ### โœ… What Level 3 Catches
184
+
185
+ ```kotlin
186
+ // โŒ REMOVED โ€” android_code_validator fires: REMOVED_ASYNCTASK
187
+ class MyTask : AsyncTask<Void, Void, String>()
188
+
189
+ // โŒ REMOVED โ€” fires: REMOVED_TEST_COROUTINE_DISPATCHER
190
+ val dispatcher = TestCoroutineDispatcher()
191
+
192
+ // โŒ DEPRECATED โ€” fires: DEPRECATED_CONTEXTUAL_FLOW_ROW
193
+ ContextualFlowRow { Text("hello") }
194
+
195
+ // โŒ LEAK โ€” fires: GLOBALSCOPE_LAUNCH
196
+ GlobalScope.launch { fetchData() }
197
+ ```
198
+
199
+ ### โš ๏ธ What Level 3 Cannot Catch
200
+
201
+ > [!WARNING]
202
+ > 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.
203
+
204
+ <details>
205
+ <summary><strong>Bug PH-UI-001 โ€” Segmented button text truncation</strong></summary>
206
+
207
+ ```kotlin
208
+ // Compiles and runs. Level 3 sees no violation.
209
+ // The bug: Text inside MultiChoiceSegmentedButtonRow truncates because a
210
+ // fixed height modifier prevents the Roboto Flex variable font from expanding.
211
+ MultiChoiceSegmentedButtonRow {
212
+ SegmentedButton(/* fixed height modifier */) {
213
+ Text("Light")
214
+ }
215
+ }
216
+ ```
217
+
218
+ > [!NOTE]
219
+ > This is an **absence** bug. The correct modifier is missing โ€” no wrong one is present. Use visual testing or runtime inspection.
220
+
221
+ </details>
222
+
223
+ <details>
224
+ <summary><strong>Bug PH-UI-003 โ€” Disabled button contrast failure</strong></summary>
225
+
226
+ ```kotlin
227
+ // Correct Material 3 API. Level 3 sees no violation.
228
+ // The bug: disabled state colours fail WCAG AA 4.5:1 contrast against surface.
229
+ Button(enabled = false, onClick = {}) {
230
+ Text("INITIALIZE VAULT")
231
+ }
232
+ ```
233
+
234
+ > [!NOTE]
235
+ > This is a **runtime visual property** bug. Use paparazzi screenshot tests or Google's Accessibility Scanner.
236
+
237
+ </details>
238
+
239
+ <details>
240
+ <summary><strong>Bug PH-AR-004 โ€” Raw stack trace rendered to end user</strong></summary>
241
+
242
+ ```kotlin
243
+ // A missing try/catch produces no pattern match.
244
+ class VaultViewModel : ViewModel() {
245
+ fun initializeVault() {
246
+ viewModelScope.launch {
247
+ val result = repository.initialize() // Missing try/catch
248
+ _uiState.value = UiState.Success(result)
249
+ }
250
+ }
251
+ }
252
+ ```
253
+
254
+ > [!WARNING]
255
+ > **UDF architecture violations** require Detekt with custom rules or unit tests verifying exception mapping.
256
+
257
+ </details>
258
+
259
+ ---
260
+
261
+ ## ๐Ÿ—‚๏ธ Defence-in-Depth: The Right Tool for Each Bug Class
262
+
263
+ | Bug Class | Real Example | Right Tool |
264
+ |:----------|:-------------|:-----------|
265
+ | Removed / deprecated API | `AsyncTask`, `TestCoroutineDispatcher` | โœ… AndroJack Level 3 |
266
+ | Android 16 violations | `screenOrientation`, `resizeableActivity=false` | โœ… AndroJack Level 3 |
267
+ | Android 17 violations | `static final` reflection, LAN without permission | โœ… AndroJack Level 3 |
268
+ | Architecture (flagged root) | `GlobalScope` leaking to UI | โœ… AndroJack Level 3 |
269
+ | Absent modifier / missing constraint | `PH-UI-009` (innerPadding) | ๐Ÿ”ง Android Lint / IDE inspector |
270
+ | Runtime contrast / colour failures | `PH-UI-003` (WCAG) | ๐Ÿ”ง paparazzi + Accessibility Scanner |
271
+ | Touch target violations | `PH-UX-008` | ๐Ÿ”ง Accessibility Scanner |
272
+ | Architecture boundary (missing catch) | `PH-AR-004` (stack trace to UI) | ๐Ÿ”ง Detekt + ViewModel unit tests |
273
+
274
+ ---
275
+
276
+ ## ๐ŸŽฏ The Killer Argument
277
+
278
+ > *"Can your `agents.md` file tell me the Gradle version that shipped last Tuesday?"*
279
+
280
+ No markdown file can. No rules in `.cursorrules` can. No `SKILL.md` can.
281
+
282
+ **โœ… Only a live tool call can.**
283
+
284
+ That's the job AndroJack exists to do โ€” and nothing else in the current ecosystem does it for Android specifically.
285
+
286
+ | What you need | agents.md / SKILL.md | AndroJack MCP |
287
+ |:--------------|:---------------------|:--------------|
288
+ | Format output a specific way | โœ… Perfect | Works too |
289
+ | Follow team conventions | โœ… Perfect | Works too |
290
+ | Latest Gradle version right now | โŒ Guesses from memory | โœ… Fetches live |
291
+ | Is AsyncTask removed? | โŒ May be wrong | โœ… Verified against SDK |
292
+ | Android 16 Play Store rules | โŒ Unknown | โœ… Official source |
293
+
294
+ **Prompt engineering controls how the AI responds. MCP controls what the AI knows.**
295
+
296
+ ---
297
+
298
+ ## โœจ What AndroJack Covers โ€” 22 Tools
299
+
300
+ | # | Tool | What It Does | What Breaks Without It |
301
+ |:----|:-----|:-------------|:-----------------------|
302
+ | 1 | `๐Ÿ” search` | Live search across official Android/Kotlin docs | AI reasons from memory โ€” possibly wrong today |
303
+ | 2 | `โš ๏ธ component` | Deprecated/removed check on 40+ APIs | Compiles fine, breaks at runtime/review |
304
+ | 3 | `๐Ÿ“ architecture` | Guides for 40+ topics โ€” MVVM, Nav3, MVI... | AI gives 2022 advice; misses Nav3 |
305
+ | 4 | `๐Ÿ› debugger` | Parses stacktraces โ†’ searches Issue Tracker | AI hallucinates fixes for known bugs |
306
+ | 5 | `๐Ÿ“ฆ gradle` | Live lookup from Google Maven + BOM resolution | Stale Compose BOM, KAPT instead of KSP |
307
+ | 6 | `๐Ÿ“Š api-level` | API 21โ€“36 table, minSdk warnings | API 26+ calls in minSdk 21 apps |
308
+ | 7 | `๐ŸŽฏ kotlin` | 10 patterns โ€” coroutines, MVI, Compose state | `GlobalScope.launch`, `runBlocking` in UI |
309
+ | 8 | `๐ŸŽจ m3e` | Material 3 Expressive components & Motion | M2 MaterialTheme in M3E app |
310
+ | 9 | `๐Ÿ” permissions` | 40+ permissions rules & contracts | `deprecated requestPermissions()` |
311
+ | 10 | `๐Ÿงช testing` | Unit/Compose UI testing official patterns | `Thread.sleep()` in tests; missing Hilt |
312
+ | 11 | `๐Ÿ—๏ธ build` | R8, libs.versions.toml, signing, AAB | `implementation` instead of `ksp` |
313
+ | 12 | `๐Ÿ“ฑ large-screen` | WindowSizeClass (5 breakpoints incl. Large/XL), Adaptive Scaffolds | Phone-only layouts on foldables and desktops |
314
+ | 13 | `๐Ÿš€ scalability` | Paging 3, WorkManager, modularization | Naive `loadAll()`; unstable keys in lists |
315
+ | 14 | `๐Ÿงญ nav3` | Nav3 (Nov 2025) โ€” Scenes, migration | AI generates Nav2 dead-ends |
316
+ | 15 | `โœ… compliance` | API 36 / Android 16 / 16 KB page size | Apps fail Play Store August 2026 mandate |
317
+ | 16 | `๐ŸŒ kmp` | Room KMP, Ktor, source sets, Room 3.0 alpha | Android-only code in KMP projects |
318
+ | 17 | `๐Ÿค– ondevice-ai` | AICore, ML Kit Gen AI, Gemini Nano | Cloud-only AI when offline is required |
319
+ | 18 | `๐Ÿ“‹ policy` | Play Store age-gating, billing openness, data safety | Apps rejected for unknown policy changes |
320
+ | 19 | `๐Ÿฅฝ xr` | Android XR SDK, SpatialPanel, Orbiter | Works as 2D panel, misses spatial value |
321
+ | 20 | `โŒš wear` | Tiles, Health, M3 Expressive for Wear OS | Handheld patterns on round displays |
322
+ | 21 | `๐Ÿ›ก๏ธ validator` | Level 3 loop-back validation gate โ€” 31 rules | AI ships broken code without checking |
323
+ | 22 | `๐Ÿ†• api17` | Android 17 / API 37 โ€” static final, LAN, OTP, Handoff | Apps crash or fail Play Store on API 37 |
324
+
325
+ ---
326
+
327
+ ## ๐Ÿš€ Quick Start โ€” Zero Install Required
328
+
329
+ ### Option 1 โ€” Interactive CLI (v1.7.0) โœจ Recommended
330
+
331
+ ```bash
332
+ npx -y androjack-mcp@1.7.0 install
333
+ ```
334
+
335
+ Launches a full animated terminal wizard with auto-detection for **VS Code, Cursor, Claude, Windsurf, JetBrains, Kiro, and Antigravity.**
336
+
337
+ ### Option 2 โ€” Targeted Installs
338
+
339
+ ```bash
340
+ # Preview detected IDEs and config paths
341
+ npx -y androjack-mcp@1.7.0 install --list
342
+
343
+ # Auto-detect all
344
+ npx -y androjack-mcp@1.7.0 install --auto
345
+
346
+ # Install to a specific IDE
347
+ npx -y androjack-mcp@1.7.0 install --ide=cursor
348
+ npx -y androjack-mcp@1.7.0 install --ide=claude
349
+ npx -y androjack-mcp@1.7.0 install --ide=vscode
350
+ npx -y androjack-mcp@1.7.0 install --ide=windsurf
351
+ npx -y androjack-mcp@1.7.0 install --ide=jetbrains
352
+ npx -y androjack-mcp@1.7.0 install --ide=kiro
353
+ npx -y androjack-mcp@1.7.0 install --ide=antigravity
354
+ ```
355
+
356
+ ### Option 3 โ€” Test Without an IDE
357
+
358
+ ```bash
359
+ npx -y @modelcontextprotocol/inspector npx -y androjack-mcp@1.7.0
360
+ ```
361
+
362
+ ---
363
+
364
+ ## ๐Ÿงฉ Manual Config / Copy / Paste
365
+
366
+ If you prefer to wire the server manually, or want to inspect the exact JSON before writing anything:
367
+
368
+ - Run `npx -y androjack-mcp@1.7.0 install --list` to preview detected IDEs and target config paths.
369
+ - Ready-to-paste examples live in [`config/`](config/).
370
+
371
+ | IDE / Client | Config file |
372
+ |:-------------|:------------|
373
+ | Claude Desktop | [`config/claude_desktop_config.json`](config/claude_desktop_config.json) |
374
+ | Cursor | [`config/cursor_mcp.json`](config/cursor_mcp.json) |
375
+ | VS Code / GitHub Copilot | [`config/vscode_mcp.json`](config/vscode_mcp.json) |
376
+ | Windsurf | [`config/windsurf_mcp.json`](config/windsurf_mcp.json) |
377
+ | Android Studio / IntelliJ | [`config/jetbrains_mcp.json`](config/jetbrains_mcp.json) |
378
+ | AWS Kiro | [`config/kiro_mcp.json`](config/kiro_mcp.json) |
379
+ | Google Antigravity | [`config/antigravity_mcp.json`](config/antigravity_mcp.json) |
380
+
381
+ Every example keeps AndroJack local by default and runs the published package via `npx -y androjack-mcp@1.7.0`.
382
+
383
+ ---
384
+
385
+ ## ๐Ÿ“ The Ecosystem: AndroJack vs. Other MCPs
386
+
387
+ | Feature | Google Developer Knowledge MCP | AndroJack MCP |
388
+ |:--------|:-------------------------------|:--------------|
389
+ | **Identity** | The Librarian (Information) | The Gatekeeper (Enforcement) |
390
+ | **Mechanism** | Context Retrieval | Context Enforcement |
391
+ | **Scope** | Generalist โ€” Firebase, Cloud, Maps | Android engineering specialist |
392
+ | **Tools** | 3 retrieval tools | 22 specialized tools |
393
+ | **Setup** | Google Cloud project + API key required | `npx androjack-mcp@1.7.0` โ€” zero auth |
394
+ | **Enforcement** | Passive โ€” AI decides when to retrieve | Active โ€” mandating calls by task type |
395
+
396
+ ---
397
+
398
+ ## ๐Ÿ”’ Security & Privacy
399
+
400
+ | Property | Implementation |
401
+ |:---------|:---------------|
402
+ | **Domain allowlist** | Requests only to Google/Android/Kotlin official domains |
403
+ | **HTTPS only** | Outbound documentation fetches refuse non-HTTPS URLs, cap body size, and redact query strings in retry logs |
404
+ | **Local by default** | `serve` binds to loopback only unless you explicitly pass `--allow-remote` |
405
+ | **HTTP hardening** | Streamable HTTP validates `Origin` and `Host` headers and caps request bodies and active sessions |
406
+ | **Transparent agent** | `User-Agent: AndroJack-MCP/1.7.0` |
407
+ | **Read-only** | All 22 tools annotated `readOnlyHint: true` |
408
+ | **Zero credentials** | No API keys or tokens required for documentation fetching |
409
+ | **Security policy** | Disclosure process and supported versions in [SECURITY.md](SECURITY.md) |
410
+
411
+ ---
412
+
413
+ ## ๐Ÿ“‹ Changelog
414
+
415
+ ### v1.7.0 โ€” Android 17 / API 37 Coverage + WindowManager 1.5.0
416
+
417
+ - **Tool 22: `android_api17_compliance`** โ€” Android 17 platform stable (March 26, 2026). Covers `static final` reflection block, `ACCESS_LOCAL_NETWORK` permission, SMS OTP 3-hour delay, extended large-screen mandate, Handoff API, NPU feature declaration.
418
+ - **31 validator rules** (was 24) โ€” 7 new rules including `API37_STATIC_FINAL_REFLECTION`, Room 3.0 removal rules, deprecated `calculateWindowSizeClass()`.
419
+ - **WindowManager 1.5.0** โ€” Large (1200dp) and Extra-large (1600dp) breakpoints added to `android_large_screen_guide`. Three-pane and four-pane layout patterns included.
420
+ - **Room 3.0 alpha** โ€” `SupportSQLiteOpenHelper` and `SupportSQLiteDatabase` removal documented in `android_kmp_guide` and component registry.
421
+ - **Play billing openness** โ€” March 4, 2026 policy update in `android_play_policy_advisor`.
422
+ - **Fix** โ€” `billingOpenness` compile error in `play-policy.ts` resolved.
423
+
424
+ ---
425
+
426
+ ## ๐Ÿ‘ฅ Authorship & Ownership
427
+
428
+ **Vikas Sahani** โ€” Product Lead (vikassahani17@gmail.com)
429
+ **Claude AI** โ€” AI Engineering Lead
430
+
431
+ ---
432
+
433
+ <div align="center">
434
+
435
+ MIT License ยฉ 2026 Vikas Sahani | [SECURITY.md](SECURITY.md)
436
+
437
+ *Built because 35% of Stack Overflow visits in 2025 are developers debugging AI-generated code.*
438
+ *AndroJack exists so none of those visits are yours.*
439
+
440
+ </div>