tf_dialect

tf-dialect is a vibe coded MCP (Model Context Protocol) server that exposes your organization's Terraform style guide to AI coding agents, ensuring they generate context-aware, organization-specific Infrastructure as Code instead of generic HCL.
  • typescript

1

GitHub Stars

typescript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "utpaljaynadiger-tf-dialect": {
      "command": "node",
      "args": [
        "/absolute/path/to/tf-dialect/dist/index.js"
      ],
      "env": {
        "TERRAFORM_STYLE_PATH": "absolute/path/to/your/terraform-style.yaml"
      }
    }
  }
}

tf-dialect is an MCP server that teaches AI coding agents your organization's Terraform style guide before code generation. By exposing your conventions upfront, it helps agents generate compliant, secure, and well‑structured IaC on the first attempt, reducing rework and validation overhead across teams and tools.

How to use

You use tf-dialect with any MCP‑capable coding agent by running the server locally and connecting the agent to it. The server provides four tools that let the agent retrieve your style guide, browse examples, validate snippets, and generate resources that align with your conventions. When you start an MCP session, the agent first calls get_style_guide to learn your standards, then may list_examples to pull working patterns, before generating or validating Terraform code.

How to install

Prerequisites: Node.js and npm must be installed on your machine.

# Install dependencies
npm install

# Build the project
npm run build

Configuration

Configure how tf-dialect runs with your MCP client by starting the server as a local process and pointing the client to it. You can pass the path to your style configuration so the agent uses your exact rules during generation.

# Standalone start
npm run mcp

Advanced run configurations

If you want to run tf-dialect with Claude Desktop or the Cline VSCode extension, you provide the standard MCP connection details so the agent can launch the local server and load your style file.

{
  "mcpServers": {
    "tf_dialect": {
      "command": "node",
      "args": ["/absolute/path/to/tf-dialect/dist/index.js"],
      "env": {
        "TERRAFORM_STYLE_PATH": "/absolute/path/to/your/terraform-style.yaml"
      }
    }
  }
}

MCP Tools

The server exposes four tools that agents can use to interact with your style guide. Use these to retrieve configuration, view examples, validate code, and generate resources that follow your rules.

Examples and usage notes

Your examples section provides reusable Terraform snippets. Agents can list examples by resource type or search term to base their outputs on known-good patterns.

Available tools

get_style_guide

Retrieve the complete Terraform style guide configuration including modules, naming, tagging, providers, security_defaults, and examples.

list_examples

List reusable Terraform code examples, optionally filtered by resourceType or search term.

validate_snippet

Validate a Terraform snippet against the style guide and report violations with suggested fixes.

generate_resource

Generate a Terraform resource configuration that follows organization standards, returning the generated code snippet.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational