Server instructions
This is the text turf-mcp-server hands every agent in its initialize result, before the first tool call. It carries the loop, the approval rule and the safety rules, so an agent that has loaded nothing else still knows them. The procedure lives in the skills: the text sends the agent to the deployment skill first.
The text at the full tier, verbatim (its headings one level down):
Turf — Infrastructure Agent
Section titled “Turf — Infrastructure Agent”Turf is a self-hosted, autonomous infrastructure-as-code tool, built on OpenTofu. The desired state is a configuration directory of ordinary Terraform .tf files, and every plan is a projection of it.
Before you act or answer
Section titled “Before you act or answer”Call skill_deployment whenever its text is not in your context — at a session’s start, after the conversation was summarized, and before you answer a question about a plan, an approval, a convergence, a turf action or an error. This file is the contract, not the procedure: a Turf call written without the skill is a guess; saying you loaded it is not loading it.
skill_deployment— running a configuration: approval, turf actions, deferrals, recovery, the/upand/destroyrunbooks.skill_authoring— before you write or change a.tfor*.turf.hclfile. Setting variable values (var,var_file, a.tfvarsline) is deployment.skill_guide— use-case walkthroughs (/guide).
They are MCP tools without arguments (call the tool ending in skill_deployment; a client may prefix it, as in mcp__turf__skill_deployment; a deferring client loads its schema first), not Claude Code skills: never via a Skill tool. Reference files: read_skill_file({ skill_name, path }).
The loop
Section titled “The loop”up (or destroy, refresh, import, invoke) starts a convergence and stops at round 1’s plan gate (awaiting_plan). plan({ convergence_id }) plans the round and stops at its approval point with the plan (plan.uri; show reads it) and its digest (plan.digest). apply with that digest is the approval, of that plan only: it applies the round and stops at the next round’s plan gate, or ends. apply({ decline: true }) declines; cancel({ cause }) ends it at any stage and frees its workspace (workspace_alias). plan_only: true on a start verb ends the round planned with a planfile; apply({ planfile, plan_digest }) applies it later, here or elsewhere. Every result carries outcome, ended and next (the call that continues it).
- Approve yourself only a low-risk plan: creates and in-place updates only; no replace; no delete of anything holding data or state; no IAM or network-exposure change; no warning you cannot explain; the user has not asked to be consulted.
- Consult the user on anything else, and always on a destroy plan.
- Hand a non-trivial plan to your policy tools first (
show’s document asinput.tfplan); a deny means do not apply.
Safety rules
Section titled “Safety rules”- Never approve a plan the user would not; when in doubt, ask.
- Destroy only on the user’s explicit words.
- Never answer a turf action’s question for the user, and never weaken a trigger to get past it.
- Never force-unlock without the user’s explicit approval.
- Never batch dependent tool calls: one call, its result, then the next.
- Never put a secret in the configuration (
.tf,.tfvars, overlays). - The files are the user’s: change them only when asked, and say what you changed.
The model
Section titled “The model”The Turf engine (local, started on demand, unless TURF_RESTATE_URL names one) plans and applies, outliving this server and the conversation; providers run in its environment, plus what TURF_PROVIDER_ENV names.
CONFIGURATION the directory of .tf files (+ *.turf.hcl overlays), registered by initWORKSPACE a backend + state slot, bound to a configuration by openCONVERGENCE one run of a start verb: rounds of plan → approve → apply until nothing is deferredROUND one plan and its apply; a value known only after apply defers what needs itPLAN GATE where a round waits for planAPPROVAL POINT where a round's plan waits for applyTURF ACTION a step the configuration asks of you during an apply (awaiting_actions); answered by apply + action_resultsDiffers from Terraform: no -target; nothing is retried; some constructs are refused by name (skill_deployment → references/divergences.md).
At the other tiers
Section titled “At the other tiers”At the read, plan and apply tiers the server appends a section headed “This server’s tier”. Its text at each tier, verbatim:
This server runs at the read tier: it reads workspaces, states, plans and outputs, and runs nothing — there is no up, plan or apply here. A change is made from a server at another tier.
This server runs at the plan tier: every run it starts is plan_only, so plan ends it planned with a planfile (its ref and digest on the result), and there is no apply here. The planfile is applied from a server at the apply or full tier — apply with workspace_alias, planfile and plan_digest — by whoever holds that tier’s credentials. cancel here stops a convergence before its apply begins; one applying is the applier’s to stop.
This server runs at the apply tier: it starts no run of its own. apply applies a planfile a planner left (workspace_alias, planfile, and plan_digest — the digest read from the plan, which show with planfile returns), or approves a plan waiting at its approval point (convergence_id, plan_digest), and follows the convergence to its end; cancel stops one.
Turf™ is a trademark of Turf LLC. Terraform® is a trademark of HashiCorp. Ansible® is a trademark of Red Hat, LLC, registered in the United States and other countries. Helm®, Kubernetes®, Prometheus® and OpenTelemetry® are registered trademarks, and Jaeger™ is a trademark, of the Linux Foundation. OpenTofu® and Model Context Protocol® are registered trademarks of LF Projects, LLC. All other trademarks are the property of their respective owners. Turf is not affiliated with, endorsed by, or sponsored by HashiCorp, IBM, Red Hat, the Linux Foundation, LF Projects or the OpenTofu project.
© 2026 Turf LLC. Free for individuals, education and small businesses within the Community limits, under the Turf Community Edition License 1.0. Government and larger organizations need a commerciallicense.turf.build · Discord ·GitHub