androjack-mcp 1.6.3 → 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.
- package/README.md +424 -306
- package/build/constants.js +21 -0
- package/build/http-server.js +75 -60
- package/build/install.js +53 -9
- package/build/rules/android-rules.js +22 -0
- package/build/serve.js +23 -380
- package/build/server-factory.js +622 -0
- package/build/stdio.js +10 -585
- package/build/tools/android17-compliance.js +285 -0
- package/build/tools/api36-compliance.js +271 -259
- package/build/tools/build-publish.js +459 -326
- package/build/tools/kmp.js +377 -327
- package/build/tools/large-screen.js +424 -316
- package/build/tools/permissions.js +110 -91
- package/build/tools/play-policy.js +249 -195
- package/build/version.js +1 -1
- package/config/antigravity_mcp.json +1 -1
- package/config/claude_desktop_config.json +1 -1
- package/config/cursor_mcp.json +1 -1
- package/config/jetbrains_mcp.json +2 -2
- package/config/kiro_mcp.json +4 -4
- package/config/vscode_mcp.json +1 -1
- package/config/windsurf_mcp.json +1 -1
- package/manifest.json +2 -2
- package/package.json +22 -22
- package/server.json +2 -2
- package/src/cli-entry.ts +6 -6
- package/src/constants.ts +453 -432
- package/src/http-server.ts +264 -225
- package/src/http.ts +79 -79
- package/src/index.ts +77 -77
- package/src/install.ts +112 -66
- package/src/rules/android-rules.ts +415 -390
- package/src/serve.ts +82 -474
- package/src/server-factory.ts +782 -0
- package/src/stdio.ts +22 -750
- package/src/tools/android17-compliance.ts +292 -0
- package/src/tools/api36-compliance.ts +306 -289
- package/src/tools/build-publish.ts +513 -379
- package/src/tools/kmp.ts +403 -352
- package/src/tools/large-screen.ts +501 -391
- package/src/tools/permissions.ts +464 -445
- package/src/tools/play-policy.ts +284 -229
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -1,322 +1,440 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
###
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<br/>
|
|
19
|
-
|
|
20
|
-
[](https://www.npmjs.com/package/androjack-mcp)
|
|
21
|
-
[](https://marketplace.visualstudio.com/items?itemName=VIKAS9793.androjack-vscode)
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+

|
|
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
|
+
[](https://www.npmjs.com/package/androjack-mcp)
|
|
16
|
+
[](https://marketplace.visualstudio.com/items?itemName=VIKAS9793.androjack-vscode)
|
|
22
17
|
[](https://github.com/VIKAS9793/AndroJack-mcp/stargazers)
|
|
23
|
-
[](https://github.com/VIKAS9793/AndroJack-mcp/graphs/traffic)
|
|
19
|
+
[](#-the-22-tools)
|
|
24
20
|
[](https://modelcontextprotocol.io)
|
|
25
21
|
[](https://typescriptlang.org)
|
|
26
|
-
[](https://nodejs.org)
|
|
23
|
+
[](https://developer.android.com)
|
|
27
24
|
[](LICENSE)
|
|
28
25
|
[](SECURITY.md)
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
[ below ↓
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
>
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
> [!
|
|
182
|
-
>
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
26
|
+
|
|
27
|
+
<br/>
|
|
28
|
+
|
|
29
|
+
[](https://marketplace.visualstudio.com/items?itemName=VIKAS9793.androjack-vscode)
|
|
30
|
+
[](https://claude.ai/integrations/install-mcp?params=eyJuYW1lIjoiYW5kcm9qYWNrIiwiY29tbWFuZCI6Im5weCIsImFyZ3MiOlsiLXkiLCJhbmRyb2phY2stbWNwQDEuNy4wIl19)
|
|
31
|
+
[](https://cursor.com/install-mcp?name=androjack&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImFuZHJvamFjay1tY3BAMS43LjAiXX0=)
|
|
32
|
+
[](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
|
+
[](https://www.npmjs.com/package/androjack-mcp)
|
|
34
|
+
|
|
35
|
+
<br/>
|
|
36
|
+
|
|
37
|
+
[](https://androjack-web.netlify.app/)
|
|
38
|
+
[](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
|
+
|
|
262
331
|
```bash
|
|
263
|
-
npx androjack-mcp@1.
|
|
332
|
+
npx -y androjack-mcp@1.7.0 install
|
|
264
333
|
```
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
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
|
+
|
|
268
339
|
```bash
|
|
340
|
+
# Preview detected IDEs and config paths
|
|
341
|
+
npx -y androjack-mcp@1.7.0 install --list
|
|
342
|
+
|
|
269
343
|
# Auto-detect all
|
|
270
|
-
npx androjack-mcp@1.
|
|
344
|
+
npx -y androjack-mcp@1.7.0 install --auto
|
|
271
345
|
|
|
272
|
-
# Install to specific IDE
|
|
273
|
-
npx androjack-mcp@1.
|
|
274
|
-
npx androjack-mcp@1.
|
|
275
|
-
npx androjack-mcp@1.
|
|
276
|
-
npx androjack-mcp@1.
|
|
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
|
|
277
354
|
```
|
|
278
|
-
|
|
279
|
-
### Option 3 — Test
|
|
355
|
+
|
|
356
|
+
### Option 3 — Test Without an IDE
|
|
357
|
+
|
|
280
358
|
```bash
|
|
281
|
-
npx @modelcontextprotocol/inspector npx -y androjack-mcp@1.
|
|
359
|
+
npx -y @modelcontextprotocol/inspector npx -y androjack-mcp@1.7.0
|
|
282
360
|
```
|
|
283
|
-
|
|
284
|
-
---
|
|
285
|
-
|
|
286
|
-
##
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
|
294
|
-
|
|
295
|
-
|
|
|
296
|
-
|
|
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
|
+
|
|
297
398
|
## 🔒 Security & Privacy
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
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
|
+
---
|
|
306
412
|
|
|
307
413
|
## 📋 Changelog
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
- **
|
|
312
|
-
- **
|
|
313
|
-
- **
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
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>
|