mcp-delphi
by flydev-fr·★ 17·综合分 40
MCP 服务器,通过 MSBuild 和 lazbuild 工具构建和清理 Delphi、Lazarus 和 Free Pascal 项目。
概述
mcp-delphi 是一个专门的 MCP 服务器,为基于 Pascal 的开发环境提供工具。它支持三个主要的生态系统:Delphi 项目(使用 MSBuild)、Lazarus IDE 项目和 Free Pascal 编译器(FPC)独立构建。该服务器在 Windows 平台上运行,并通过 rsvars.bat 与 Embarcadero RAD Studio 集成,以正确初始化 Delphi 构建环境。它提供多种构建和清理操作,可配置配置类型、平台和编译器路径等参数。
试试问 AI
装完之后,这里有 5 个你可以让 AI 做的事:
什么时候选它
当你使用 Delphi、Lazarus 或 Free Pascal 项目,并通过 MCP 需要 AI 协助进行构建自动化时,选择此 MCP 服务器。
什么时候不要选它
如果你不使用 Pascal 开发工具,或者需要超出 Windows 范围的跨平台构建支持,请不要选择它。
此 server 暴露的工具
从 README 抽取出 5 个工具delphi.builddelphi.build(project: string, configuration?: string, platform?: string, msbuildPath?: string, rsvarsPath?: string)Builds a Delphi project using MSBuild with optional configuration and platform settings.
delphi.cleandelphi.clean(project: string, configuration?: string, platform?: string, msbuildPath?: string, rsvarsPath?: string)Cleans a Delphi project using MSBuild.
fpc.buildfpc.build(source: string, output?: string, defines?: string[], unitPaths?: string[], includePaths?: string[], cpu?: string, os?: string, fpcPath?: string)Compiles a Pascal program using Free Pascal Compiler.
lazarus.buildlazarus.build(project: string, buildMode?: string, cpu?: string, os?: string, lazbuildPath?: string)Builds a Lazarus project using lazbuild with optional build mode and platform settings.
lazarus.cleanlazarus.clean(project: string, lazbuildPath?: string)Cleans Lazarus build artifacts via lazbuild.
可对比工具
安装
- 安装 Node.js >= 18
- 克隆仓库:
git clone https://github.com/flydev-fr/mcp-delphi - 安装依赖:
pnpm install或npm install - 构建:
pnpm run build - 在
.env文件中配置环境变量(rsvars.bat 和 MSBuild 的路径) - 运行服务器:
node --env-file=.env dist/server.js
对于 Claude Desktop,添加到 claude_desktop_config.json:
{
"mcpServers": {
"mcp-delphi": {
"command": "node",
"args": ["--env-file=.env", "/path/to/mcp-delphi/dist/server.js"]
}
}
}FAQ
- 这个服务器能在 Mac 或 Linux 上运行吗?
- 不能,这是仅限 Windows 的,因为它需要 Windows 特定的 RAD Studio 和 MSBuild。
- 没有 RAD Studio 能否构建项目?
- 对于 Delphi 项目,不行 - 需要 RAD Studio。但是,如果安装了相应的编译器,可以构建 FPC 和 Lazarus 项目。
mcp-delphi 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。