YT

yawlabs/terraform-cwd-mcp

Developer toolsОфициальный

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

1 stars 0 forks Качество 76 Тренд 22MIT

Terraform MCP server for what is true in THIS working directory: pinned provider schemas, saved plans, redacted state, local modules and provider-upgrade impact

Обзор

One click adds this to your local Yaw MCP config so it's available in every Yaw Terminal session. Or install manually below. It complements HashiCorp's terraform-mcp-server rather than replacing it: that server answers from the Terraform Registry docs, which describe the latest provider release; this one answers from terraform providers schema -json in your root module, which describes the version you actually locked. Run both. Your lock file says hashicorp/aws 5.31.0; the registry docs (and the model's training data) say whatever came later or earlier. Agents then write arguments that were added after your pin, removed before it, or are computed-only and cannot be set at all. terraform validate catches it -- after the code is written. This server lets the agent check before it writes. - -- the source of truth is terraform providers schema -json run in your root module, with versions read from .terraform.lock.hcl.

README

Показан фрагмент оригинального README. Открыть оригинал.

@yawlabs/terraform-cwd-mcp

One click adds this to your local Yaw MCP config so it’s available in every Yaw Terminal session. Or install manually below.

What is actually true in THIS Terraform working directory: the exact provider schemas pinned in your .terraform.lock.hcl (so coding agents stop writing arguments that do not exist, were removed, or are read-only), plus your saved plans, your state (redacted), your local and installed modules, and what a provider upgrade would break. It complements HashiCorp’s terraform-mcp-server rather than replacing it: that server answers from the Terraform Registry docs, which describe the latest provider release; this one answers from terraform providers schema -json in your root module, which describes the version you actually locked. Run both.

Built and maintained by Yaw Labs.

Why this one?

Your lock file says hashicorp/aws 5.31.0; the registry docs (and the model’s training data) say whatever came later or earlier. Agents then write arguments that were added after your pin, removed before it, or are computed-only and cannot be set at all. terraform validate catches it – after the code is written. This server lets the agent check before it writes.

  • Pinned, not latest – the source of truth is terraform providers schema -json run in your root module, with versions read from .terraform.lock.hcl.
  • Read-only, never inits – it never runs terraform init (no downloads, no backend contact, no lock-file rewrites). An uninitialized directory gets an actionable error telling you what to run.
  • Cached per lock file – dumps are cached in memory and on disk, keyed on the root path plus the lock file’s bytes, so a provider upgrade invalidates the cache automatically. The AWS provider’s schema is tens of MB; you pay for that dump once per lock-file change, not per question.
  • Small answers – tf_get_schema renders one type as a compact indented outline with required / optional / optional+computed / computed (read-only), [deprecated], [sensitive] and [write_only] flags, instead of handing the model raw JSON.
  • Cross-platform – macOS, Linux and Windows. Terraform is spawned directly (no shell) and its output is streamed, so there is no buffer ceiling.

Tools

Tool What it does
Открыть полный README на GitHub

Установка

npx -y @yawlabs/terraform-cwd-mcp@latest
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "terraform-cwd": { "command": "npx", "args": ["-y", "@yawlabs/terraform-cwd-mcp@latest"] } } }