关于 Clarion Builder MCP Server
Clarion Builder MCP Server 为 Clarion 开发提供 IDE 操作与构建能力,面向需要自动生成、管理和编译 Clarion 项目的开发者。它结合 ClarionCL 与 MSBuild,支持模板和字典相关操作。
主要功能
- 01执行 ClarionCL 操作
- 02生成并编译项目
- 03管理模板
- 04导入和导出字典
- 05处理 TXA 文件
- 06使用 MSBuild 构建解决方案
适用场景
- 01自动生成 Clarion 项目文件
- 02编译 Clarion 解决方案
- 03导入或导出 TXA 与字典
MCP 相关
该 MCP 服务向 MCP 客户端提供 ClarionCL 操作和 MSBuild 解决方案编译工具。
配置
本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。
暂未收录安装方式
我们还没有获取到这个服务的安装包或远程地址,请按项目 README 中的说明安装。
工具
还没有获取到工具列表
本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。
详细介绍
Clarion Builder MCP 服务
提供 Clarion 开发和构建功能的 MCP 服务。此服务使用 ClarionCL 和 MSBuild 实现 Clarion IDE 操作、项目编译和构建管理的自动化。
功能
- 执行 ClarionCL 命令
- 生成和编译项目
- 管理模板
- 导入/导出字典
- 处理 TXA 文件
- 集成 MSBuild
- 全面的构建配置
工具
ClarionCL 操作
clarion_cl
执行 IDE 任务所需的 ClarionCL 命令。
- action:要执行的 ClarionCL 操作(必需)
- 可选值:
generate:生成项目文件import-txa:导入 TXA 文件export-txa:导出 TXA 文件export-dict:导出字典import-dict:导入字典register-template:注册模板unregister-template:取消注册模板list-templates:列出已注册的模板register-driver:注册驱动程序
- 可选值:
- filePath:APP/SLN/TXA/DCT 文件的路径
- secondaryPath:用于导入/导出操作的次要路径
- version:要使用的 Clarion 版本(例如,“Clarion 11.0 Enterprise Edition”)
- conditionalGeneration:为 generate 操作启用条件生成
- debugGeneration:为 generate 操作启用调试生成
- useWindowsRedirection:使用 Windows 重定向文件(/win 开关)(必需)
- templateClass:模板操作所用的模板类名称
- redirectionFile:要使用的重定向文件(例如,“Clarion110.red”)(必需)
解决方案构建
compile_solution
使用 MSBuild 编译 Clarion 解决方案。
- solutionPath:.sln 文件的完整路径(必需)
- projectName:要编译的特定项目名称(例如,MyApp.app)
- targetName:要构建的特定目标/可执行文件名称(例如,MyApp.exe)
- configuration:构建配置
- 可选值:'Debug' 或 'Release'
- platform:目标平台
- 可选值:'Win32' 或 'x64'
- clarionBinPath:Clarion 二进制文件的路径
- logFile:构建日志文件的路径
- additionalArgs:其他 MSBuild 参数
构建选项:
- checkIndex:生成数组索引检查代码
- checkStack:生成堆栈访问检查代码
- lineNumbers:在 MAP 文件中添加行号
- generateMap:生成 MAP 文件
- stackSize:堆栈大小
- vid:调试支持级别
- 可选值:'full'、'min'、'off'
- model:内存模型
- 可选值:'Dll'、'Lib'、'CustomDll'
- copyCoreFiles:复制核心 DLL
- defines:以分号分隔的定义列表
要求
- Clarion 11.0 或更高版本
- Microsoft .NET Framework 4.0 或更高版本
- Visual Studio 构建工具
- Windows SDK
安装
- 克隆仓库:
git clone https://github.com/yourusername/clarion-builder-mcp-server.git
cd clarion-builder-mcp-server
- 安装依赖项:
npm install
- 构建项目:
npm run build
配置
将服务添加到 MCP 设置文件中:
{
"mcpServers": {
"clarion-builder": {
"command": "node",
"args": ["path/to/clarion-builder-mcp-server/dist/index.js"],
"env": {}
}
}
}
使用示例
生成项目
await mcp.use("clarion-builder", "clarion_cl", {
action: "generate",
filePath: "./src/MyApp.app",
version: "Clarion 11.0 Enterprise Edition",
conditionalGeneration: true,
useWindowsRedirection: true,
redirectionFile: "Clarion110.red"
});
导入/导出 TXA
// Export TXA
await mcp.use("clarion-builder", "clarion_cl", {
action: "export-txa",
filePath: "./src/MyApp.app",
secondaryPath: "./backup/MyApp.txa",
useWindowsRedirection: true,
redirectionFile: "Clarion110.red"
});
// Import TXA
await mcp.use("clarion-builder", "clarion_cl", {
action: "import-txa",
filePath: "./src/MyApp.app",
secondaryPath: "./backup/MyApp.txa",
useWindowsRedirection: true,
redirectionFile: "Clarion110.red"
});
编译解决方案
await mcp.use("clarion-builder", "compile_solution", {
solutionPath: "./MyApp.sln",
configuration: "Release",
platform: "Win32",
generateMap: true,
vid: "full",
model: "Dll",
copyCoreFiles: true
});
开发
- 修改源代码
- 运行测试:
npm test
- 构建项目:
npm run build
贡献
- Fork 仓库
- 创建功能分支
- 提交更改
- 推送到分支
- 创建 Pull Request
许可证
MIT
评论
支持 Markdown
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。