PDMT MCP Server: Deterministic Templating and Todo Validation
Enable reproducible outputs with PDMT MCP server: deterministic templating, todo validation, quality enforcement and 0.0-temperature generation.
Overview
PDMT MCP Server provides a lightweight server implementing the Model Context Protocol (MCP) to produce reproducible, verifiable outputs from language models. It focuses on deterministic templating and post-generation checks so outputs can be relied on in pipelines and automated workflows. Key behaviors include 0.0-temperature generation, explicit TODO detection/validation, and configurable quality enforcement to ensure responses meet pre-defined constraints.
The server sits between your application and an LLM or LLM provider. Instead of treating the model as an opaque generator, PDMT applies templates and validation rules, runs the model deterministically, and returns structured results. This helps teams achieve reproducible content, reduce hallucinations, and enforce quality gates before downstream consumption.
Features
- Deterministic generation (temperature = 0.0) to produce reproducible outputs
- Template-driven generation: stable prompts and output structure for predictable responses
- TODO detection and validation to surface unresolved placeholders and fail builds early
- Quality enforcement with configurable thresholds (e.g., confidence, token checks)
- MCP-compatible API for integration with existing MCP clients and tooling
- Extensible plugin points for custom validators, templates, and LLM backends
- Logging and structured error reporting for automated CI/CD use
Installation / Configuration
Basic steps to get the server running locally. Adjust commands for your environment.
Clone and run (generic example):
# Build & run (example using Docker Compose if provided)
Run from source (Python/Node placeholder — replace with actual stack commands if applicable):
# Python example
Configuration example (YAML):
server:
host: 0.0.0.0
port: 8080
model:
provider: openai
model_name: gpt-4o
temperature: 0.0 # enforce deterministic generation
max_tokens: 512
validation:
todo_validation: true
fail_on_todos: true
quality_threshold: 0.85
templates_dir: ./templates
Command-line flags (common):
# Start server with explicit config
# Run in a single-shot mode to render a template
Available Tools / Resources
- Template Engine: deterministic template rendering with placeholders and typed fields
- Todo Validator: scans generated text for markers like TODO, FIXME, or custom tags and returns structured diagnostics
- Quality Enforcer: runs heuristics and optional model-backed checks (e.g., semantic similarity) against expected outputs and scores results
- MCP Schema: supports MCP request/response envelopes so clients can integrate without custom adapters
- Example Templates: a library of sample templates for emails, API docs, changelogs, and commit messages
Example MCP request envelope (JSON):
Typical response with validation:
If TODOs are present and fail_on_todos is enabled:
Use Cases
CI/CD content generation: Produce changelogs or release notes deterministically in a build pipeline. The server ensures identical outputs for the same inputs and fails builds when TODOs remain.
- Example: generate release_notes.tpl with version and changes; abort deployment if any TODOs detected.
Documentation and API scaffolding: Use templates to render API docs with guaranteed structure. Use quality enforcement to require a minimum semantic similarity to example docs before merging.
- Example: render api_doc.tpl then run the quality enforcer to ensure coverage > 0.9.
Automated email or message generation: Create templated notifications with placeholders validated. The server prevents sending messages with unresolved placeholders like TODO or FIXME.
- Example: generate welcome email via greeting.tpl; todo_validation ensures personalization fields are filled.
Regression testing for model output: Lock templates and inputs into tests to assert that outputs remain unchanged across model/provider upgrades. Deterministic generation gives repeatable baselines.
- Example: store golden files for template outputs and compare each CI run.
Configuration options (summary)
| Key | Type | Description | Default |
|---|---|---|---|
| model.temperature | float | Sampling temperature; 0.0 enforces determinism | 0.0 |
| validation.todo_validation | bool | Enable scanning for TODO markers | true |
| validation.fail_on_todos | bool | Fail request if TODOs are found | true |
| validation.quality_threshold | number | Minimum acceptable quality score (0-1) | 0.8 |
| templates_dir | string | Filesystem path with template definitions | ./templates |
Getting Help and Contributing
- Repository: https://github.com/paiml/pdmt
- For issues, feature requests, and contributions, open an issue or pull request on GitHub.
- Extend validators or templates by adding modules under the respective directories; follow the included examples for ABI-compatible plugins.
This server is designed to be a practical layer for deterministic, verifiable LLM outputs. Integrate it where repeatability, automation, and quality gates are important parts of your developer workflow.