ArkUIBuilder MCP
Search and use ArkUIBuilder HarmonyOS ArkUI widgets in a project.
Search ready-made widgets by words, platform, or category; no arguments gives an overview.
Get one widget’s details by component name, id, or title, optionally including its full ArkTS source.
Add a widget by copying it into
components/<Name>.ets, adding its import to a target.etsfile, and returning the call forbuild().Avoid overwriting existing different widget files unless
overwriteis true.
Enables searching Explore-In-HMOS open-source HarmonyOS watch projects hosted on GitHub, retrieving project outlines and source files, and optionally using a GitHub token to raise API rate limits.
Provides tools for HarmonyOS ArkUI development: searching and retrieving ready-made ArkUI widgets and page templates, copying component code into HarmonyOS projects, adding imports, and finding sample HarmonyOS projects that demonstrate platform APIs.
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., "@ArkUIBuilder MCP Build a fitness page with a step ring and a dark mode toggle."
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.
ArkUIBuilder MCP
MCP server that gives AI assistants (Claude Code, Claude Desktop, Cursor, …) the ArkUIBuilder catalog of ready-made HarmonyOS ArkUI components.
Instead of writing UI components from scratch, the assistant finds a tested one, has this server copy it into the project, and writes only the call:
You: Build a fitness page with a step ring and a dark-mode toggle, using ArkUIBuilder widgets.
Claude: search_widgets("progress ring") → ProgressRingFb({ value: this.value })
search_widgets("toggle") → SwitchFb({ on: this.on })
add_widget(ProgressRingFb, …/pages/Fitness.ets) ← file + import written by the server
add_widget(SwitchFb, …/pages/Fitness.ets)
…writes only the page: @State value, @State on, and the two calls in build()Because the component code is copied by the server rather than typed by the model, the assistant spends
tokens only on the page itself. For example, ColorStudioFb's signature is ~70 tokens; its source is ~1,400.
Tools
Tool | What it does |
| Search by words, platform (Mobile, Wearable, PC (2in1), My Widgets) and category. No arguments gives an overview. Each result shows the call and required parameters. |
| One widget's details; |
| Writes |
It also lists My Widgets saved with the ArkUIBuilder IDE plugin
(found automatically in the IDE config folders; set ARKUIBUILDER_MY_WIDGETS to point at a
my-widgets.json elsewhere).
Page templates
Complete pages built from catalog widgets. add_template writes the page, copies its widgets into
components/ with their imports, and adds the route to main_pages.json; the page compiles as-is, so the
assistant only changes texts and data.
Tool | What it does |
| Lists the templates; filter by words or platform. |
| Writes the page to |
Template | Platform | Widgets |
| Mobile | segmented control, activity rings, steps, water, sleep |
| Mobile | bottom tab bar, search, category chips, promo, product, cart, coupon, order tracking |
| Mobile | wallet card, budget donut, transactions, stock |
| Mobile | profile card, switch row, settings list, theme toggle |
| Mobile | login, sign-up form, password strength |
| Mobile | music card, waveform, equalizer, volume |
| Mobile | weather card, hourly, sunrise arc, radar |
| Wearable | heart rate, steps, rings, SpO2, sleep (vertical swipe) |
| Wearable | workout, heart rate, stopwatch, music |
| Wearable | digital face, weather, calendar, reminders, smart home |
| PC (2in1) | dashboard, kanban, month calendar, inbox (top tabs) |
You: Make a watch app for heart rate and sleep.
Claude: search_templates("watch health") → watch-health
add_template(watch-health, …/pages/Index.ets) ← page + 5 widgets + route written by the serverSample projects
For HarmonyOS APIs (sensors, heart rate, digital crown, notifications, maps, Bluetooth, NFC, storage, …) the server also searches the 550+ open source watch projects of Explore-In-HMOS, so the assistant starts from working code instead of recalling APIs from memory.
Tool | What it does |
| Search by words, |
| A project's outline: SDK, requested permissions, and its source files with size and the kits each file imports. |
You: Show the live heart rate on the watch.
Claude: search_samples("heart rate") → how-to-get-heart-rate-with-sensorkit
get_sample(…) → permissions + files; SendToPhone.ets uses SensorServiceKit
get_sample(…, files: ["SendToPhone.ets"]) → only that file's codeThe index ships with the package (data/samples.json); source files are fetched from GitHub when asked for.
Without a token GitHub allows 60 file-list requests an hour; set GITHUB_TOKEN in the server's env if you hit that.
Lite Wearable projects are JavaScript and do not run on Smart Wearable (ArkTS) devices; results say so.
Related MCP server: UI HUB MCP Server
Setup
Requires Node.js 18+.
Claude Code
claude mcp add arkuibuilder -- npx -y arkuibuilder-mcpClaude Desktop (claude_desktop_config.json), Cursor (.cursor/mcp.json) and other MCP clients:
{
"mcpServers": {
"arkuibuilder": { "command": "npx", "args": ["-y", "arkuibuilder-mcp"] }
}
}From a local checkout, use node /path/to/arkuibuilder-mcp/dist/index.js as the command instead.
Development
npm install
npm test # builds, then runs parser, importer and stdio end-to-end tests
npm run build:samples # regenerates data/samples.json from the hmos-index skill references
npm run check:templates -- <project> # compiles every template in a scratch copy of a HarmonyOS projectThe component parser is a port of the IDE plugin's ComponentParser.kt; a test checks that both produce the
same call for every catalog widget (test/fixtures/plugin-calls.txt). Environment variables:
Variable | Purpose |
| Read the catalog from a saved |
| Path of the plugin's |
| Read sample projects from local clones ( |
| Raises GitHub's rate limit for |
Available Tools
3 toolsadd_widgetAdd an ArkUIBuilder widget to the projectAIdempotent
Copies a widget's component into /src/main/ets/components/.ets and adds its import to target_file. Returns the call to place in build(). Never overwrites a different existing file unless overwrite is true.
Inputs: name (required), target_file (required), overwrite.
get_widgetGet an ArkUIBuilder widgetARead-only
Details of one widget by component name (e.g. ColorStudioFb), id or title. Set include_code only if you need to read or adapt its source; to use it as-is call add_widget instead.
Inputs: name (required), include_code.
search_widgetsSearch ArkUIBuilder widgetsARead-only
Search ready-made HarmonyOS ArkUI components (ArkUIBuilder catalog plus the user's My Widgets). Each result shows the call to write in build() and its required parameters. Call with no arguments for an overview of platforms and categories.
Inputs: limit, query, category, platform.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
search_widgets (discover), get_widget (inspect source/details), and add_widget (install into module) have distinct actions, and the descriptions explicitly steer between them (e.g. 'to use it as-is call add_widget instead'). There is mild overlap since search results already return the build() call and parameters, making get_widget's unique value narrower, but the boundaries are clearly drawn.
All three tools follow a clean verb_noun snake_case pattern: search_widgets, get_widget, add_widget. The convention is predictable and consistent throughout.
Three tools is on the thin side, but the server's scope (search a widget catalog, inspect a widget, install it) is genuinely narrow, so each tool earns its place. A list-categories or remove-widget tool would round it out but the count is reasonable for the purpose.
The core lifecycle of discover -> inspect -> install is fully covered, including an overview mode (search with no args) and a copy/install operation. Minor gaps exist (no tool to remove or update an already-installed widget), but these are workarounds an agent can handle manually.
Maintenance
Related MCP Connectors
Find UI components and themes, retrieve code, and generate with hosted 21st AI when enabled.
Search, read and install agent-ready React components, screens and blocks for AI products.
Give AI agents your deeepSpace design system: components, tokens, styles and code mappings.
Search, read and install ReUI shadcn components, examples, blocks and icons from your coding agent.
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides documentation search, reading, and AI-powered Q\&A for ArkTS/ArkUI development, enabling AI coding assistants to answer questions and retrieve official docs.743MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI coding assistants to search, discover, and retrieve UI HUB components, source code, dependencies, templates, and animations via MCP.-
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to search, inspect, and retrieve real UI components from existing component libraries, with ranked results, score explanations, licence and provenance details, and safe installation plans. It also surfaces similar components and higher-level UI patterns so agents can reuse existing interface code instead of generating it from scratch.MIT
- FlicenseAqualityBmaintenanceEnables AI assistants to search a catalogue of plain HTML, CSS and JavaScript UI components and fetch each one's exact files, settings and framework integration instructions. Lets users add production-ready interface components by asking in natural language.2213-