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.
- package/README.md +881 -661
- package/build/cache.js +75 -0
- package/build/http-server.js +1 -1
- package/build/index.js +121 -64
- package/build/rules/android-rules.js +318 -0
- package/build/serve.js +471 -0
- package/build/tools/api36-compliance.js +259 -259
- package/build/tools/build-publish.js +324 -324
- package/build/tools/kmp.js +325 -325
- package/build/tools/kotlin-patterns.js +361 -361
- package/build/tools/large-screen.js +316 -316
- package/build/tools/m3-expressive.js +371 -371
- package/build/tools/navigation3.js +295 -295
- package/build/tools/ondevice-ai.js +262 -262
- package/build/tools/permissions.js +91 -91
- package/build/tools/play-policy.js +194 -194
- package/build/tools/scalability.js +567 -567
- package/build/tools/testing.js +395 -395
- package/build/tools/validator.js +102 -0
- package/build/tools/wear.js +314 -314
- package/build/tools/xr.js +250 -250
- package/package.json +73 -68
- package/src/cache.ts +93 -0
- package/src/constants.ts +436 -436
- package/src/http-server.ts +186 -186
- package/src/http.ts +190 -190
- package/src/index.ts +765 -701
- package/src/install.ts +710 -710
- package/src/logger.ts +67 -67
- package/src/rules/android-rules.ts +390 -0
- package/src/serve.ts +511 -0
- package/src/tools/api-level.ts +198 -198
- package/src/tools/api36-compliance.ts +289 -289
- package/src/tools/architecture.ts +94 -94
- package/src/tools/build-publish.ts +379 -379
- package/src/tools/component.ts +106 -106
- package/src/tools/debugger.ts +111 -111
- package/src/tools/gradle.ts +288 -288
- package/src/tools/kmp.ts +352 -352
- package/src/tools/kotlin-patterns.ts +534 -534
- package/src/tools/large-screen.ts +391 -391
- package/src/tools/m3-expressive.ts +473 -473
- package/src/tools/navigation3.ts +338 -338
- package/src/tools/ondevice-ai.ts +287 -287
- package/src/tools/permissions.ts +445 -445
- package/src/tools/play-policy.ts +229 -229
- package/src/tools/scalability.ts +646 -646
- package/src/tools/search.ts +112 -112
- package/src/tools/testing.ts +460 -460
- package/src/tools/validator.ts +130 -0
- package/src/tools/wear.ts +343 -343
- 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
|
-

|
|
10
|
-
|
|
11
|
-
### π¬ See AndroJack in Action
|
|
12
|
-
|
|
13
|
-
[](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
|
-
[](https://www.npmjs.com/package/androjack-mcp)
|
|
20
|
-
[](https://github.com/VIKAS9793/AndroJack-mcp/stargazers)
|
|
21
|
-
[](https://modelcontextprotocol.io)
|
|
23
|
-
[](https://typescriptlang.org)
|
|
24
|
-
[](LICENSE)
|
|
26
|
-
[](https://developer.android.com)
|
|
27
|
-
|
|
28
|
-
### π One-Click Install
|
|
29
|
-
|
|
30
|
-
[](https://claude.ai/integrations/install-mcp?params=eyJuYW1lIjoiYW5kcm9qYWNrIiwiY29tbWFuZCI6Im5weCIsImFyZ3MiOlsiLXkiLCJhbmRyb2phY2stbWNwIl19)
|
|
31
|
-
[](https://cursor.com/install-mcp?name=androjack&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImFuZHJvamFjay1tY3AiXX0=)
|
|
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%22%5D%7D)
|
|
33
|
-
[](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
|
|
106
|
-
|
|
107
|
-
> **It does not make the AI smarter. It makes the AI accountable to evidence.**
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
**Level
|
|
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
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
-
|
|
303
|
-
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
---
|
|
487
|
-
|
|
488
|
-
##
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
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
|
+

|
|
10
|
+
|
|
11
|
+
### π¬ See AndroJack in Action
|
|
12
|
+
|
|
13
|
+
[](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
|
+
[](https://www.npmjs.com/package/androjack-mcp)
|
|
20
|
+
[](https://github.com/VIKAS9793/AndroJack-mcp/stargazers)
|
|
21
|
+
[](https://nodejs.org)
|
|
22
|
+
[](https://modelcontextprotocol.io)
|
|
23
|
+
[](https://typescriptlang.org)
|
|
24
|
+
[](#-the-21-tools)
|
|
25
|
+
[](LICENSE)
|
|
26
|
+
[](https://developer.android.com)
|
|
27
|
+
|
|
28
|
+
### π One-Click Install
|
|
29
|
+
|
|
30
|
+
[](https://claude.ai/integrations/install-mcp?params=eyJuYW1lIjoiYW5kcm9qYWNrIiwiY29tbWFuZCI6Im5weCIsImFyZ3MiOlsiLXkiLCJhbmRyb2phY2stbWNwIl19)
|
|
31
|
+
[](https://cursor.com/install-mcp?name=androjack&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImFuZHJvamFjay1tY3AiXX0=)
|
|
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%22%5D%7D)
|
|
33
|
+
[](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
|
+
[](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 & 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>
|