ArkTS Helper MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ARKTS_DOCS_DIR | No | 文档目录路径 | static/docs |
| ARKTS_MCP_PORT | No | HTTP 服务端口 | 3456 |
| ARKTS_QA_TIMEOUT_MS | No | AI 问答超时(毫秒) | 120000 |
| ARKTS_MCP_CONFIG_DIR | No | Cookie 配置目录 | ~/.config/arkts-mcp |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| find_docsA | 搜索 HarmonyOS ArkTS 官方开发文档。 使用场景当用户询问以下内容时,应主动使用此工具搜索相关文档:
使用示例示例1 - 用户问:"@State 和 @Prop 有什么区别?" 调用:search_arkts_docs({ query: "State Prop 装饰器" }) 示例2 - 用户问:"怎么实现页面跳转?" 调用:search_arkts_docs({ query: "Navigation 路由 页面跳转" }) 示例3 - 用户问:"List 组件怎么用?" 调用:search_arkts_docs({ query: "List 列表组件" }) 示例4 - 用户问:"动画怎么实现?" 调用:search_arkts_docs({ query: "animateTo 属性动画" }) 搜索技巧
返回匹配的文档列表,包含标题、预览和 objectId(用于 read_doc 获取完整内容)。 |
| read_docA | 读取 ArkTS 文档的完整内容。 使用场景在使用 find_docs 搜索后,根据返回的 objectId 读取文档的完整 Markdown 内容。 使用流程
使用示例示例 - 搜索后读取完整文档:
返回文档的完整 Markdown 内容,包含代码示例和详细说明。 |
| list_doc_topicsA | 列出 ArkTS 文档的所有主题分类。 使用场景
使用示例当用户问"文档有哪些分类?"或"有什么类型的文档?"时调用此工具。 返回所有主题分类及其文档数量。 |
| ask_aiA | 向华为开发者官方智能问答助手提问。 使用场景当需要获取更全面、更权威的鸿蒙开发答案时使用此工具:
与 find_docs 的区别
使用示例示例1 - 用户问:"Navigation 怎么实现页面跳转并传参?" 调用:ask_ai({ query: "Navigation 怎么实现页面跳转并传参" }) 示例2 - 用户问:"List 组件性能优化有哪些方法?" 调用:ask_ai({ query: "List 组件性能优化方法" }) 返回华为官方智能助手的回答,包含参考链接。 |
| set_ai_authA | 设置 AI 问答的登录凭证,用于突破匿名态的次数限制。 使用场景当 ask_ai 提示次数限制或需要登录时,使用此工具设置登录凭证。 如何获取 Cookie
使用示例set_ai_auth({ cookie: "your_full_cookie_value_here" }) 设置成功后,后续的 ask_ai 调用将使用登录态,无次数限制。 |
| ask_ai_batchA | 批量向华为开发者官方智能问答助手提问(并行处理)。 使用场景当需要同时查询多个问题时使用此工具:
与 ask_ai 的区别
使用示例示例1 - 批量查询不同主题: 调用:ask_ai_batch({ queries: ["Navigation 组件用法", "List 性能优化", "@State 和 @Prop 区别"] }) 示例2 - 批量查询相关问题: 调用:ask_ai_batch({ queries: ["如何实现页面跳转", "如何传递参数", "如何返回数据"] }) 性能优势假设单个问题响应时间 60 秒:
|
| read_moreA | 读取被截断的完整回答内容。 使用场景当 ask_ai 返回的内容被截断时,使用此工具读取完整内容。 使用流程
使用示例read_more({ resourceId: "qa-result-1-1706123456789" }) 返回完整的 Markdown 格式回答内容。 |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each tool has a clearly distinct purpose: ask_ai vs ask_ai_batch are differentiated by single vs batch, find_docs vs read_doc vs list_doc_topics cover different phases of documentation access, read_more handles truncation, and set_ai_auth manages authentication. Descriptions explicitly contrast overlapping tools.
All tool names follow a consistent verb_noun pattern with lowercase and underscores (e.g., ask_ai, find_docs, list_doc_topics). No mixing of conventions like camelCase or inconsistent verb styles.
With 7 tools, the server is well-scoped for its purpose of providing ArkTS documentation search/reading and AI Q&A. Each tool earns its place without redundancy or excessive numbers.
The tool surface covers the core workflow: search docs, list topics, read docs, ask AI (single/batch), retrieve truncated responses, and set auth. A minor gap is no explicit tool for clearing auth or browsing AI history, but the set is largely complete for its stated domain.