The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the MCP Prompt Engine listing page.
A Model Control Protocol (MCP) server for managing and serving dynamic prompt templates using elegant and powerful text template engine. Create reusable, logic-driven prompts with variables, partials, and conditionals that can be served to any compatible MCP client like Claude Code, Claude Desktop, Gemini CLI, VSCode with Copilot, etc.
_header.tmpl) and reuse them across your prompts.A hosted deployment is available on Fronteir AI.
Install using Go:
(For other methods like Docker or pre-built binaries, see the Installation section below.)
Create a prompts directory and add a template file. Let's create a prompt to help write a Git commit message.
First, create a reusable partial named prompts/_git_commit_role.tmpl:
Now, create a main prompt prompts/git_stage_commit.tmpl that uses this partial:
```go
{{- /* Commit currently staged changes */ -}}
Validate your prompt to ensure it has no syntax errors:
Add MCP Server to your MCP client. See Connecting to Clients for configuration examples.
Your git_stage_commit prompt will now be available in your client!
For example, in Claude Desktop, you can select the git_stage_commit prompt, provide the type MCP Prompt argument and get a generated prompt that will help you to do a commit with a perfect message.
In Claude Code or Gemini CLI, you can start typing /git_stage_commit and it will suggest the prompt with the provided arguments that will be executed after you select it.
Download the latest release for your OS from the GitHub Releases page.
A pre-built Docker image is available. Mount your local prompts and logs directories to the container.
You can also build the image locally with make docker-build.
Create a directory to store your prompt templates. Each template should be a .tmpl file using Go's text/template syntax with the following format:
The first line comment ({{/* description */}}) is used as the prompt description, and the rest of the file is the prompt template.
Partial templates should be prefixed with an underscore (e.g., _header.tmpl) and can be included in other templates using {{template "partial_name" .}}.
The server uses Go's text/template engine, which provides powerful templating capabilities:
{{.variable_name}} - Access template variables{{.date}} - Current date and time{{if .condition}}...{{end}}, {{if .condition}}...{{else}}...{{end}}{{if and .condition1 .condition2}}...{{end}}, {{if or .condition1 .condition2}}...{{end}}{{range .items}}...{{end}}{{template "partial_name" .}} or {{template "partial_name" dict "key" "value"}}See the Go text/template documentation for more details on syntax and features.
The server automatically parses argument values as JSON when possible, enabling rich data types in templates:
true, false → Go boolean values42, 3.14 → Go numeric values["item1", "item2"] → Go slices for use with {{range}}{"key": "value"} → Go maps for structured dataThis allows for advanced template operations like:
To disable JSON parsing and treat all arguments as strings, use the --disable-json-args flag for the serve and render commands.
The CLI is your main tool for managing and testing templates.
By default, it looks for templates in the ./prompts directory, but you can specify a different directory with the --prompts flag.
1. List Templates
2. Render a Template
Render a prompt directly in your terminal, providing arguments with the -a or --arg flag.
It will automatically inject environment variables as fallbacks for any missing arguments. For example, if you have an environment variable TYPE=fix, it will be injected into the template as {{.type}}.
3. Validate Templates
Check all your templates for syntax errors. The command will return an error if any template is invalid.
4. Start the Server
Run the MCP server to make your prompts available to clients.
To use this engine with any client that supports MCP Prompts, add a new entry to its MCP servers configuration.
Global configuration locations (MacOS):
~/.claude.json (mcpServers section)~/Library/Application\ Support/Claude/claude_desktop_config.json (mcpServers section)~/.gemini/settings.json (mcpServers section)Example for a local binary:
Example for Docker:
This project is licensed under the MIT License - see the LICENSE file for details.