lowcode-mcp
Converts lowcode component documentation into an authoritative, branch-versioned source that LLMs can retrieve hierarchically, enabling agents to write schema with verifiable references.
README
lowcode-mcp
lowcode-mcp 是一个 MCP server,把 lowcode 组件文档变成 LLM 可按 GitLab branch 逐层检索的权威来源,让 agent 写出的 schema 有据可查。
// info { "branch": "6.11.0", "component": "input-text" } 的真实返回(节选)
{
"status": "ok",
"data": {
"branch": "6.11.0",
"commit": "a46d4481833d2917c056a5b3d1ecf5051b483946",
"stale": false,
"component": {
"type": "input-text",
"category": "form",
"path": "docs/zh-CN/components/form/input-text.md",
"title": "InputText 输入框"
},
"sections": [
{
"section": "[\"docs/zh-CN/components/form/input-text.md\",\"属性表\"]",
"path": ["属性表"],
"title": "属性表",
"level": 2,
"line": 408
}
]
}
}
为什么不让模型凭记忆写 schema
组件配置随 branch 漂移,模型的训练记忆永远落后且无法标注版本。这个 server 把文档仓库按 branch 同步成本地快照,让 agent 先查再写:每次回答都能带上精确的 branch、commit 和文档路径,查不到就明说未知,而不是发明一个看起来合理的配置。
先索引、后正文。 六个 tool 全部两级设计:先拿章节或示例索引,再按精确标识取正文。一次调用只取回答当前问题所需的内容,155 个组件的文档不会灌进上下文。
branch 级快照,断网可读。 每个 branch 只保留最新 commit 的完整快照,落在 ~/.amis/lowcode-docs/(按 GitLab host + project 分桶);网络抖动或 5xx 时回退到快照并显式标记 stale,401/403/404 绝不回退——缓存永远冒充不了当前文档。
它适合谁
需要让 LLM 编写、核对 lowcode schema 或查询组件配置、示例、专题文档的团队。通用前端问题、业务文档、其他仓库不在它的边界内。
装上跑起来
需要 Node ≥ 18 和一个能访问文档仓库的 GitLab token。npx 直接运行,无需本地构建(以 Claude Code 为例,其他客户端同构):
{
"mcpServers": {
"lowcode-docs": {
"command": "npx",
"args": ["-y", "lowcode-mcp"],
"env": {
"GITLAB_URL": "https://gitlab.example.com/gitlab",
"GITLAB_TOKEN": "your-token"
}
}
}
}
GITLAB_TOKEN_TYPE 可选,默认 private,需要 bearer 认证时在 shell 中导出即可(server 继承 shell 环境)。另有两个可选 env:LOWCODE_PROJECT 指定文档仓库(默认 semi2/lowcode);LOWCODE_BRANCH 设置默认 branch——设置后 tool 可不传 branch,但 server instructions 会要求模型仍与用户确认该默认是否适用。skills/lowcode-docs/ 是同名的 agent skill,把逐层检索纪律交给模型;装入你的 agent 环境后即可自动触发。
使用 OMP 时还有更短的路径——仓库自带 omp 清单和 .mcp.json,link 即同时装上 skill 和 MCP server:
omp plugin install /path/to/lowcode-mcp
六个 tool 一张检索网
| Tool | 作用 |
|---|---|
branches |
列出全部 branch 及 commit,锁定目标版本 |
list |
列出 branch 下的组件目录,可选文本过滤 |
info |
组件配置章节(属性表/事件表/动作表)的索引与正文 |
doc |
组件用法文档的标题索引与正文 |
demo |
组件 schema 示例的索引与完整示例 |
guide |
概念、API 等专题的目录、索引与正文 |
每个 tool 返回统一信封:顶层 status 判别结果(ok / 业务无匹配 / error),成功与无匹配的内容在 data,错误在 error。structuredContent 受 outputSchema 校验,text content 镜像同一 JSON;查询类 tool 全部声明只读 annotations,client 可安全自动放行。
开发
npm run build # tsc → dist/
npm test # node:test 单测
致谢
源自 fa-context-kit 的 lowcode-docs plugin(Skill + 本地 CLI),本项目将其查询能力复刻为标准 MCP server,skill 随之改写为 MCP 调用。
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.