by chinawsb
Daofy for Delphi — MCP Server that compiles Delphi projects and queries knowledge base for AI assistants.
# Add to your Claude Code skills
git clone https://github.com/chinawsb/daofyLast scanned: 8/22/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-08-22T04:31:42.825Z",
"npmAuditRan": true,
"pipAuditRan": false,
"promptInjectionRan": true
}daofy is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by chinawsb. Daofy for Delphi — MCP Server that compiles Delphi projects and queries knowledge base for AI assistants. It has 100 GitHub stars.
Yes. daofy passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/chinawsb/daofy" and add it to your Claude Code skills directory (see the Installation section above).
daofy is primarily written in Python. It is open-source under chinawsb on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh daofy against similar tools.
No comments yet. Be the first to share your thoughts!
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
一个为 AI 助手提供 Delphi 和 Lazarus/Free Pascal 工程编译能力和知识库查询功能的 MCP Server。如果您觉得有用,请不要吝啬您的 Star! ⭐
Daofy(道飞)——为创意插上翅膀。
Daofy 是一个基于 Model Context Protocol (MCP) 的 MCP Server,它允许 AI 助手直接编译 Delphi 和 Lazarus/Free Pascal 项目并查询知识库。
通过这个工具,您可以在与 AI 助手的对话中直接编译工程、查询 API 文档、搜索代码示例,无需手动切换到 IDE 或命令行。
主要优势:
html2text, requests (已在 requirements.txt)python-docx (Word .docx 支持), antiword/catdoc (旧版 Word .doc 支持), PyMuPDF (PDF 支持,推荐) 或 pdfplumber (PDF 支持,备选), beautifulsoup4 (EPUB 支持)用户首次使用或需要重建 Delphi API 文档时,调用 delphi_kb 工具构建文档知识库:
delphi_kb(
action="build",
kb_type="document",
async_mode=true
)
说明:
directory="C:\Program Files (x86)\Embarcadero\Studio\<版本>\Help\Doc"
extensions=[".chm"]:只扫描 CHM 文件,工具会自动解压并导入 HTML 文档async_mode=true:异步执行(耗时数分钟),提交后返回 task_id,通过 async_task(action=status, task_id=...) 轮询进度tools/7z/ 目录下免安装)构建 Delphi 官方 Demos/Samples + 三方库 Demos/Tests 的全文搜索知识库:
delphi_kb(
action="build",
kb_type="example"
)
搜索示例代码:
delphi_kb(
query="TThread.Queue",
kb_type="example"
)
示例知识库仅全文搜索,不解析结构化符号(类/函数),适合快速查找示例用法。
使用 kb_type="all" 时默认不搜索示例知识库,需显式指定 kb_type="example"。
Daofy 内置 Delphi GUI/Console 自动化测试框架,支持 AI 驱动的 UI 交互测试:
DaofyAutomation 单元,AI 通过 automate_delphi 工具发送脚本命令操控界面(点击/输入/截图/断言)waitfor)、RTTI 属性读写(rget/rset)、截图比对keep_alive 模式下进程常驻,避免重复启动开销📖 启用指南: 如何在自己的 Delphi 项目中接入自动化测试,见
docs/automate_test_guide.md的「启用指南」章节。
| 工具名称 | 功能描述 |
|---|---|
| Delphi 工具 | |
delphi_project |
Delphi 项目全生命周期管理:编译(compile)/配置(info/set/create)/审计(audit/ast/runtime) |
delphi_kb |
搜索代码/类/函数/文档/示例代码,查看统计或构建知识库 |
delphi_file |
Delphi 文件专用操作:读/写(edits批量修改)/格式化/备份管理(编码检测+自动备份+DFM转换) |
manage_component |
DFM 组件增/删/改/生成 + PAS 自动同步 |
check_environment |
诊断编译环境、检测编译器、安装 pasfmt |
package |
组件包管理:安装(action=install) / 列出已安装(action=list) |
get_coding_rules |
获取编码规范,支持按语言(Delphi/Lazarus)和章节分段获取 |
automate_delphi |
Delphi GUI/Console 自动化测试 — 脚本驱动(click/type/waitfor/rget/capture),支持 GUI 命名管道和控制台两种模式,keep_alive 进程复用 |
delphi_rtti |
Delphi RTTI 桥接 — 通过 RTTI 发现和调用 Delphi 应用的运行时能力(三步法:discover/call/guide) |
| Lazarus/Free Pascal 工具 | |
lazarus_compile |
Lazarus/FPC 项目编译 (lazbuild),支持 .lpi/.lpr 项目文件 |
lazarus_project |
Lazarus 项目信息查询 — 解析 .lpi 文件,获取项目名称/源文件/编译器选项 |
lazarus_kb |
Lazarus/FPC 源码知识库 — 索引和搜索 LCL/FPC RTL 源码(独立 KB) |
lazarus_file |
Lazarus/FPC 文件读写 — read/write(edits批量修改,自动备份)/backup |
| 通用工具 | |
code_hosting |
统一操作 Gitea/GitHub/GitLab/Gitee/GitCode 平台 + Git 本地操作 |
async_task |
管理后台任务(构建知识库等) |
daofy_update |
检查 Daofy 版本更新、执行 git pull 更新(check/update/version),后台异步执行 |
tool_help |
获取任意工具的完整帮助文档(按需,含参数说明/示例/触发词) |
generate_copyright |
软著文档生成:源代码/说明书/摘要自动生成(PDF 浏览器渲染+自动校验) |
experience |
经验记忆管理:保存/搜索/更新/合并/删除 AI 成功解决问题的做法;定期清理低价值条目(prune);模型加载后重建缺失向量(rebuild_embedding) |
ocr |
图像分析:文字识别(recognize)/文本框(detect)/截图比对(diff)/颜色分析(color)/图标匹配(match) |
structured_content |
结构化文档统一读写/搜索/修改 — DFM/LFM/FMX/XML/JSON/MessagePack/ProtoBuf。read(读取)/get_schema(生成JSON Schema)/set(按JSONPath修改)/search(路径搜索) |
编译器自动检测(PATH / 注册表 / 常见安装目录),无需手动配置。仅安装对应开发工具后,相关插件自动启用。
所有知识库数据存储在项目根目录的 data/ 文件夹下:
| 知识库类型 | 存储路径 | 说明 |
|---|---|---|
| Delphi 源码知识库 | data/delphi-knowledge-base/ |
Delphi 官方源码 (RTL/VCL/FMX 等) |
| Lazarus/FPC 源码知识库 | data/lazarus-knowledge-base/ |
Lazarus LCL / FPC RTL 源码(独立索引) |
| 第三方库知识库 | data/thirdparty-knowledge-base/ |
第三方组件库源码 |
| 通用文档知识库 | data/document-knowledge-base/ |
Delphi CHM 帮助文档 + 通用文档 |
| 项目知识库 | <项目目录>/.delphi-kb/ |
项目级知识库,存放在项目目录下 |
| 示例知识库 | data/example-knowledge-base/ |
Delphi 官方 Demos + 三方库 Demos/Tests,全文搜索 |
| 经验知识库 | data/experience-knowledge-base/ |
AI 经验记忆(experiences.sqlite) |
每个知识库目录包含:
*.zvec/ - ZVec 向量数据库目录(文档/示例/项目/三方库知识库)experiences.sqlite - 经验记忆数据库(仅经验知识库保留 SQLite)config.json - 知识库配置文件说明:除经验知识库外,所有知识库已从 SQLite 迁移到 ZVec 向量引擎。文档知识库不再使用 SQLite FTS5,改用 ZVec 全文索引。
每个知识库通过 config.json 文件进行配置,支持自定义数据库、源码路径、构建参数等。
| 知识库类型 | 配置位置 |
|---|---|
| Delphi 源码 | data/delphi-knowledge-base/config.json |
| 第三方库 | data/thirdparty-knowledge-base/config.json |
| 通用文档 | data/document-knowledge-base/config.json |
| 项目级 | <项目目录>/.delphi-kb/config.json |
| 示例库 | data/example-knowledge-base/(纯 SQLite,无 config.json) |
| 经验库 | data/experience-knowledge-base/(纯 SQLite,无 config.json) |
配置文件在首次构建时自动生成,通常无需手动修改。
pip install daofy-for-delphi
安装完成后直接进入 → 配置 AI 助手 步骤即可。
国内用户可使用镜像源加速:
pip install daofy-for-delphi -i https://pypi.tuna.tsinghua.edu.cn/simple
请按以下步骤安装 Daofy:
[] 检查并安装 Git/Python 3.10-3.14/7-Zip
[] 安装 https://github.com/chinawsb/daofy.git(国内用户可用镜像: https://gitee.com/zuoyouruanjian/daofy.git)
[] 安装完成后验证结果并帮我配置当前客户端
git clone https://github.com/chinawsb/daofy.git
# 国内用户可用 Gitee 镜像加速:
# git clone https://gitee.com/zuoyouruanjian/daofy.git
cd daofy
python -m venv venv
Windows:
venv\Scripts\activate
Linux/macOS:
source venv/bin/activate
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
可选国内镜像源:
首次使用时,MCP Server 会自动从 Windows 注册表检测已安装的 Delphi 编译器,无需手动配置。
自动检测支持的 Delphi 版本:
如果需要手动配置或添加自定义编译器,可以直接编辑 config/compilers.json 文件,或使用 check_environment 工具的 detect action 重新检测。
如果通过 pip install daofy-for-delphi 安装,配置最简:
{
"mcpServers": {
"daofy": {
"command": "daofy",
"env": {
"PYTHONUNBUFFERED": "1",
"PYTHONIOENCODING": "utf-8",
"PYTHONUTF8": "1"
}
}
}
}
路径含空格时报错? 如果 Python 安装在
D:\Program Files\...等含空格的路径,部分 MCP 客户端无法正确处理。解决方案:将command改为 Python 解释器完整路径,args改为-m src:{ "mcpServers": { "daofy": { "command": "D:\\Program Files\\Python311\\python.exe", "args": ["-m", "src"], "env": { ... } } } }也可直接指定
server.py:"args": ["D:\\path\\to\\daofy\\src\\server.py"]
以下配置适用于通过 git clone 源码安装的用户,请将路径替换为实际安装路径。
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"daofy": {
"command": "python",
"args": ["C:\\path\\to\\daofy\\src\\server.py"],
"env": {
"PYTHONUNBUFFERED": "1",
"PYTHONIOENCODING": "utf-8",
"PYTHONUTF8": "1"
}
}
}
}
Windows: C:\Users\<用户名>\.trae-cn\mcp_config.json
{
"mcpServers": {
"daofy": {
"command": "F:\\ProPlus\\DelphiPlus\\Experts\\DelphiMCPServer\\delphi-complier-mcp-server\\venv\\Scripts\\python.exe",
"args": [
"F: