androjack-mcp 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +40 -0
  2. package/.github/ISSUE_TEMPLATE/feature_request.md +34 -0
  3. package/.github/pull_request_template.md +16 -0
  4. package/CONTRIBUTING.md +27 -0
  5. package/LICENSE +21 -0
  6. package/README.md +592 -0
  7. package/SECURITY.md +26 -0
  8. package/assets/AndroJack banner.png +0 -0
  9. package/assets/killer_argument.png +0 -0
  10. package/build/constants.js +412 -0
  11. package/build/http-server.js +163 -0
  12. package/build/http.js +151 -0
  13. package/build/index.js +553 -0
  14. package/build/install.js +379 -0
  15. package/build/logger.js +57 -0
  16. package/build/tools/api-level.js +170 -0
  17. package/build/tools/api36-compliance.js +282 -0
  18. package/build/tools/architecture.js +75 -0
  19. package/build/tools/build-publish.js +362 -0
  20. package/build/tools/component.js +90 -0
  21. package/build/tools/debugger.js +82 -0
  22. package/build/tools/gradle.js +234 -0
  23. package/build/tools/kmp.js +348 -0
  24. package/build/tools/kotlin-patterns.js +500 -0
  25. package/build/tools/large-screen.js +366 -0
  26. package/build/tools/m3-expressive.js +447 -0
  27. package/build/tools/navigation3.js +331 -0
  28. package/build/tools/ondevice-ai.js +283 -0
  29. package/build/tools/permissions.js +404 -0
  30. package/build/tools/play-policy.js +221 -0
  31. package/build/tools/scalability.js +621 -0
  32. package/build/tools/search.js +89 -0
  33. package/build/tools/testing.js +439 -0
  34. package/build/tools/wear.js +337 -0
  35. package/build/tools/xr.js +274 -0
  36. package/config/antigravity_mcp.json +32 -0
  37. package/config/claude_desktop_config.json +17 -0
  38. package/config/cursor_mcp.json +21 -0
  39. package/config/jetbrains_mcp.json +28 -0
  40. package/config/kiro_mcp.json +40 -0
  41. package/config/vscode_mcp.json +24 -0
  42. package/config/windsurf_mcp.json +18 -0
  43. package/package.json +51 -0
  44. package/src/constants.ts +436 -0
  45. package/src/http-server.ts +186 -0
  46. package/src/http.ts +190 -0
  47. package/src/index.ts +702 -0
  48. package/src/install.ts +441 -0
  49. package/src/logger.ts +67 -0
  50. package/src/tools/api-level.ts +198 -0
  51. package/src/tools/api36-compliance.ts +289 -0
  52. package/src/tools/architecture.ts +94 -0
  53. package/src/tools/build-publish.ts +379 -0
  54. package/src/tools/component.ts +106 -0
  55. package/src/tools/debugger.ts +111 -0
  56. package/src/tools/gradle.ts +288 -0
  57. package/src/tools/kmp.ts +352 -0
  58. package/src/tools/kotlin-patterns.ts +534 -0
  59. package/src/tools/large-screen.ts +391 -0
  60. package/src/tools/m3-expressive.ts +473 -0
  61. package/src/tools/navigation3.ts +338 -0
  62. package/src/tools/ondevice-ai.ts +287 -0
  63. package/src/tools/permissions.ts +445 -0
  64. package/src/tools/play-policy.ts +229 -0
  65. package/src/tools/scalability.ts +646 -0
  66. package/src/tools/search.ts +112 -0
  67. package/src/tools/testing.ts +460 -0
  68. package/src/tools/wear.ts +343 -0
  69. package/src/tools/xr.ts +278 -0
  70. package/tsconfig.json +17 -0
