luneos-mcp
OfficialThis server gives you programmatic access to LuneOS porting/debugging knowledge via MCP.
List topics –
luneos_list_topicsreturns all knowledge-base topics with one-line descriptions.Fetch a topic –
luneos_get_topicreturns the full markdown for any topic, e.g.kernel-porting,debugging, ordevice-bluejay.Search knowledge –
luneos_searchperforms case-insensitive searches across all topics and returns matches with surrounding context and source topic.Resources & prompts (from README) – also exposes
luneos://knowledge/<topic>resources and prompts such asluneos-session-start,luneos-port-device, andluneos-debug-bootfor guided workflows.
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-mcpmy 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:
sargo (Pixel 3a) — the GSI pilot: one generic
halium-arm64rootfs booting Halium 14.0 and 16.0 GSIs over the stock Android 12.1 vendorbluejay (Pixel 6a) — first Tier A GKI port: ACK
android14-6.1kernel, KMI-preserving config fragment, stock vendor modulespanther (Pixel 7) — A13-launch
init_bootlayout, same kernel binarymindphone (MT6739) — Tier B legacy port: 32-bit kernel,
halium_armGSI built for Halium 11 and 16, full UI/wifi/BT/modem bring-upq25 (Zinwa Q25, MT6789/Helio G99) — first MediaTek Tier A GKI target, square-screen QWERTY; Yocto side and stock-firmware analysis complete, pre-hardware
mp01 (Minimal Phone MP01, MT6789) — E Ink QWERTY phone on the shared
halium-arm64rootfs, with no published kernel source; vendor-driven module loading, per-devicedeviceinfoworkarounds for audio and Bluetoothathena (BlackBerry KEY2, SDM660) — Tier B on a 4.19 CAF tree built with Yocto's own GCC 15; source of the boot-image window rule (the kernel plus its appended device trees must end below
ramdisk_offset) and of the Android-15-vendor shortcut, where an A15 vendor serves a Halium 16 GSI with no VNDK snapshot at all
plus cross-checked material from the UBports, Droidian and Sailfish OS (HADK) porting guides, integrated where their methods transfer to the LuneOS stack (and flagged where they conflict — e.g. their kernel config lists vs the Tier A KMI-poison findings).
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 have Claude load the full context automatically 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 — load at session start |
| one topic file |
Topics (auto-discovered from knowledge/*.md):
Topic | Covers |
| the GSI+GKI model: one rootfs, Treble, Tier A/B, adaptation tiers, on-device layout |
| GKI/ACK builds, KMI-poison list & CRC verification, Tier B legacy kernels |
| the vermagic/CRC playbook: identify the vendor from its modules, extract its real config from IKCONFIG, read |
| header v0–v4, the kernel/ramdisk window check, per-layout repack recipes, initramfs init patches, AVB/vbmeta |
| building Halium GSIs (arm64 and 32-bit arm), Halium 16 traps, VNDK snapshots |
| meta-smartphone machines, gki_bootimg, recipes, bitbake gotchas |
| nyx-modules(-hybris) per-machine cmake, variables, pitfalls |
| libhybris stack, HIDL vs AIDL per subsystem, Mali, MTK connectivity |
| staged "device doesn't come up" playbook, symptom → cause table |
| flash kits, userdata images, fastboot flows, anti-rollback |
| kmi-crc-check, module-order, payload_extract, mer-kernel-check, … |
| the UBports/HGABT |
| per-device reference |
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— load the knowledge base into a sessionluneos-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. Add or edit files and the server picks
them up on the next request — no restart or re-registration needed.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | Topic name (filename without .md) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses the return format ('full markdown content'), which is genuinely useful, and the name implies a read-only operation. It says nothing about behavior on an invalid topic name, missing topics, or content size/latency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, zero filler, with the core action front-loaded and the prerequisite tool named second. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter retrieval tool with no output schema, the description supplies the key missing piece — what comes back (markdown content). An agent has enough to call it correctly; only error/edge-case behavior is unaddressed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the 'topic' parameter is already documented as a filename without .md. The description reinforces this with example values, but adds no syntax or constraint beyond the schema — baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Return the full markdown content of one LuneOS knowledge topic') plus the exact grain (one topic), which distinguishes it from list_topics and search. Concrete example topic names make the resource tangible.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly routes the agent to luneos_list_topics for valid names, giving clear context for the required argument. It does not, however, distinguish when to retrieve a full topic versus using luneos_search, so the sibling comparison is only half-covered.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses that each result includes a one-line description (useful) but omits read-only/rate-limit/pagination behavior and output structure. Adequate but with gaps for a no-annotation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight sentences: purpose first, then usage. No wasted words, well front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-param listing tool with no annotations and no output schema, the description covers what it returns and when to call it. Slightly short of full completeness since it doesn't characterize output size or ordering.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Zero parameters, so baseline is 4. Nothing to document, and the description correctly implies a no-argument listing call.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (List), resource (LuneOS knowledge-base topics), and return format (one-line description each). Clearly distinguishable from siblings like luneos_get_topic and luneos_search.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says 'Use this first to see what porting/debugging knowledge is available,' giving clear when-to-use guidance. It doesn't name the alternative tools or state when not to use it, but the first-step framing is strong.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Substring or word(s) to search for | |
| context_lines | No | Lines of context around each match (default 2) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses case-insensitivity and the return shape (matching lines, surrounding context, originating topic), which is genuinely useful. It is silent, though, on result limits, pagination, and behavior on zero matches.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three tight sentences ordered as what-it-does, what-it-returns, when-it-is-good. No filler and no repetition of schema content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple two-parameter search tool with no output schema and no annotations, the description covers purpose, matching semantics, and return format adequately. Missing only operational details such as result caps or pagination behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% and the schema already documents both 'query' and 'context_lines' (including the default of 2 and the 0-10 bound). The description adds nothing beyond that, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (search) and resource (LuneOS knowledge base) with the scope qualifier 'across the whole knowledge base', which implicitly distinguishes it from luneos_get_topic and luneos_list_topics. However, it never names those siblings, so differentiation is left to the agent's inference.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The final sentence gives concrete query examples ('wait_for_prop', 'EGL_BAD_ALLOC', config options, file names) which helps the agent craft a query, but it never states when to prefer this tool over luneos_get_topic or luneos_list_topics, nor any exclusion conditions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.0.0- First observed
luneos_get_topic - First observed
luneos_list_topics - First observed
luneos_search
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
Performix public corpus over MCP: guides, books, evidence, outcome models, plus a computing tool.
Create, deploy, and operate MCP servers directly from your GitHub repositories.
Ryan Lindsey's professional corpus, exposed as MCP tools.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides comprehensive access to MCP documentation through structured guides, full-text search, and interactive development workflows for building servers and clients.310 npmMIT
- AlicenseAqualityCmaintenanceA 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.79 npm18MIT
- AlicenseAqualityBmaintenanceA minimal, secure MCP server for AI-assisted mobile development, enabling build, install, interact, and inspect Android/iOS apps.3311 npm9Apache 2.0
- AlicenseAqualityAmaintenanceEnables Android APK reverse engineering and Flutter runtime injection through a six-step pipeline of decompile, analyze, synthesize, inject, patch, and repackage. Provides MCP tools for authorized security research and penetration testing.2943 npm5MIT