Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog
Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

AllMCPs on GitHub (opens in a new tab)
Launched onTiny Startupstinystartups.com
Explore
  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Random discovery New
  • Submit a server
  • Pricing & Boost Boost
Learn
  • Guides hub
  • What is MCP?
  • Install guide
  • Build an MCP server
  • Deploy an MCP server
  • Security guide
  • Troubleshooting
  • MCP for SEO & AEO
  • Protocol versioning
  • Blog & updates
Tools
  • All developer tools
  • Config generator
  • Config validator
  • Config auditor
  • MCP playground
  • Token calculator
  • OpenAPI → MCP
  • Badge generator
For agents
  • REST API docs
  • Trust & traffic Live
  • Remote MCP server SSE ↗ (opens in a new tab)
  • llms.txt ↗ (opens in a new tab)
  • Catalog JSON ↗ (opens in a new tab)
Company
  • About
  • Advertise Sponsor
  • Contact
  • GitHub ↗ (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZoneAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistLaunched on Tiny StartupsFeatured on ShowMeBestAIFeatured on ShowMeBestAIFind us on LaunchZoneFind us on LaunchZone
© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. ☁️ Cloud Platforms
  3. MCP Server Terraform
MCP Server Terraform logo
Health: ActiveRecent health check succeeded.Last checked 9/11/2026, 5:31:22 PM

MCP Server Terraform

User RatingsBe the first to rate and review this MCP server!
View Repository1 GitHub StarsTotal stargazers on GitHub for the source repository (1 stars).Visit Website

Manage Terraform infrastructure via natural language with safety checks, cost analysis, drift detection, and audit logging.

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.

Add to CursorAdd to VS Code
Not yet automatically verified

We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag — we're steadily working through the catalog.

Manual Client & Custom JSON ConfigExpand JSON ▾

Client Config & Setup

Choose your client or environment
Target File:~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "rajeevsirohi-mcp-server-terraform": {
      "command": "npx",
      "args": [
        "-y",
        "@rajsir/mcp-server-terraform"
      ]
    }
  }
}

💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.

Install Tool Schemas (11) Directory Badge Claim listing Alternatives☁️ More in Cloud Platforms

Overview

This MCP server enables conversational management of Terraform by translating natural language commands into Terraform CLI operations. It supports planning, applying, destroying, inspecting state, and diagnosing failures with built-in safety confirmation steps before destructive actions. The server analyzes plans for risk and cost, detects drift from manual changes, and logs all operations with sensitive data redacted. Use it to integrate Terraform workflows into chat-based AI agents while maintaining operational safety and visibility.

Use cases

•Run Terraform plan and get detailed change and cost summaries
•Apply or destroy infrastructure with two-step confirmation
•Detect and report drift from manual infrastructure changes
•Inspect Terraform state, outputs, and workspaces
•Diagnose plan or apply failures via guided prompts

Key features

•Natural language interface to Terraform CLI commands
•Two-step confirmation flow for destructive operations
•Plan risk and cost analysis highlighting expensive always-on resources
•Drift detection comparing state to real infrastructure
•Audit logging with redacted sensitive values
•Preflight provider authentication checks

Capabilities & Tool Schemas (11) ~140 tokensApproximate context cost of this server’s tool schemas (~4 chars/token), before any tool is called. Actual usage depends on your client and model.Self-reported Self-reportedParsed from the repository README, not verified against a live server — may be incomplete or out of date.

Inspect callable tools, capabilities, and parameters exposed to AI agents by MCP Server Terraform.

tf_init

Initialize a Terraform working directory

tf_validate

Validate configuration syntax

tf_plan

Run a plan and return the diff + risk/cost summary

tf_apply

Apply changes (requires `confirmed: true`)

tf_destroy

Destroy infrastructure (requires `confirmed: true`)

tf_output

Read output values from state

Documentation Overview

mcp-server-terraform

CI npm License: MIT

A Model Context Protocol (MCP) server that lets Claude manage Terraform infrastructure through natural language.

Run plans, apply changes, inspect state, and diagnose failures — all from a Claude conversation.

What it does

Instead of switching to a terminal to run terraform plan, you can ask Claude:

"Plan the changes in /infra/staging and explain what will change"

"Apply it — but only if no resources will be destroyed"

"Show me all the outputs from the prod workspace"

"Something broke after the last apply — diagnose it"

The server translates these into real terraform CLI commands on your machine, with a built-in safety confirmation flow before any destructive operation runs.

Tools

ToolDescriptionDestructive
tf_initInitialize a Terraform working directoryNo
tf_validateValidate configuration syntaxNo
tf_planRun a plan and return the diff + risk/cost summaryNo
tf_applyApply changes (requires confirmed: true)Yes
tf_destroyDestroy infrastructure (requires confirmed: true)Yes
tf_outputRead output values from stateNo
tf_stateList, show, move, or remove state entriesPartial
tf_workspaceList, show, select, or create workspacesNo
tf_preflightCheck provider CLI authentication before runningNo
tf_driftDetect resources changed outside TerraformNo
tf_resourceImport, taint, untaint, or refresh resourcesYes

Plan risk & cost summary