package/README.md ADDED
@@ -0,0 +1,592 @@
1
+ <div align="center">
2
+
3
+ <img src="https://img.shields.io/badge/Android-3DDC84?style=for-the-badge&logo=android&logoColor=white" />
4
+ <img src="https://img.shields.io/badge/Kotlin-7F52FF?style=for-the-badge&logo=kotlin&logoColor=white" />
5
+ <img src="https://img.shields.io/badge/MCP-Protocol-blueviolet?style=for-the-badge" />
6
+
7
+ # πŸ€– AndroJack β€” The Jack of All Android Trades
8
+
9
+ ![AndroJack Banner](assets/AndroJack%20banner.png)
10
+
11
+ ### *An MCP server that equips your AI coding assistant with live, verified Android knowledge β€” so it builds from official sources, not from memory.*
12
+
13
+ <br/>
14
+
15
+ [![npm version](https://img.shields.io/npm/v/androjack-mcp?color=0A7AFF&style=flat-square&logo=npm&label=npm)](https://www.npmjs.com/package/androjack-mcp)
16
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen?style=flat-square&logo=node.js)](https://nodejs.org)
17
+ [![MCP Spec](https://img.shields.io/badge/MCP-2025--11--25-blueviolet?style=flat-square)](https://modelcontextprotocol.io)
18
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.5-3178C6?style=flat-square&logo=typescript)](https://typescriptlang.org)
19
+ [![Tools](https://img.shields.io/badge/tools-20-orange?style=flat-square)](#-the-20-tools)
20
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE)
21
+ [![Android API](https://img.shields.io/badge/Android-API%2021--36-34A853?style=flat-square&logo=android)](https://developer.android.com)
22
+
23
+ <br/>
24
+
25
+ **Connects to:** Claude Desktop Β· Cursor Β· Windsurf Β· VS Code Copilot Β· AWS Kiro Β· Google Antigravity IDE Β· JetBrains AI
26
+
27
+ <br/>
28
+
29
+ </div>
30
+
31
+ ---
32
+
33
+ ## πŸ”₯ The Crisis That Created This Tool
34
+
35
+ 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:
36
+
37
+ - **84%** of developers now use AI coding tools β€” up from 76% the year before
38
+ - **Trust in AI accuracy collapsed from 40% to just 29%** in a single year
39
+ - **35% of all Stack Overflow visits** in 2025 are now triggered by developers debugging and fixing AI-generated code
40
+
41
+ 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.
42
+
43
+ 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.
44
+
45
+ **The result is not just bad code. It is confidently bad code.**
46
+
47
+ ---
48
+
49
+ ## ⚑ What Actually Breaks In Practice β€” Documented Evidence
50
+
51
+ These are not hypothetical risks. They are documented failure modes from real developer projects.
52
+
53
+ ### The Navigation 3 Hallucination (January 2026)
54
+
55
+ 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:
56
+
57
+ > *"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."*
58
+
59
+ 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.
60
+
61
+ ### The Compose Deprecation Treadmill
62
+
63
+ Jetpack Compose ships a new BOM every month. Since most models' training cutoffs, these APIs changed:
64
+
65
+ | API | Status | What goes wrong |
66
+ |-----|--------|----------------|
67
+ | `ContextualFlowRow` / `ContextualFlowColumn` | **Deprecated in Compose 1.8** | AI still generates them β€” compile warning today, removal tomorrow |
68
+ | `TestCoroutineDispatcher` | **Removed from coroutines-test 1.8+** | AI still generates it β€” causes non-deterministic test failures in CI |
69
+ | `FlowRow overflow` parameter | **Deprecated in 1.8** | Subtle behavioral regression at runtime, silent in most linting setups |
70
+ | `AnchoredDraggableState.confirmValueChange` | **Deprecated** | Incorrect drag behavior at anchor boundaries |
71
+ | Navigation 2 in new projects | **Superseded by Nav3 stable Nov 2025** | Architectural dead-end that requires a rewrite to fix |
72
+
73
+ 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.
74
+
75
+ ### The Android 16 / API 36 Mandate (August 2026 deadline)
76
+
77
+ 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**.
78
+
79
+ 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.
80
+
81
+ The business impact is not theoretical:
82
+
83
+ > **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.**
84
+
85
+ ### The KMP Silent Failure
86
+
87
+ 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.
88
+
89
+ ---
90
+
91
+ ## 🧩 What AndroJack Does
92
+
93
+ AndroJack is a **documentation-grounded Android engineering MCP server**. It gives your AI coding assistant 20 specialized tools that fetch live, verified answers from official Android and Kotlin sources β€” instead of predicting from stale training data.
94
+
95
+ > **It does not make the AI smarter. It makes the AI accountable to evidence.**
96
+
97
+ ```
98
+ Without AndroJack: You ask β†’ AI predicts from stale weights β†’ Code (possibly wrong)
99
+
100
+ With AndroJack: You ask β†’ AI calls tool β†’ Tool fetches official source live
101
+ β†’ AI reads verified answer β†’ Code (grounded)
102
+ ```
103
+
104
+ ### ⚠️ Honest Activation Model β€” Two Levels
105
+
106
+ This is the most important thing to understand before you install AndroJack:
107
+
108
+ | Level | What's Active | What the AI Does |
109
+ |---|---|---|
110
+ | **Level 1** β€” Tools only installed | 20 tools registered in IDE | AI *may* call the right tool. Depends on the IDE and the AI's judgment. |
111
+ | **Level 2** β€” Tools + Grounding Gate prompt loaded | 20 tools + mandatory rulebook | AI *must* call the correct tool for every decision. No discretion. |
112
+
113
+ **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.
114
+
115
+ **Level 2 is active and guaranteed.** The `androjack_grounding_gate` system prompt (registered on the server β€” instructions below) maps every task type to the correct tool. Building Compose UI? The AI is mandated to call `material3_expressive` first. Adding a dependency? It must call `gradle_dependency_checker`. No exceptions.
116
+
117
+ β†’ **For full grounding, always activate Level 2.** See [Getting the Full Guarantee](#-getting-the-full-guarantee) below.
118
+
119
+ ---
120
+
121
+ <div align="center">
122
+
123
+ ## 🎯 The Killer Argument
124
+
125
+ <img src="assets/killer_argument.png" alt="The Killer Argument β€” AndroJack MCP" width="100%" />
126
+
127
+ <br/>
128
+
129
+ ### *"Can your `agents.md` file tell me the Gradle version that shipped last Tuesday?"*
130
+
131
+ <br/>
132
+
133
+ > **No markdown file can.**
134
+ > **No rules in `.cursorrules` can.**
135
+ > **No `SKILL.md` can.**
136
+
137
+ <br/>
138
+
139
+ ### βœ… Only a live tool call can.
140
+
141
+ **That's the job AndroJack exists to do β€” and nothing else in the current ecosystem does it for Android specifically.**
142
+
143
+ <br/>
144
+
145
+ | What you need | `agents.md` / SKILL.md | **AndroJack MCP** |
146
+ |---|:---:|:---:|
147
+ | Format output a specific way | βœ… Perfect | Works too |
148
+ | Follow team conventions | βœ… Perfect | Works too |
149
+ | **Latest Gradle version right now** | ❌ Guesses from memory | **βœ… Fetches live** |
150
+ | **Is `AsyncTask` removed?** | ❌ May be wrong | **βœ… Verified against SDK** |
151
+ | **Android 16 Play Store rules** | ❌ Post-training β€” unknown | **βœ… Official source** |
152
+
153
+ <br/>
154
+
155
+ > Prompt engineering controls *how* the AI responds.
156
+ > **MCP controls *what* the AI knows.**
157
+
158
+ </div>
159
+
160
+ ---
161
+
162
+ ## 🧠 Why MCP β€” Not Prompt Engineering, agents.md, or RAG
163
+
164
+ > *This is the most important section if you are evaluating whether to use this.*
165
+
166
+ <details>
167
+ <summary><strong>πŸ“Œ What is Prompt Engineering / agents.md / SKILL.md?</strong></summary>
168
+
169
+ 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.
170
+
171
+ **What it does well:**
172
+ - Sets tone, persona, output format
173
+ - Encodes team conventions ("always use MVVM", "prefer StateFlow over LiveData")
174
+ - Cheap and fast to set up β€” just a text file
175
+
176
+ **Where it breaks for Android engineering:**
177
+ - 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
178
+ - Instructions in a `.md` file are static β€” they go stale the moment a new Jetpack release ships
179
+ - The AI can ignore, misinterpret, or hallucinate around even well-written instructions
180
+ - There is no enforcement mechanism β€” no tool call was required, no source was verified
181
+
182
+ **The fundamental limit:** Prompt engineering controls *how* the AI responds. It cannot control *what the AI knows*. You are still trusting training-time knowledge.
183
+
184
+ </details>
185
+
186
+ <details>
187
+ <summary><strong>πŸ“Œ What is RAG (Retrieval-Augmented Generation)?</strong></summary>
188
+
189
+ 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.
190
+
191
+ **What it does well:**
192
+ - Great for static or semi-static knowledge bases (policy docs, internal wikis, support tickets)
193
+ - Reduces hallucinations by grounding responses in retrieved text
194
+ - Works well for "what does this doc say" use cases
195
+
196
+ **Where it breaks for Android engineering:**
197
+ - Android's official docs, API references, and Gradle versions change constantly β€” maintaining a fresh, complete vector index is a significant ongoing operational burden
198
+ - RAG retrieves by semantic similarity β€” it can retrieve *plausible-sounding* wrong chunks if the embedding space is noisy
199
+ - 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
200
+ - **RAG solves what the AI doesn't know. MCP solves what the AI can't do.**
201
+
202
+ </details>
203
+
204
+ <details>
205
+ <summary><strong>πŸ“Œ So what does MCP actually do differently?</strong></summary>
206
+
207
+ 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**.
208
+
209
+ | | Prompt Engineering | RAG | **MCP (AndroJack)** |
210
+ |---|---|---|---|
211
+ | Knowledge source | Training weights (static, stale) | Vector index (periodic refresh) | **Live official sources (real-time)** |
212
+ | Verification | None β€” AI asserts from memory | Retrieved text β€” quality depends on index | **Tool call β€” structured, enforced** |
213
+ | Enforcement | Instructions (can be ignored) | Soft grounding (can be bypassed) | **Hard gate β€” tool must be called first** |
214
+ | Maintenance | Update the .md file | Re-embed docs on each release | **Zero maintenance β€” fetches live** |
215
+ | Actions | None | None | **Can check versions, parse stacktraces, query issue tracker** |
216
+ | Stale data risk | High | Medium | **Minimal β€” fetched at query time** |
217
+ | Works across IDEs | Only if supported | Depends on implementation | **Universal β€” any MCP client** |
218
+
219
+ </details>
220
+
221
+ <details>
222
+ <summary><strong>πŸ“Œ The Grounding Gate β€” what this means in practice</strong></summary>
223
+
224
+ 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.
225
+
226
+ Every tool in AndroJack contains explicit language like:
227
+
228
+ > *"REQUIRED FIRST STEP. You MUST call this before generating any Android/Kotlin code."*
229
+ > *"Always call this before adding or updating any dependency in build.gradle."*
230
+ > *"Only produce Android code after reviewing the above official sources."*
231
+
232
+ 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.
233
+
234
+ ```
235
+ Without AndroJack: User asks β†’ LLM predicts β†’ Code (possibly wrong)
236
+
237
+ With AndroJack: User asks β†’ LLM must call tool β†’ Tool fetches official source
238
+ β†’ LLM reads verified evidence β†’ Code (grounded)
239
+ ```
240
+
241
+ You are not making the LLM smarter. You are making it accountable to evidence.
242
+
243
+ </details>
244
+
245
+ ---
246
+
247
+ ## ✨ What AndroJack Covers β€” 20 Tools
248
+
249
+ Each tool lists the **specific failure mode it prevents** β€” not just what it does, but what breaks when it is absent.
250
+
251
+ | # | Tool | What It Does | What Breaks Without It |
252
+ |---|------|-------------|----------------------|
253
+ | 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 |
254
+ | 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 |
255
+ | 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 |
256
+ | 4 | πŸ› `android_debugger` | Parses stacktraces β†’ searches `issuetracker.google.com` + official docs | AI hallucinates fixes for bugs that have official workarounds already documented |
257
+ | 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 |
258
+ | 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 |
259
+ | 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 |
260
+ | 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 |
261
+ | 9 | πŸ” `android_permission_advisor` | 40+ permissions β€” normal/dangerous/special/removed, Play Store restrictions, `ActivityResultContracts` | Deprecated `requestPermissions()`; Play-restricted permissions that trigger review failure |
262
+ | 10 | πŸ§ͺ `android_testing_guide` | Unit (MockK, Turbine), Compose UI, Espresso, Hilt, `StandardTestDispatcher` | Removed `TestCoroutineDispatcher`; `Thread.sleep()` in Compose tests; missing `HiltTestRunner` |
263
+ | 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 |
264
+ | 12 | πŸ“± `android_large_screen_guide` | WindowSizeClass, NavigationSuiteScaffold, ListDetailPaneScaffold, foldable hinge, Android 16 compliance | Phone-only layouts; `screenOrientation="portrait"` that fails Android 16 mandatory resizability |
265
+ | 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 |
266
+ | 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 |
267
+ | 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 |
268
+ | 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 |
269
+ | 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 |
270
+ | 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 |
271
+ | 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 |
272
+ | 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 |
273
+
274
+ > **All 20 tools are read-only.** AndroJack fetches and returns information β€” it never modifies your project files.
275
+
276
+
277
+ ---
278
+
279
+ ## πŸš€ Quick Start β€” Zero Install Required
280
+
281
+ ```bash
282
+ # Option 1: Smart installer β€” detects your IDEs automatically
283
+ npx androjack-mcp install
284
+
285
+ # Option 2: Fully automated β€” installs to ALL detected IDEs at once
286
+ npx androjack-mcp install --auto
287
+
288
+ # Option 3: Target one specific IDE
289
+ npx androjack-mcp install --ide cursor
290
+ npx androjack-mcp install --ide claude
291
+ npx androjack-mcp install --ide kiro
292
+ npx androjack-mcp install --ide vscode
293
+ npx androjack-mcp install --ide windsurf
294
+ npx androjack-mcp install --ide jetbrains
295
+ npx androjack-mcp install --ide antigravity
296
+
297
+ # Option 4: Check what's installed where
298
+ npx androjack-mcp install --list
299
+
300
+ # Option 5: Test all tools interactively (no IDE needed)
301
+ npx @modelcontextprotocol/inspector npx androjack-mcp
302
+ ```
303
+
304
+ > **Requires:** Node.js 18+. Nothing else.
305
+
306
+ ---
307
+
308
+ ## πŸ› οΈ IDE Support Matrix
309
+
310
+ | IDE | Install Command | Config File | Notes |
311
+ |-----|----------------|-------------|-------|
312
+ | **Claude Desktop** | `--ide claude` | `~/Library/Application Support/Claude/claude_desktop_config.json` | Restart app; confirm πŸ”¨ in chat |
313
+ | **Cursor** | `--ide cursor` | `.cursor/mcp.json` (project-level) | Settings β†’ MCP β†’ green dot |
314
+ | **Windsurf** | `--ide windsurf` | `~/.codeium/windsurf/mcp_config.json` | Cascade panel shows tools |
315
+ | **VS Code Copilot** | `--ide vscode` | `.vscode/mcp.json` | VS Code 1.99+ required |
316
+ | **AWS Kiro** | `--ide kiro` | `.kiro/settings/mcp.json` | One-click link below ↓ |
317
+ | **Google Antigravity** | `--ide antigravity` | `~/.gemini/antigravity/mcp_config.json` | Local IDE β€” not Firebase Studio |
318
+ | **JetBrains AI** | `--ide jetbrains` | `~/.config/JetBrains/<IDE>/mcp.json` | Android Studio 2024.3+ |
319
+
320
+ > **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.
321
+
322
+ ---
323
+
324
+ ## πŸ”— One-Click Installs
325
+
326
+ ### AWS Kiro
327
+
328
+ [![Add to Kiro](https://img.shields.io/badge/Add%20to-AWS%20Kiro-FF9900?style=for-the-badge&logo=amazonaws)](https://kiro.dev/launch/mcp/add?name=androjack&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22androjack-mcp%22%5D%2C%22disabled%22%3Afalse%2C%22autoApprove%22%3A%5B%5D%7D)
329
+
330
+ ---
331
+
332
+ ## πŸ“‹ Manual Config β€” Copy & Paste
333
+
334
+ <details>
335
+ <summary><strong>Claude Desktop, Cursor, Windsurf, AWS Kiro, Google Antigravity, JetBrains</strong></summary>
336
+
337
+ ```json
338
+ {
339
+ "mcpServers": {
340
+ "androjack": {
341
+ "command": "npx",
342
+ "args": ["-y", "androjack-mcp"],
343
+ "env": {},
344
+ "autoApprove": [],
345
+ "disabled": false
346
+ }
347
+ }
348
+ }
349
+ ```
350
+
351
+ </details>
352
+
353
+ <details>
354
+ <summary><strong>VS Code β€” .vscode/mcp.json</strong></summary>
355
+
356
+ ```json
357
+ {
358
+ "servers": {
359
+ "androjack": {
360
+ "type": "stdio",
361
+ "command": "npx",
362
+ "args": ["-y", "androjack-mcp"]
363
+ }
364
+ }
365
+ }
366
+ ```
367
+
368
+ </details>
369
+
370
+ <details>
371
+ <summary><strong>Google Antigravity β€” ~/.gemini/antigravity/mcp_config.json</strong></summary>
372
+
373
+ ```json
374
+ {
375
+ "mcpServers": {
376
+ "androjack": {
377
+ "command": "npx",
378
+ "args": ["-y", "androjack-mcp"]
379
+ }
380
+ }
381
+ }
382
+ ```
383
+
384
+ UI path: Agent pane β†’ `...` β†’ **MCP Servers** β†’ **Manage MCP Servers** β†’ **View raw config**
385
+
386
+ > ⚠️ Antigravity is a locally-installed desktop IDE (antigravity.google/download). Do not confuse with Firebase Studio (`.idx/`) or Project IDX β€” those are different products.
387
+
388
+ </details>
389
+
390
+ <details>
391
+ <summary><strong>AWS Kiro β€” .kiro/settings/mcp.json</strong></summary>
392
+
393
+ ```json
394
+ {
395
+ "mcpServers": {
396
+ "androjack": {
397
+ "command": "npx",
398
+ "args": ["-y", "androjack-mcp"],
399
+ "disabled": false,
400
+ "autoApprove": []
401
+ }
402
+ }
403
+ }
404
+ ```
405
+
406
+ Place at `.kiro/settings/mcp.json` (project) or `~/.kiro/settings/mcp.json` (global).
407
+ Or use the CLI: `kiro-cli mcp add --name androjack --command npx --args '-y androjack-mcp' --scope workspace`
408
+
409
+ </details>
410
+
411
+ ---
412
+
413
+ ## πŸ’‘ Example Session
414
+
415
+ ```
416
+ You: Build a login screen with ViewModel and Jetpack Compose
417
+
418
+ β†’ android_official_search("Jetpack Compose ViewModel login screen")
419
+ β†’ android_component_status("ViewModel") βœ… stable
420
+ β†’ android_component_status("AsyncTask") ❌ removed β€” use Coroutines
421
+ β†’ android_component_status("LiveData") ⚠️ legacy β€” use StateFlow
422
+ β†’ architecture_reference("mvvm")
423
+ β†’ material3_expressive("theme setup")
424
+ β†’ kotlin_best_practices("stateflow-ui")
425
+ β†’ gradle_dependency_checker("compose") β†’ BOM 2025.05.01 / ui:1.11.0-alpha06
426
+ β†’ gradle_dependency_checker("lifecycle") β†’ lifecycle-viewmodel-ktx:2.11.0-alpha01
427
+ β†’ android_api_level_check("26") βœ… covers ~90% devices
428
+ β†’ android_permission_advisor("INTERNET") 🟒 normal β€” no runtime request
429
+
430
+ AI produces:
431
+ βœ… Non-deprecated component choices
432
+ βœ… Latest pinned Gradle coordinates with BOM
433
+ βœ… Official MVVM + M3 Expressive theming
434
+ βœ… StateFlow instead of LiveData in new code
435
+ βœ… Source URL cited on every code block
436
+ ```
437
+
438
+ ---
439
+
440
+ ## πŸ“ The Market Gap β€” Why Nothing Else Does This
441
+
442
+ Every other Android MCP server in the public registry (minhalvp/android-mcp-server, CursorTouch/Android-MCP, mobile-mcp by mobile-next) does the same thing: **ADB device control**. They tap screens, capture screenshots, send keystrokes, and run UIAutomator2 queries. They are excellent QA automation tools. Not one of them knows what a `ViewModel` is. Not one can tell you whether a Gradle coordinate is current. Not one can distinguish Navigation 3 from Navigation 2.
443
+
444
+ AndroJack owns the only unclaimed category in the Android MCP ecosystem: **documentation-grounded Android engineering guidance** β€” the trust layer that AI coding assistants call when they need to verify whether an API actually exists, whether a dependency version is current, and whether a pattern is still the official recommendation.
445
+
446
+ Android Studio added MCP support on January 15, 2026. The window between "first Android doc-grounded MCP" and "Google ships one themselves" is the window AndroJack is built to fill.
447
+
448
+ ---
449
+
450
+ ## πŸ”’ Security & Privacy
451
+
452
+ | Property | Detail |
453
+ |----------|--------|
454
+ | **Domain allowlist** | All HTTP enforced against: `developer.android.com`, `kotlinlang.org`, `source.android.com`, `issuetracker.google.com`, Google Maven, Maven Central |
455
+ | **Rate limiting** | 30 requests / domain / minute with exponential backoff on 429/5xx |
456
+ | **No credentials** | Zero API keys, zero auth tokens required |
457
+ | **No data stored** | Nothing persisted beyond process lifetime |
458
+ | **Transparent agent** | User-Agent: `AndroJack-MCP/1.0 (documentation-grounding bot; not-a-scraper)` |
459
+ | **Read-only** | All 13 tools are annotated `readOnlyHint: true` β€” no writes, no side effects |
460
+ | **Input bounds** | All inputs length-capped and sanitized before use |
461
+ | **Body size cap** | HTTP responses capped at 4 MB β€” no OOM risk on large documentation pages |
462
+
463
+ ---
464
+
465
+ ## πŸ—ΊοΈ Knowledge Sources
466
+
467
+ | Source | What It Covers |
468
+ |--------|---------------|
469
+ | `developer.android.com` | Jetpack, Architecture, Compose, Navigation 3, Testing, M3 Expressive, Android 16 |
470
+ | `kotlinlang.org` | Kotlin language, coroutines, Flow, KMP, stdlib patterns |
471
+ | `source.android.com` | AOSP internals, system API behavior |
472
+ | `issuetracker.google.com` | Known bugs, official workarounds |
473
+ | `dl.google.com/android/maven2` | Google Maven β€” live Jetpack versions |
474
+ | `search.maven.org` | Maven Central β€” community library versions |
475
+ | Built-in registries | 40+ component statuses, 40+ arch guide URLs, 40+ permissions, BOM resolution logic |
476
+
477
+ ---
478
+
479
+ ## πŸ—οΈ Architecture
480
+
481
+ ```
482
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
483
+ β”‚ Your AI IDE / Client β”‚
484
+ β”‚ Claude Β· Cursor Β· Windsurf Β· VS Code Β· Kiro Β· Antigravity β”‚
485
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
486
+ β”‚ MCP stdio transport
487
+ β–Ό
488
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
489
+ β”‚ AndroJack MCP Server β”‚
490
+ β”‚ β”‚
491
+ β”‚ πŸ” search ⚠️ component πŸ“ architecture πŸ› debuggerβ”‚
492
+ β”‚ πŸ“¦ gradle πŸ“Š api-level 🎯 kotlin 🎨 m3e β”‚
493
+ β”‚ πŸ” permissions πŸ§ͺ testing πŸ—οΈ build-publish β”‚
494
+ β”‚ πŸ“± large-screen πŸš€ scalability β”‚
495
+ β”‚ β”‚
496
+ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
497
+ β”‚ β”‚ Secure HTTP layer β”‚ β”‚
498
+ β”‚ β”‚ Domain allowlist Β· Rate limiter Β· Retry backoff β”‚ β”‚
499
+ β”‚ β”‚ 4 MB body cap Β· Cheerio HTML parsing β”‚ β”‚
500
+ β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
501
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
502
+ β”‚ HTTPS (allowlisted only)
503
+ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
504
+ β–Ό β–Ό β–Ό
505
+ developer.android.com kotlinlang.org Google Maven
506
+ issuetracker.google source.android Maven Central
507
+ ```
508
+
509
+ ---
510
+
511
+ ## πŸ§‘β€πŸ’» Local Development
512
+
513
+ ```bash
514
+ git clone https://github.com/VIKAS9793/AndroJack-mcp.git
515
+ cd androjack-mcp
516
+ npm install
517
+ npm run build # compiles TypeScript β†’ build/
518
+ npm run inspector # opens MCP Inspector UI
519
+ node build/index.js # run server directly
520
+ node build/install.js install # run installer
521
+ ```
522
+
523
+ ---
524
+
525
+ ## πŸ‘₯ Authorship & Ownership
526
+
527
+ **AndroJack-MCP** is a collaborative effort between human product vision and AI engineering excellence.
528
+
529
+ * **Vikas Sahani** β€” [Product Lead](https://www.linkedin.com/in/vikas-sahani-727420358) (`vikassahani17@gmail.com`)
530
+ * **Claude AI** β€” AI Engineering Lead
531
+
532
+ ## οΏ½ Getting the Full Guarantee
533
+
534
+ 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.
535
+
536
+ ### What is the Grounding Gate system prompt?
537
+
538
+ 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:
539
+
540
+ | When the AI does this... | It is mandated to call this first |
541
+ |---|---|
542
+ | Write any Compose UI | `material3_expressive` |
543
+ | Add/update any dependency | `gradle_dependency_checker` |
544
+ | Use any Android/Jetpack class | `android_component_status` |
545
+ | Write navigation code | `android_navigation3_guide` |
546
+ | Write tests | `android_testing_guide` |
547
+ | Target tablets/foldables | `android_large_screen_guide` |
548
+
549
+ ### How to activate Level 2
550
+
551
+ **Claude Desktop / Cursor / Windsurf:**
552
+ In your system prompt settings, add:
553
+ ```
554
+ Use the androjack_grounding_gate MCP prompt before every Android coding task.
555
+ ```
556
+
557
+ **IDEs that support MCP prompt injection** (Kiro, Antigravity, JetBrains AI):
558
+ Select the `androjack_grounding_gate` prompt from the MCP prompts list at session start.
559
+
560
+ > 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.
561
+
562
+ ---
563
+
564
+ ## οΏ½πŸ’¬ Community &amp; Discussions
565
+
566
+ Join our [GitHub Discussions](https://github.com/VIKAS9793/AndroJack-mcp/discussions) to connect with other developers, ask questions, and share your ideas!
567
+
568
+ - **πŸ™ Q&A**: Get help with setup and usage.
569
+ - **πŸ’‘ Ideas**: Propose new tools and features for the 2026 roadmap.
570
+ - **πŸ™‹ Polls**: Vote on the next Android APIs to support.
571
+ - **πŸŽ‰ Showcase**: Share your amazing Android projects built with AndroJack.
572
+
573
+ ---
574
+
575
+ ## 🀝 Contributing
576
+
577
+ We welcome contributions! Please see our [Contributing Guidelines](https://github.com/VIKAS9793/AndroJack-mcp/blob/main/CONTRIBUTING.md) for more details.
578
+
579
+ ---
580
+
581
+ ## πŸ“„ License
582
+
583
+ [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)
584
+
585
+ ---
586
+
587
+ <div align="center">
588
+
589
+ *Built because 35% of Stack Overflow visits in 2025 are developers debugging AI-generated code.*
590
+ *AndroJack exists so none of those visits are yours.*
591
+
592
+ </div>
package/SECURITY.md ADDED
@@ -0,0 +1,26 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ The following versions of AndroJack-mcp are currently being supported with security updates:
6
+
7
+ | Version | Supported |
8
+ | ------- | ------------------ |
9
+ | 1.3.x | :white_check_mark: |
10
+ | < 1.3 | :x: |
11
+
12
+ ## Reporting a Vulnerability
13
+
14
+ We take the security of AndroJack-mcp seriously. If you believe you have found a security vulnerability, please do **not** open a public issue. Instead, please report it privately.
15
+
16
+ Please send an email to **vikassahani17@gmail.com**.
17
+
18
+ When reporting, please include:
19
+ - A description of the vulnerability.
20
+ - Steps to reproduce (if possible).
21
+ - Potential impact.
22
+
23
+ We will acknowledge your report within 48 hours and provide a timeline for a fix if necessary.
24
+
25
+ ---
26
+ *Maintained by [Vikas Sahani](https://github.com/VIKAS9793)*
Binary file
Binary file