pb-ai
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pb-aiCompile the demo.pbt project and generate the EXE"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pb-ai:PowerBuilder 多库编译修复
基于 npm pb-ai-mcp 1.0.21 的独立维护版本,目标项目:FLORYHOBBIT/pb-ai。上游引用、二进制来源和 SHA-256 见 UPSTREAM.md。
修复单 PBL 编译未加载依赖库的问题,支持按 PBT 完整库列表重编译和生成 PBD、EXE。PBR、EXE 使用默认配置,异常目录回落到当前 PBT/PBL 目录。详细行为、参数和恢复方法见 FIX-README.md。
安装和运行
需要 Windows、Node.js 和与工程版本匹配的 PowerBuilder 运行环境;原生桥使用 x86 .NET Framework。
npm install
npm run build:native
npm test
npm startMCP 启动命令为 node,参数为本仓库 dist/index.js 的绝对路径。原有 pb-cli.exe、PBSpy.dll 已从官方 npm 原包提取并放入仓库;新增 pb-project-build.exe 可由源码重新构建。原包未提供完整 TypeScript 工程,修改 JavaScript 后不需要 tsc。
在具备 PB8 环境的 Windows 上运行 npm run test:native,验证真实 EXE/PBD 和中文 PBR 资源。交付修复已在 PB8 多库工程及中文资源样例验证;其他 PB 版本及应用业务运行未验收。
package.json 设置 private=true,避免误发布到原 npm 包名;GitHub 仓库公开可见性由 GitHub 设置决定。
pb-ai
PowerBuilder PBL 操作的 MCP 服务器,让 AI 能够直接读取、编辑、编译 PowerBuilder 工程。
Related MCP server: SemanticOps MCP
功能特性
查看 PBL 信息 - 获取 PBL 版本、格式、对象列表
导出源码 - 导出单个或所有对象的源码
导入源码 - 将修改后的源码导入 PBL(自动编译)
同步源码 - 智能同步到本地目录,时间戳保护避免覆盖
删除对象 - 从 PBL 中删除指定对象
编译 PBL - 编译 PBL 中所有对象
创建 EXE - 编译 PBL 为可执行文件
系统要求
Node.js >= 16.0.0
Windows (pb-cli.exe 是 32 位 .NET 程序)
PowerBuilder Runtime DLL
安装
npm install -g github:FLORYHOBBIT/pb-ai#main配置 AI 编辑器
Qoder/ Cursor
在 Settings > MCP 中添加:
{
"mcpServers": {
"pb-ai-mcp": {
"command": "npx",
"args": ["pb-ai"]
}
}
}VS Code (Copilot)
在 .vscode/settings.json 中添加:
{
"chat.mcp.servers": {
"pb-ai-mcp": {
"command": "npx",
"args": ["pb-ai"]
}
}
}MCP 工具列表
工具名 | 说明 |
| 获取 PBL 库信息(版本、格式、对象列表) |
| 列出 PBL 中的源码对象,可按类型过滤 |
| 导出单个对象的源码 |
| 导出所有源码对象到目录 |
| 同步源码到本地目录(时间戳感知) |
| 导入源码文件到 PBL |
| 删除 PBL 中的对象 |
| 编译 PBL 中所有对象 |
| 创建新的 PBL 库 |
| 删除 PBL 库文件 |
| 编译 PBL 为 EXE 可执行文件 |
对象类型与扩展名
类型 | 扩展名 |
Application | .sra |
Window | .srw |
Menu | .srm |
DataWindow | .srd |
Function | .srf |
Structure | .srs |
UserObject | .sru |
Query | .srq |
Pipeline | .srp |
Project | .srj |
支持的 PowerBuilder 版本
PB 10+ (HDR/Unicode-ENT/DAT 格式)
PB 9 (HDR/ANSI-ENT/DAT 格式)
PB 6-9 Classic (Block-based 格式)
故障排除
pb-cli.exe not found
确保 pb-cli.exe 和 PBSpy.dll 与 pb-ai-mcp 在同一目录。
加载失败
检查是否安装了 PowerBuilder Runtime
确保系统是 Windows(不支持 Linux/Mac)
导入源码失败
检查源码语法是否正确
查看编译错误信息定位问题
确保对象类型匹配
许可证
MIT
相关链接
捐赠支持
如果你觉得这个项目帮助到了你,你可以请作者喝杯咖啡表示鼓励 ☕️
独立命令行编译
MCP 服务和命令行入口相互独立,共用同一套工程编译服务。安装后可以直接运行:
pb-build compile "C:\PBProjects\Demo\demo.pbt" --pb-version 80
pb-build build "C:\PBProjects\Demo\demo.pbt" --pb-version 80compile 只执行 Full Rebuild;build 同时生成 PBD 和 EXE。编译期间会持续显示当前阶段及 PB 编译消息,结束时显示产物和日志目录。可用 --exe、--pbr、--icon 覆盖相应路径,或用 --quiet 隐藏逐条普通编译消息。
全局安装后可直接使用 pb-build;本地安装可用 node_modules.bin\pb-build.cmd,或执行 node dist/cli.js。MCP 新入口为 pb-ai,pb-ai-mcp 作为兼容别名保留。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
List, read, edit, and deploy your GenMB AI-generated apps from any MCP client.
- OolkinOAuthcom.oolkin
AI colleagues that keep your standards, your project and their reasoning between sessions
Read-only AI coding tools for change verification, release readiness, capacity, and guidance.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI coding agents to compile Delphi projects programmatically by parsing .dproj files, executing the Delphi compiler, and returning structured error results with multi-language support and automatic configuration generation from IDE build logs.48Apache 2.0
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to read and modify Power BI Desktop files programmatically, including querying models, creating measures, and managing relationships through natural language.256-
- AlicenseAqualityBmaintenanceEnables AI assistants to create and edit GameMaker projects, including scripts, objects, rooms, sprites, and sounds, with support for project validation and compilation.452MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to compile AdvPL/TLPP sources, generate and apply patches, and inspect the RPO of TOTVS Protheus servers.14MIT