Documentation
pascal-mcp-sdk lets any FreePascal program expose tools, resources, and prompts to AI agents over the Model Context Protocol — no second language runtime, no framework, no third-party dependencies beyond FPC's own RTL and fpjson.
New to AI agents? Start with the introduction — MCP explained for Pascal developers, no AI background assumed. Then the quick start gets a working server registered with an MCP client in a few minutes.
Guides
Task-oriented pages for building and shipping your own MCP server:
- Introduction — what AI agents are, what MCP standardizes, and where your Pascal code fits.
- Quick start — install, write a server, serve it over stdio or Streamable HTTP, register it with a client.
- Your first conversation — an agent calling a Pascal tool, on screen and on the wire.
- Tools — the core registration model: handlers, typed argument classes, validation, annotations, MRTR.
- Schemas — the fluent builder, RTTI-derived argument classes, output schemas, and the enforced subset.
- Prompts — reusable message templates with declared arguments.
- Resources — static text, reader callbacks, blobs, and RFC 6570 URI templates.
- Configuration — the server properties: instructions, caching hints, error redaction, dual-era mode.
- Progress and logging — in-request notifications and stderr diagnostics.
- Shipping your server — release builds, the runtime contract, client registration, HTTP deployment posture.
- Troubleshooting — the failure modes everyone hits once.
- Cookbook — complete worked examples, anchored in the demo server.
Reference
The public API surface, page by page:
- Server API —
TMCPServer: every registration overload, options, and configuration property. - Results and content — the helpers handlers return results with.
- Client requests — MRTR builders and accessors: elicitation, sampling, roots.
- Protocol coverage — the surface-by-surface record of what the library implements, with verification and interop evidence.
Contributing
How the library itself is built: architecture (the six-unit layering and spec grounding), tooling, code style, and releasing. The contribution workflow — clone, build, test, format, CI — lives in CONTRIBUTING.md.