Delphi
Native Delphi Server implementation of the Model Context Protocol (MCP)
claude mcp add --transport stdio gdksoftware-delphi-mcp-server exec /path/to/MCPServer \ --env PORT="3000" \ --env MCP_ALLOW_ORIGIN="*"
How to use
The Delphi MCP Server implements the Model Context Protocol (MCP) and is designed to integrate Delphi-focused AI tooling with Claude Code, Codex, and other MCP-compatible clients. It supports both HTTP transport (with Server-Sent Events for streaming responses) and STDIO transport (stdin/stdout) to accommodate different client setups. By default, run the HTTP server to expose the MCP endpoint at http://localhost:3000/mcp, with configuration controlled via a settings.ini file. The server also includes an extensible tool system that can discover and execute tools at runtime, a modular resource system for handling various content types, and security features including configurable CORS support. In STDIO mode, the server reads JSON-RPC requests line-by-line from stdin and writes responses to stdout, making it suitable for integration with local scripts or tools that spawn the MCP server as a subprocess.
To use the HTTP transport, start the built Delphi MCP Server executable without arguments in a Windows or Linux environment. For STDIO transport, start the server with the --stdio flag. Both modes expose the same RPC surface (JSON-RPC) and support the MCP protocol’s streaming and event capabilities. Tools and resources are discovered via the built-in managers (CoreManager, ToolsManager, ResourcesManager) and can be invoked by name with optional parameters defined by the tool’s schema. If you’re integrating with Claude Code, Codex, or other clients, connect through the appropriate transport and invoke the available MCP APIs to list tools, run tools, and fetch resources.
How to install
Prerequisites:
- Delphi 12 Athens or later installed on Windows or Linux
- For Linux, a supported Linux kit with cross-compilation (PAServer if using RAD Studio) as described in the README
Installation steps:
- Clone the repository:
git clone https://github.com/GDKsoftware/delphi-mcp-server.git
cd delphi-mcp-server
- Build the project (standalone usage):
- Windows:
build.bat
or specify configuration/platform:
build.bat Debug Win32
build.bat Release Win64
- Linux:
build.bat Release Linux64
Alternatively, open MCPServer.dproj in RAD Studio and build for Linux64 after configuring PAServer.
- Run the server:
- HTTP transport (default):
Win32\Debug\MCPServer.exe
or on Linux binaries similar to MCPServer (no arguments) and adjust port via settings.ini if needed.
- STDIO transport:
Win32\Debug\MCPServer.exe --stdio
- Configuration:
- Edit settings.ini (or use defaults). Key settings include the listening port (default 3000) and CORS settings. For IST/production, ensure the port is open in your firewall and that any reverse proxy (if used) forwards /mcp correctly.
- Optional library usage: If you want to use the server as a library inside a Delphi project, integrate the provided lib/mcpserver source paths and units as described in the README, then instantiate the HTTP or STDIO transport with a ManagerRegistry to expose the MCP endpoints within your application.
Additional notes
Tips and notes:
- Transport modes: HTTP (default, with SSE) and STDIO. Use --stdio to switch to STDIO mode.
- Ports and networking: The server defaults to port 3000 for HTTP. Adjust via settings.ini or environment variables if you deploy behind a reverse proxy.
- Security: CORS configuration is available; tailor it to your deployment to control cross-origin access.
- Tool system: The ToolsManager supports RTTI-based discovery and execution of tools. You can create custom tools and register them in your Delphi project as shown in the README examples.
- Resources: The ResourcesManager allows serving various content types (e.g., models, data, artifacts) as part of MCP interactions.
- Cross-platform: The server supports Windows and Linux x64; ensure you build for the correct target platform.
- Debugging: When running in STDIO mode, each JSON-RPC request must be provided on a new line. Responses will be written one per line to stdout. Logs go to stderr.
- Integration: For Claude Code or Codex integration, leverage the HTTP transport to stream responses or use STDIO for local tool chaining (subprocess usage).
Related MCP Servers
Wax
Sub-Millisecond RAG on Apple Silicon. No Server. No API. One File. Pure Swift
wanaku
Wanaku MCP Router
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
Pare
Dev tools, optimized for agents. Structured, token-efficient MCP servers for git, test runners, npm, Docker, and more.
workflowy
Powerful CLI and MCP server for WorkFlowy: reports, search/replace, backup support, and AI integration (Claude, LLMs)