luneos-mcp
OfficialThis MCP server exposes a searchable LuneOS/Halium/GKI porting knowledge base for discovering, retrieving, and keyword-searching topics on device bring-up, kernel, boot images, Yocto, GSI, HAL, and debugging.
List topics:
luneos_list_topicsshows all knowledge-base topics with one-line descriptions, including general, SoC-family, kernel, userspace-component, and per-device topics.Fetch a full topic:
luneos_get_topicreturns the complete markdown for a named topic (e.g.kernel-porting,debugging,device-bluejay).Search everything:
luneos_searchperforms a case-insensitive query across the whole knowledge base, returning matching lines with surrounding context (configurable viacontext_lines, default 2) and the originating topic.Useful for symptoms and references: Search examples include
wait_for_prop,EGL_BAD_ALLOC,FMP self test, config options, file names, and tools.
It is a reference/orientation server only — it does not build, flash, or modify devices.
Provides knowledge and tooling for porting LuneOS to Android devices, including kernel porting, boot-image construction, GSI building, device bring-up, and debugging.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@luneos-mcp my device won't boot after installing the GSI, what do I check?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
luneos-mcp
MCP (Model Context Protocol) server packaging the knowledge gained porting LuneOS to modern Android devices via Halium GSIs and GKI kernels — kernel porting, boot-image construction, Yocto/meta-smartphone device bring-up, nyx-modules configuration, GSI building, installation, and a staged "device doesn't come up" debugging playbook.
Modelled on webOSArchive/webos-mcp, but for LuneOS device porting rather than legacy webOS app development.
The knowledge was distilled from real ports and bring-ups: Pixels on GKI
(bluejay, panther) and pre-GKI kernels (sargo, sunfish, bramble), MediaTek phones
and tablets (mindphone, q25, mp01, brax3, radon, titanpocket, sm-t220), Qualcomm
Tier B devices from 2015 to 2020 (a3-2015-halium, bullhead, athena, fajita, surya, vince),
and a Spreadtrum tablet (goyavewifi). The
device index in architecture lists each with its tier, kernel, vendor, GSI and
status; every device has its own device-<codename> topic. Material from the
UBports, Droidian and Sailfish OS (HADK) porting guides is integrated where it
transfers to the LuneOS stack, and flagged where it conflicts.
Install
git clone https://github.com/webOS-ports/luneos-porting-mcp.git
cd luneos-porting-mcp
npm install
# For Claude Code, user scope:
claude mcp add luneos-mcp -s user -- node "$PWD/index.js"
# Or per-project:
claude mcp add luneos-mcp -s project -- node "$PWD/index.js"(Once published to npm: claude mcp add luneos-mcp -s user -- npx -y luneos-mcp@latest.)
Requires Node.js 18+.
To point Claude at the knowledge base in a porting project, copy
templates/CLAUDE.md into the project (or merge its contents into an existing
CLAUDE.md).
Related MCP server: android-mcp-toolkit
What it exposes
Resources
URI | Content |
| every topic concatenated — very large; prefer |
| one topic file |
Topics (auto-discovered from knowledge/*.md; luneos_list_topics shows them in the same
groups). Each description is the topic's own first paragraph.
General
Topic | Covers |
| LuneOS's target architecture: one universal arm64 rootfs plus a generic Halium GSI on any unlockable Treble/GKI device, with per-device cost cut to a boot image and config. |
| Stage-by-stage playbook for a LuneOS GSI/GKI port that does not come up, distilled from failures hit and diagnosed on real hardware. |
| The small, self-contained porting and debug tools built during the LuneOS GSI/GKI work, with usage and location. |
| Reference for |
SoC families
Topic | Covers |
| What holds across the MediaTek ports (preloader and lk, mgk kernels, the connectivity combo, A12 vendor keys); device files keep their own values and link here. |
| What holds across the Qualcomm ports (aboot and ABL, appended device trees, CAF/LineageOS kernels, legacy vendors); device files keep their own values and link here. |
Kernel
Topic | Covers |
| What a LuneOS kernel config changes from stock, which changes break a KMI, the debug options, and the kernel command line. |
| How a LuneOS kernel is built: one ACK-based kernel per KMI on Tier A devices, the vendor's BSP tree per device on Tier B, and the traps of each. |
| Whether a vendor |
| How modules get loaded on a LuneOS port: the vendor's two module sets, load order, prebuilt vendor sets, and building and shipping modules of your own. |
| How to build, verify and flash LuneOS boot images for the three layout classes: legacy header v2, A12-launch GKI (ramdisk in boot) and A13-launch GKI (ramdisk in init_boot). |
Userspace components
Topic | Covers |
| How a LuneOS port is wired into Yocto: layer geography, machine confs, the generic halium-arm64 machine, GKI boot-image machines, GSI recipes, LXC config and build traps. |
| How LuneOS picks and configures its nyx modules: NYX_MODULES_REQUIRED per machine, nyx.conf values derived at boot, and the rules for what must be measured. |
| How LuneOS builds the Halium GSIs it mounts as /android: halium_arm64 and halium_arm products, the halium-16.0 traps, device-tree patches and publishing. |
| How LuneOS is installed: flash kits that write vbmeta, a boot image (plus init_boot on A13-launch devices) and a userdata image, leaving stock partitions alone. |
| How LuneOS reaches Android vendor HALs: the libgbinder glue, HIDL vs AIDL, binder ApiLevel, deriving and starting HAL services, sensors, text relocations and Waydroid. |
| How LuneOS draws through vendor GPU blobs: libhybris fixes, Mali, the display smoke test, DRM master, the Wayland socket split and browser scaling. |
| Sound through pulseaudio-modules-droid and the vendor audio HAL, its quirks and how to debug them, and the webOS media server path for HTML5 audio and video. |
| Bringing up and debugging the radios on a Halium vendor: Wi-Fi drivers and the regulatory db, bluebinder, ofono-binder-plugin and nfcd. |
Devices — one device-<codename> topic per port (status, platform facts, kernel, boot
image, vendor/GSI, Yocto, install, open issues); the device index in architecture has tier,
kernel, vendor, GSI and state for each.
Topic | Device | SoC |
| Google Pixel 3a | Qualcomm SDM670 |
| Google Pixel 6a | Google Tensor gs101 |
| Google Pixel 7 | Google Tensor G2 gs201 |
| Google Pixel 4a | Qualcomm SM7150-AB (730G) |
| Google Pixel 4a 5G | Qualcomm SM7250 (765G) |
| GreenTouch MindPhone | MediaTek MT6739 |
| Zinwa Q25 / Q25 Pro | MediaTek MT6789 (G99) |
| Minimal Phone MP01 | MediaTek MT6789 (G99) |
| BraX3 | MediaTek MT6835 (Dimensity 6300) |
| FuriLabs FuriPhone FLX1s | MediaTek MT6877 |
| Unihertz Titan Pocket | MediaTek MT6771 (P70) |
| Samsung Galaxy Tab A7 Lite Wi-Fi | MediaTek MT8768T |
| Samsung Galaxy A3 (2015) | Qualcomm MSM8916 |
| Samsung Galaxy Tab 3 Lite 7.0 Wi-Fi (SM-T113) | Spreadtrum SC7730S |
| LG Nexus 5X | Qualcomm MSM8992 |
| BlackBerry KEY2 | Qualcomm SDM660 |
| OnePlus 6T | Qualcomm SDM845 |
| Xiaomi POCO X3 NFC | Qualcomm SM7150-AC (732G) |
| Xiaomi Redmi 5 Plus | Qualcomm MSM8953 |
Renamed topics keep answering under their old name (TOPIC_ALIASES in index.js):
device-bringup-yocto → yocto, kernel-porting → kernel-build. The reply starts with a
note naming the new topic.
Tools
luneos_list_topics— list topics with descriptionsluneos_get_topic— fetch one topic's markdownluneos_search— keyword search across the whole knowledge base (symptoms, config options, file names)
Prompts
luneos-session-start— orient a session on the knowledge baseluneos-port-device— guided porting workflow for a new deviceluneos-debug-boot— staged triage for a device that does not come up
Updating the knowledge
Each file in knowledge/ is one topic; the first # heading is its title and
the first paragraph its description, so keep that paragraph to one sentence of
at most ~200 characters and put the rest in a second paragraph. A correction
replaces the wrong text in place rather than being appended next to it. Each
fact has one home; elsewhere, link to it (kmi-crc-matching.md § Struct layouts).
Device files follow a common shape (see any device-*.md). Add or edit files
and the server picks them up on the next request — no restart or re-registration needed.
npm test (scripts/check-refs.mjs) checks that every <topic>.md and
<topic>.md § Heading reference resolves, that each first paragraph fits in 200
characters, and that every alias target and PROMPT_TOPICS entry in index.js is a
real topic or heading. A renamed topic gets an entry in TOPIC_ALIASES.
License
Apache-2.0
Available Tools
3 toolsluneos_get_topicA
Return the full markdown content of one LuneOS knowledge topic (e.g. 'kernel-porting', 'debugging', 'device-bluejay'). Use luneos_list_topics to see valid names.
Inputs: topic (required).
luneos_list_topicsA
List all LuneOS knowledge-base topics with a one-line description of each. Use this first to see what porting/debugging knowledge is available.
Inputs: no named parameters.
luneos_searchA
Case-insensitive search across the whole LuneOS knowledge base. Returns matching lines with surrounding context and the topic they came from. Good for symptoms ('wait_for_prop', 'EGL_BAD_ALLOC', 'FMP self test'), config options, file names, tools.
Inputs: query (required), context_lines.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
The three tools map cleanly onto distinct retrieval modes: enumerate topics (list), fetch one full document (get), and full-text search across the corpus (search). Descriptions explicitly state when to use each, including cross-references ('Use luneos_list_topics to see valid names'), leaving no realistic chance of misselection.
All three names use the same luneos_ prefix followed by a verb_noun pattern (luneos_list_topics, luneos_get_topic, luneos_search). The singular/plural distinction between get_topic and list_topics is meaningful rather than inconsistent, and the style is uniform throughout.
Three tools is on the thin side but each has a distinct, non-overlapping role and the whole surface is coherent for a read-only knowledge base. Nothing feels padded or missing at the operation level, though a slightly larger set (e.g. browsing by category or recency) would not be unreasonable.
For a read-only knowledge base, list/get/search covers the full retrieval lifecycle with no dead ends: an agent can discover topics, read them in full, or jump straight to a symptom via search. Minor gaps exist around metadata such as topic freshness, categories, or pagination for very large corpora, but core usage is fully supported.
Maintenance
Related MCP Connectors
Remote MCP for Android CLI agent build gate, structured receipts, audit logs, and reviewer-ready evi
Create, deploy, and operate MCP servers directly from your GitHub repositories.
MCP registry & directory: search, find & install 31k+ MCP servers & tools. Catalog and marketplace.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides comprehensive access to MCP documentation through structured guides, full-text search, and interactive development workflows for building servers and clients.368 npmMIT
- AlicenseAqualityDmaintenanceA growing collection of MCP tools for Android Development. Currently features a deterministic Figma-SVG-to-Android-XML converter, with plans for Gradle analysis, Resource management, and ADB integration tools.718MIT
- AlicenseNot gradedqualityBmaintenanceProvides AI agents with a unified MCP interface for Android APK reverse engineering, metadata analysis, Smali/resource editing, rebuilding, signing, verification, and ADB device testing.MIT
- AlicenseBqualityCmaintenanceEnables local MCP clients to run Sailfish OS device, SDK, OBS, and Android/AppSupport development workflows via typed tools for SSH access, screenshots, touch injection, builds, logs, services, and repository checks.352BSD Zero Clause