Back to MCP directory
publicPublicdnsLocal runtime

peterparker57_clarion-builder-mcp-server

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

article

README

🚀 Clarion Builder MCP 服务器

Clarion Builder MCP 服务器是一个专门提供 Clarion 开发和构建功能的 MCP 服务器。它能够实现自动化的 Clarion IDE 操作,支持项目编译以及使用 ClarionCL 和 MSBuild 进行构建管理,极大地提升了 Clarion 开发的效率。

🚀 快速开始

Clarion Builder MCP 服务器为开发者提供了便捷的 Clarion 开发和构建环境。按照以下步骤操作,即可快速开启开发之旅。

安装

  1. 克隆仓库:
git clone https://github.com/yourusername/clarion-builder-mcp-server.git
cd clarion-builder-mcp-server
  1. 安装依赖项:
npm install
  1. 构建项目:
npm run build

开发

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

贡献

  1. 叉克隆仓库。
  2. 创建功能分支。
  3. 提交更改。
  4. 推送到分支。
  5. 创建拉取请求。

✨ 主要特性

  • 执行 ClarionCL 命令:可灵活执行各类 ClarionCL 命令,满足不同开发需求。
  • 生成和编译项目:支持项目的生成与编译操作,提高开发效率。
  • 模板管理:方便对模板进行注册、取消注册和列表查看等操作。
  • 字典的导入/导出:实现字典数据的便捷导入和导出。
  • TXA 文件处理:支持 TXA 文件的导入和导出操作。
  • MSBuild 集成:与 MSBuild 集成,可使用其进行解决方案的编译。
  • 全面构建配置:提供丰富的构建选项,满足多样化的构建需求。

📦 安装指南

先决条件

  • Clarion 11.0 或更高版本。
  • Microsoft .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

💻 使用示例

工具使用

ClarionCL 操作

clarion_cl

执行 ClarionCL 命令以进行 IDE 任务,以下是各参数说明: | 参数 | 详情 | |------|------| | 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 企业版”) | | conditionalGeneration | 在生成动作中启用条件生成 | | debugGeneration | 在生成动作中启用调试生成 | | 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 | 分号分隔的定义列表 |

📄 许可证

本项目采用 MIT 许可证。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client