Delphi MCP Server
Native Delphi Server implementation of the Model Context Protocol (MCP)
- Transport
- Not stated
- Package
- —
- Registry id
- —
No install snippet on purpose. A working MCP config is a command, its arguments and an environment block — the last two are where API keys live, so this catalogue never stores them and cannot publish them. Follow the link above for the authors' own instructions.
A Model Context Protocol (MCP) server implementation in Delphi, designed to integrate with Claude Code, Codex, and other MCP-compatible clients for AI-powered Delphi development workflows.
Table of Contents
- Features
- Requirements
- Installation
- Transport Modes
- Protocol Versions and Dual-Era Behaviour
- Using as a Library
- Integration with Claude Code
- Integration with Codex
- Testing with MCP Inspector
- Available Example Tools
- Available Example Prompts
- Available Example Resources
- Configuration
- License
- Contributing
- About GDK Software
- Support
- Commercial Support
Features
- Dual-era MCP: Serves MCP 2026-07-28 (per-request
_meta,server/discover) and the initialize-based revisions 2025-06-18 and 2025-11-25 on the same endpoint and the same stdio process; see Protocol versions - Dual Transport Support: HTTP (Streamable HTTP with SSE) and STDIO (stdin/stdout)
- Dual Response Mode: Supports both JSON-RPC and Server-Sent Events in the same server
- Tool System: Extensible tool system with RTTI-based discovery and execution
- Resource Management: Modular resource system supporting various content types
- Security:
OriginandHostvalidation against DNS rebinding on every request, loopback binding by default, CORS headers for browser clients, request size and nesting limits, opt-in bearer authentication with OAuth 2.1 resource-server discovery - Multi round-trip requests, streaming and subscriptions:
InputRequiredResultwith signedrequestState, progress and log notifications on the response stream,subscriptions/listenfor change notifications - Native HTTP stack: Indy HTTP server with keep-alive, no external runtime
- Optional Parameters: Support for optional tool parameters using custom attributes
- Cross-Platform: Supports Windows (Win32/Win64) and Linux (x64)
Requirements
- Delphi 11 Alexandria or later. The source uses no language feature beyond inline variables (10.3) and no RTL unit newer than Delphi 11; development happens on Delphi 12 Athens, which is what the default project files target.
- Windows (Win32/Win64) or Linux (x64)
- No external dependencies (all required libraries included)
Building with Delphi 11 Alexandria
build.bat and build-tests.bat compile the .dpr directly, so only DELPHI_PATH needs to point at your installation:
set DELPHI_PATH=C:\Program Files (x86)\Embarcadero\Studio\22.0
build.bat
For the IDE and for the Linux64 build, open src/MCPServer.D11.dproj (tests: tests/MCPServerTests.D11.dproj) instead of the Athens project files. They carry the same units and settings, write their output to a separate D11 subdirectory, and exist because Alexandria will not load a ProjectVersion 20.3 project file.
Installation
For Standalone Usage
- Clone the repository:
git clone https://github.com/GDKsoftware/delphi-mcp-server.git
cd delphi-mcp-server
- Build the project:
Windows Build
build.bat
Or specify configuration and platform:
build.bat Debug Win32
build.bat Release Win64
From the project's README.