Every plan (and every apply preview) is analyzed via terraform show -json and annotated with a structured summary — destroyed resources are called out, and always-on resources that commonly cause bill shock are flagged with rough monthly costs:

Code
── Plan Summary ──
+ 3 create, ~ 1 update, - 0 destroy, ± 0 replace

💸 EXPENSIVE — always-on resources being created:
   ⚠ aws_nat_gateway.main (~$32/month + data processing if left running)
   Remember to tf_destroy when you're done experimenting.

Cost-flagged resource types include NAT gateways, load balancers, EKS/AKS/GKE control planes, RDS/Cloud SQL instances, ElastiCache, Redshift, MSK, and Azure Firewall (~$900/month!).

Drift detection

tf_drift runs a refresh-only plan and reports resources that were changed outside Terraform (e.g. manually in the cloud console), with the changed attribute names and remediation options.

Audit logging

Set AUDIT_LOG_PATH to a file path and every tool call is appended as a JSON line with timestamp, tool name, outcome, and duration. Variable values are always redacted (db_password=<redacted>) — only names are logged.

Confirmation flow

tf_apply and tf_destroy use a two-step safety flow:

  1. First call (no confirmed) → runs terraform plan, shows the diff, does nothing else
  2. Second call (confirmed: true) → actually applies or destroys

Claude is instructed to never pass confirmed: true without first presenting the plan to you.

Prompt

The server exposes a /tf-diagnose prompt that guides Claude through a systematic 5-step diagnosis of plan or apply failures.

Prerequisites

  • Node.js 18 or later
  • Terraform CLI on your PATH
  • Claude Desktop (or any MCP-compatible client)

Installation

No install needed — run it straight from npm:

Terminal
npx @rajsir/mcp-server-terraform

Or, for development, from source:

bash
git clone https://github.com/RajeevSirohi/mcp-server-terraform.git
cd mcp-server-terraform
npm install
npm run build

Claude Desktop setup

Add to your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

config.json
{
  "mcpServers": {
    "terraform": {
      "command": "npx",
      "args": ["-y", "@rajsir/mcp-server-terraform"]
    }
  }
}

(If running from source instead, use "command": "node" with "args": ["/absolute/path/to/dist/index.js"].)

Restart Claude Desktop. You should see a hammer icon indicating tools are available.

Usage

Once connected, just talk to Claude about your Terraform workspaces in plain language. Some examples:

First time in a new workspace

"Initialize the terraform config in C:\infra\staging and check if I'm logged into the right cloud accounts"

Claude runs tf_init, then tf_preflight — if you're not authenticated it tells you exactly which command to run (az login, aws configure, ...).

The everyday plan → review → apply loop

"Plan the changes in C:\infra\staging and explain what will change"

You get the plan diff plus a summary: how many resources created/updated/destroyed, anything destructive called out explicitly, and cost warnings for expensive always-on resources.

"Looks good, apply it"

Claude shows the plan preview one more time and asks for your confirmation — nothing is applied until you say yes. This two-step gate is built into the server itself, not just the prompt, so Claude cannot skip it.

Checking on your infrastructure

"Did anyone change anything outside terraform in the prod workspace?"

tf_drift compares state against reality and reports what was modified in the console, with options to accept or revert.

"Show me all the outputs" · "List everything in state" · "What workspaces exist?"

Learning / experimenting (e.g. cert prep)

"Apply the VPC lab in C:\labs\vpc, and when I say 'done' destroy everything"

The cost flags are your friend here — if a lab creates a NAT gateway or EKS cluster, the plan summary warns you what it costs per month if forgotten:

Code
💸 EXPENSIVE — always-on resources being created:
   ⚠ aws_nat_gateway.main (~$32/month + data processing if left running)
   Remember to tf_destroy when you're done experimenting.

Fixing things

"terraform plan is failing in C:\infra\staging — diagnose it"

The /tf-diagnose prompt walks Claude through validate → providers → plan → state → outputs systematically. There's also /tf-login for step-by-step authentication setup per provider.

"Import the S3 bucket my-legacy-bucket into state as aws_s3_bucket.legacy"

"Taint the web server so it gets recreated on the next apply"

Recommended setup for shared or cautious environments

Run with ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS=true (see Safety modes below) so apply/destroy are unavailable entirely, and set AUDIT_LOG_PATH so every operation is logged.

Safety modes

Control which tools are available via environment variables:

VariableEffect
ALLOW_ONLY_READONLY_TOOLS=trueOnly tf_validate, tf_plan, tf_output
ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS=trueBlocks tf_apply, tf_destroy, tf_state mv/rm
ALLOWED_TOOLS=tf_plan,tf_outputExplicit comma-separated allowlist

Example — read-only mode:

config.json
{
  "mcpServers": {
    "terraform": {
      "command": "node",
      "args": ["/path/to/dist/index.js"],
      "env": {
        "ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS": "true"
      }
    }
  }
}

Development

Terminal
npm run dev       # watch mode (recompiles on save)
npm test          # run tests
npm run build     # production build

Project structure

