Delphi

Delphi and Lazarus/FPC MCP server: build/clean pascal projects via MCP tools.
  • typescript

13

GitHub Stars

typescript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "flydev-fr-mcp-delphi": {
      "command": "node",
      "args": [
        "--env-file=.env",
        "dist/server.js"
      ],
      "env": {
        "RSVARS_BAT": "C:\\Program Files (x86)\\Embarcadero\\Studio\\23.0\\bin\\rsvars.bat",
        "MSBUILD_PATH": "C:\\Program Files\\Microsoft Visual Studio\\2022\\BuildTools\\MSBuild\\Current\\Bin\\MSBuild.exe",
        "DELPHI_CONFIG": "Release",
        "DELPHI_PLATFORM": "Win32"
      }
    }
  }
}

You can run an MCP server that exposes Delphi build and clean capabilities on Windows. This server lets you trigger MSBuild-based Delphi projects from MCP clients, initializing the RAD Studio environment as needed, and it supports various Delphi project types as well as Free Pascal and Lazarus builds through additional tools.

How to use

You interact with this server from an MCP client by invoking named MCP endpoints. For Delphi builds, you request actions such as building or cleaning a Delphi project, and the server executes MSBuild with the appropriate RAD Studio environment initialized by rsvars.bat. You can start a local stdio-based MCP server and connect to it from your MCP tooling, or run the server as a binary if you prefer a global command.

How to install

Prerequisites and installation steps you need to follow in order to run the server locally.

# Install dependencies
pnpm install

# Build the server
pnpm run build

# Or use npm
npm install
npm run build

Configuration

Configure defaults and environment variables to tailor the server behavior for your Delphi build environment.

RSVARS_BAT=C:\Program Files (x86)\Embarcadero\Studio\23.0\bin\rsvars.bat
MSBUILD_PATH=C:\Program Files\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe
DELPHI_CONFIG=Release
DELPHI_PLATFORM=Win32

Running

Start the MCP server as a stdio-based process so you can send commands and receive results through the standard input/output streams.

node --env-file=.env dist/server.js

Or run the installed binary directly if you have it installed globally or as a dependency.

## Notes on usage and behavior

- The server is Windows-first and relies on the RAD Studio toolchain and MSBuild to compile Delphi projects. Ensure rsvars.bat is available to set the required environment variables.

- Group projects (.groupproj) are supported; MSBuild will traverse contained projects. If you provide rsvars.bat via RSVARS\_BAT or the equivalent environment, the Delphi environment is prepared before invoking MSBuild.

## Available tools

### delphi.build

Builds a Delphi project using MSBuild. If rsvarsPath or RSVARS\_BAT is provided, it initializes the Delphi environment before invoking MSBuild in a single shell.

### delphi.clean

Cleans a Delphi project by invoking the corresponding MSBuild targets.

### fpc.build

Compiles a Pascal program using the Free Pascal Compiler. You may pass an explicit fpcPath or rely on PATH.

### lazarus.build

Builds a Lazarus project using lazbuild. You can set CPU/OS or a build mode.

### lazarus.clean

Cleans Lazarus build artifacts via lazbuild --clean.
Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational