Install
$ agentstack add mcp-danieleteti-mcp-server-delphi ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
MCP for Delphi
### Server · Client · Agent — a full-stack MCP toolkit for DMVCFramework
[](https://github.com/danieleteti/mcp-server-delphi) [](LICENSE) [](https://www.embarcadero.com/products/delphi)
A production-ready Model Context Protocol (MCP) toolkit for Delphi. It is not just a server library — it gives Delphi the complete MCP triangle in one package.
## 📖 Full documentation & guide → www.danieleteti.it/mcp-server-delphi
This README is just a hook. Every detail — getting started, API reference, the client, the agent, the REST→MCP bridge, configuration and testing — lives in the official documentation.
---
## What is this?
Most "MCP for X" libraries only let you build a server the AI calls into. This one gives Delphi all three corners of the MCP world:
| | Role | What it does | |---|------|--------------| | 🟢 | Server | Expose your Delphi tools, resources, and prompts to AI assistants (Claude, Gemini, ChatGPT, …) over HTTP or stdio — attribute-driven, zero boilerplate. | | 🔵 | Client | Consume any spec-compliant MCP server from your own Delphi code with TMCPClient (Streamable HTTP) or TMCPStdioClient (spawns a server as a child process and talks over pipes). | | 🟣 | Agent | Drive an MCP server from an LLM with TMCPOpenAIAgent — a complete agent loop (tool discovery → LLM round-trips → tool dispatch → token accounting) that works with any OpenAI-compatible model: OpenAI, OpenRouter, Anthropic-compat, Together, Groq, Ollama, vLLM, llama.cpp --api. | | 🌉 | REST → MCP Bridge | Auto-expose an existing DMVCFramework REST API as MCP tools by scanning the engine's routes via RTTI. Make your current backend AI-ready without writing a single tool by hand. |
In short: build AI-powered Delphi applications where Delphi is the server, the client, and the agent.
> 🚀 MCP with DMVCFramework? Sure — even for on-premises AI engines. > > Expose your ERP and let a Delphi-side agent chain your tools. Ask: > "Reorder customer C-1024's best-selling product from last March — but only if they're within their credit limit." > The agent finds March's top product, reads the customer's balance, decides, and drafts the invoice — several tool calls, planned on the fly, all against your data. 💡
## Features at a glance
- MCP Protocol 2025-03-26 compliant
- Server, client AND agent in one library — plus a REST→MCP bridge
- Attribute-driven tool/resource/prompt registration using RTTI — no manual wiring
- Dual transport, server and client side: Streamable HTTP and stdio
- Type-safe parameter binding with automatic JSON Schema generation
- Rich content types: Text, Image, Audio, Embedded Resources — with a fluent multi-content API
- URI resource templates (RFC 6570 Level 1)
- Session management with automatic cleanup
- DMVCFramework integration via the idiomatic
PublishObjectpattern - Apache 2.0 — free for commercial and personal use
## A 30-second taste
Expose a tool (server):
``pascal [MCPTool('reverse_string', 'Reverses a string')] function ReverseString( [MCPParam('The string to reverse')] const Value: string ): TMCPToolResult; ``
Call a server (client):
``pascal LClient := TMCPClient.Create('http://localhost:8080/mcp'); LClient.Initialize; WriteLn(LClient.CallTool('reverse_string', TJSONObject.Create.AddPair('Value', 'hello'))); ``
Drive a server from an LLM (agent):
``pascal LAgent := TMCPOpenAIAgent.Create('http://localhost:8080/mcp', LApiKey, 'gpt-4o-mini'); LAgent.SystemPrompt := 'You are a helpful Delphi-powered assistant.'; LResult := LAgent.Run(LUserMessages); // tool discovery + LLM loop + dispatch WriteLn(LResult.Content); ``
👉 Full, runnable examples and the complete API are in the documentation.
## Quick Start
Copy a ready-to-run Quick Start project and customize it — all share the same provider units in [quickstart/shared/](quickstart/shared/):
| Project | Role | Transport | Use when | |---------|------|-----------|----------| | [quickstart/quickstart/](quickstart/quickstart/) | Server | HTTP + stdio | You want a network server AI clients connect to via HTTP | | [quickstart/quickstart_stdio/](quickstart/quickstartstdio/) | Server | stdio only | You want the AI client (e.g. Claude Desktop) to launch the server locally | | [quickstart/quickstart_stdio_agent/](quickstart/quickstartstdio_agent/) | Agent (host+client) | stdio | You want a Delphi-side AI agent that spawns and consumes a stdio MCP server, driven by an LLM |
Open the .dproj in Delphi, add DMVCFramework and this repo's sources/ to the search path, build, run. Step-by-step instructions, IDE wiring, and how to connect Claude Desktop / Gemini CLI / Claude Code / Continue are all in the documentation.
## Testing ✅
Extensively tested by four independent compliance suites: a Python HTTP suite (185 cases), a Python stdio suite (142 cases), a TMCPClient suite (21 Delphi cases, run over both HTTP and stdio), and a TMCPOpenAIAgent suite (8 Delphi cases driving the agent loop against an embedded fake LLM). See the documentation for how to build and run them.
## Requirements
- Delphi 11+ (Alexandria) or later
- DMVCFramework 3.5.x
## License
Apache License 2.0 — see [LICENSE](LICENSE).
## Links
- 📖 Official Documentation & Full Guide ← start here
- Model Context Protocol Specification
- DMVCFramework
- Issue Tracker
Built with ❤️ by Daniele Teti
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: danieleteti
- Source: danieleteti/mcp-server-delphi
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.