Code
src/
  index.ts                  # MCP server entry point, tool registration
  config/                   # (reserved for future config/telemetry)
  models/
    common-parameters.ts    # Shared Zod schemas
  security/
    tf-flags.ts             # Dangerous flag blocking
  tools/
    tf-init.ts
    tf-validate.ts
    tf-plan.ts
    tf-apply.ts             # Two-step confirmation flow
    tf-destroy.ts           # Two-step confirmation flow
    tf-output.ts
    tf-state.ts
    tf-workspace.ts
  utils/
    terraform-runner.ts     # Core exec wrapper, workspace switching
  prompts/
    index.ts                # /tf-diagnose prompt
tests/
  tf-flags.test.ts
  tf-apply.test.ts

Adding a new tool

  1. Create src/tools/tf-yourcommand.ts — export a *Schema const and an async handler function
  2. Import both in src/index.ts
  3. Add the schema to readonlyTools or destructiveTools array
  4. Add a case in the CallToolRequestSchema handler switch

Roadmap

  • Terraform Cloud / Enterprise API support (Phase 2)
  • OpenTelemetry tracing
  • SSE / streamable HTTP transport for remote deployments
  • Docker image on GitHub Container Registry
  • Plan risk & cost analysis
  • Drift detection
  • Import / taint / untaint / refresh
  • Audit logging
  • CI (build, test matrix, e2e against real terraform)

Contributing

See CONTRIBUTING.md.

License

MIT — see LICENSE.

Read the full README →View source on GitHub →

Related MCP Servers

View all in Cloud Platforms View all alternatives
  • Next Devtools MCP logoNext Devtools MCP
    Verified

    Official Next.js MCP server for coding agents. Provides runtime diagnostics, route inspection, dev server logs, docs search, and upgrade guides. Requires Next.js 16+ dev server for full runtime features.

    ☁️ Cloud Platforms5 views
    Compare vs Next Devtools MCP →
  • Hub MCP logoHub MCP
    Verified

    Official MCP server to interact with Docker Hub, providing access to repositories, hub search and Docker Hardened Images

    ☁️ Cloud Platforms2 views
    Compare vs Hub MCP →
  • MCP Server Docker logoMCP Server Docker

    Integrate with Docker to manage containers, images, volumes, and networks.

    ☁️ Cloud Platforms3 views
    Compare vs MCP Server Docker →
  • VMware AIops logoVMware AIops

    VMware vSphere/vCenter management — VM lifecycle (create/clone/delete/migrate), deployment, Guest Operations, snapshots, and cluster operations. 41 tools with double-confirmation gates, dry-run mode, and SQLite-WAL audit logging for destructive operations.

    ☁️ Cloud Platforms1 views
    Compare vs VMware AIops →

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars
1
Stargazers on the source repository.
npm downloads
236
Package downloads in the last 30 days.
Last commit
2mo ago
Most recent push to the default branch.
Tools exposed
11
Callable tools this server registers over MCP.
Directory activity
1 views
Config copies, upvotes, and views on AllMCPs.

Reviews

No reviews yet — be the first to share how this listing worked for you.

Frequently Asked Questions about MCP Server Terraform

It enforces a two-step confirmation flow where the first call runs a plan and shows the diff, and the second call with confirmed:true actually applies or destroys.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Server Terraform AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/rajeevsirohi-mcp-server-terraform?style=directory)](https://allmcps.com/mcp/rajeevsirohi-mcp-server-terraform)
HTML Embed
<a href="https://allmcps.com/mcp/rajeevsirohi-mcp-server-terraform"><img src="https://allmcps.com/api/badge/rajeevsirohi-mcp-server-terraform?style=directory" alt="MCP Server Terraform on AllMCPs" /></a>

Technical Specs & Signals

Category☁️Cloud Platforms
More technical detailsExpand ▾
TransportSTDIO
RuntimeNode.js
Last updatedAug 7, 2026
10/11 checks healthy over the last 32d
Views1
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
GitHub stars1
GitHub Star CountTotal stargazers on GitHub representing community popularity (1 stars).
Last commit2mo ago
Last Repository CommitThe most recent commit or push recorded for this server's GitHub repository.Last commit on Jul 7, 2026
npm downloads236/mo
Monthly npm DownloadsAverage monthly package installs recorded from npm registry statistics.
57Quality signal: Good · 57/100How this signal is calculated ▾
Server availabilityNot measured

Not scored for repo-hosted servers — we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership10/20
Documentation & tools28/30
Adoption & activity5/15
Community engagement0/10

A guidance signal from public completeness & health data — not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 27d ago via OSV.dev · @rajsir/mcp-server-terraform (npm)

★ FeaturedMoxie Docs MCP logo

Moxie Docs MCP

MCP & Agent Skills for Automated Documentation, and codebase conventions + context

Explore Server →

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to unlock edit access and the Official badge — proof is checked automatically, then reviewed by our team.

Free dofollow backlink: add your website and place the AllMCPs badge on it — no claim needed. We detect it automatically and keep it verified as long as the badge stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in ☁️ Cloud Platforms →Best MCP servers for Cloud Platforms →Alternatives to MCP Server Terraform →Install in Claude DesktopInstall in CursorInstall in VS Code