Clarion构建服务器

提供Clarion开发和构建功能的MCP服务器,支持自动化IDE操作、项目编译和构建管理。

  • by peterparker57
  • 本地部署
  • 更新于
在 GitHub 查看 peterparker57/clarion-builder-mcp-server

使用说明

Clarion Builder MCP服务器

提供Clarion开发和构建功能的MCP服务器。此服务器使用ClarionCL和MSBuild实现自动化的Clarion IDE操作、项目编译和构建管理。

特性

  • ClarionCL命令执行
  • 项目生成和编译
  • 模板管理
  • 词典导入/导出
  • TXA文件处理
  • MSBuild集成
  • 全面的构建配置

工具

ClarionCL运营

clario_cl

执行IDE任务的ClarionCL命令。

  • 行动:要执行的ClarionCL操作(必需)
    • 价值观:
      • generate:生成项目文件
      • import-txa导入 TXA 文件
      • export-txa:导出TXA文件
      • export-dict:导出词典
      • import-dict:导入词典
      • register-template:注册模板
      • unregister-template:注销模板
      • list-templates:列出已注册的模板
      • register-driver:注册司机
  • 文件路径:APP/SLN/TXA/DCT文件的路径
  • 二级路径:导入/导出操作的次要路径
  • 版本:使用Clarion版本(例如“Clarion 11.0企业版”)
  • 条件生成:启用生成操作的条件生成
  • debugGeneration:启用调试生成以生成操作
  • 使用Windows重定向:使用Windows重定向文件(/win switch)(必填)
  • templateClass:模板操作的模板类名
  • 重定向文件:要使用的文件重定向(例如,“clarion110.red”)(必填)

解决方案构建

compile_解决方案

使用MSBuild编译Clarion解决方案。

  • 解决方案路径:.sln文件的完整路径(必需)
  • 项目名称:要编译的特定项目的名称(例如MyApp.app)
  • 目标名:要构建的特定目标.exe的名称(例如MyApp.exe)
  • 配置:构建配置
    • 值:“调试”或“发布”
  • 平台:目标平台
    • 值:“Win32”或“x64”
  • clarionBinPath:Clarion二进制文件的路径
  • 日志文件:生成日志文件的路径
  • 附加参数:其他MSBuild参数

构建选项:

  • checkIndex:生成数组索引检查代码
  • checkStack:生成堆栈访问检查代码
  • 行号:在MAP文件中添加行号
  • 生成地图:生成MAP文件
  • 堆栈大小:堆叠尺寸
  • 在:调试支持级别
    • 值:“full”、“min”、“off”
  • 模型:内存模型
    • 值:“Dll”、“Lib”、“CustomDll”
  • copyCoreFiles 文件:复制核心DLL
  • 定义:以分号分隔的定义列表

需求

  • Clarion 11.0或更高
  • 微软。NET Framework 4.0或更高版本
  • Visual Studio构建工具
  • Windows SDK

安装

  1. 克隆存储库:
git clone https://github.com/yourusername/clarion-builder-mcp-server.git
cd clarion-builder-mcp-server
  1. 安装依赖项:
npm install
  1. 构建项目:
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
});

发展

  1. 对源代码进行更改
  2. 运行测试:
npm test
  1. 构建项目:
npm run build

贡献

  1. 分叉存储库
  2. 创建功能分支
  3. 提交您的更改
  4. 推到分支
  5. 创建拉取请求

许可证

麻省理工学院