@javaabu/onu-mcp

中文文档
0.2.0发布于 2026/11/01MITTypeScriptES Module

MCP server for Onu (@javaabu/onu): gives AI assistants the component docs and the rules for writing Onu code.

原始使用文档
文档目录3 节
  1. Tools
  2. Setup
  3. Development

@javaabu/onu-mcp

A Model Context Protocol server that gives AI assistants the docs of Onu (@javaabu/onu), Javaabu's React UI library, and the rules for writing Onu code.

It reads the docs of the @javaabu/onu installed in your project (node_modules/@javaabu/onu/docs, looked up from the folder the assistant runs in and its parents), so answers match your version. Without one, it uses the docs it was published with. ONU_DOCS_DIR points it at another folder.

Tools

ToolWhat it does
onu_get_rulesThe rules for writing Onu code: setup, imports, forms, Thaana and RTL, theming, icons, accessibility
onu_list_componentsEvery docs page by section, with a one-line description; section lists one
onu_get_docA page as Markdown, by component name (PasswordInput), file name or path
onu_search_docsSearches every page, e.g. "date range laravel"

The rules are also a resource, onu://rules.

Setup

Claude Code:

claude mcp add --scope project --transport stdio onu -- npx -y @javaabu/onu-mcp

Cursor (.cursor/mcp.json), VS Code (.vscode/mcp.json, under "servers"), Claude Desktop and other clients:

{
  "mcpServers": {
    "onu": { "command": "npx", "args": ["-y", "@javaabu/onu-mcp"] }
  }
}

See AI assistants for the other ways to give an assistant Onu's docs.

Development

pnpm --filter @javaabu/onu-mcp test    # tests (generate the docs into a temp folder)
pnpm --filter @javaabu/onu-mcp build   # bundles the docs into data/ and compiles to dist/

版本与发布记录

@javaabu/onu-mcp 共发布 3 个版本,首次发布于 2026/10/18;过去 12 个月发布了 3 个版本。

版本发布日期距今
0.2.0latest2026/11/012 天前
0.1.02026/10/1816 天前
0.0.0-stage2026/10/1816 天前

关于 @javaabu/onu-mcp 的常见问题

@javaabu/onu-mcp 是什么?

Onu的MCP服务器(@javaabu/ Onu):为AI助手提供组件文档和编写Onu代码的规则。

如何安装 @javaabu/onu-mcp?

在项目目录运行 npm install @javaabu/onu-mcp,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 onu-mcp,可以用 npx onu-mcp 直接运行。

@javaabu/onu-mcp 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@javaabu/onu-mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@javaabu/onu-mcp 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.19。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@javaabu/onu-mcp 可以商用吗?

@javaabu/onu-mcp 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@javaabu/onu-mcp 还在维护吗?

最新版本 0.2.0 发布于 2026/11/01(2 天前);至今共发布 3 个版本,其中过去 12 个月发布了 3 个;首次发布于 2026/10/18。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。