GitHub
GitHub’s official server lets AI read and manage code, issues and pull requests in your account. Use GitHub’s hosted version or run it locally with Docker.
Description from the maker (original English)
Safety-first Terraform: confirmation-gated apply/destroy, risk & cost analysis, drift detection
These three are never merged into one score: opinions, measurements and popularity are different things.
We have not written a plain-language summary for this one yet. Below are the facts we read from the registry.
Pick the AI app you use, then copy the settings.
ALLOW_ONLY_READONLY_TOOLS, ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS, AUDIT_LOG_PATHYou need
Which app do you use?
Pick your app above. We remember it, so next time the button says “Install in …”.
Open Claude Desktop → Settings → Developer → Edit Config, and paste this into claude_desktop_config.json
{
"mcpServers": {
"terraform": {
"command": "npx",
"args": [
"-y",
"@rajsir/mcp-server-terraform"
],
"env": {
"ALLOW_ONLY_READONLY_TOOLS": "your-value",
"ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS": "your-value",
"AUDIT_LOG_PATH": "your-value"
}
}
}
}Run this in your terminal
claude mcp add terraform --env ALLOW_ONLY_READONLY_TOOLS=your-value --env ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS=your-value --env AUDIT_LOG_PATH=your-value -- npx -y @rajsir/mcp-server-terraformFill in the empty values before running it.
Paste into .cursor/mcp.json in your project, or ~/.cursor/mcp.json
{
"mcpServers": {
"terraform": {
"command": "npx",
"args": [
"-y",
"@rajsir/mcp-server-terraform"
],
"env": {
"ALLOW_ONLY_READONLY_TOOLS": "your-value",
"ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS": "your-value",
"AUDIT_LOG_PATH": "your-value"
}
}
}
}Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.
Paste into .vscode/mcp.json in your project
{
"servers": {
"terraform": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@rajsir/mcp-server-terraform"
],
"env": {
"ALLOW_ONLY_READONLY_TOOLS": "your-value",
"ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS": "your-value",
"AUDIT_LOG_PATH": "your-value"
}
}
}
}Your browser asks to open the app, then the app shows the settings and asks you to confirm. Key values are left empty for you to fill in.
This one runs on your computer, and ChatGPT can only connect to servers on the internet. Pick another app.
Your choice stays on this device in a cookie; no account needed.
ALLOW_ONLY_READONLY_TOOLS envALLOW_ONLY_NON_DESTRUCTIVE_TOOLS envAUDIT_LOG_PATH envThese settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.
Runs on your computer; the tool list appears in your AI app after you install it.
We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 7, 2026
The registry name was verified with the GitHub account RajeevSirohi, which owns the repo
We have not read this repo from GitHub yet
We have not read this repo from GitHub yet
This one runs on your computer; there is no internet endpoint
Runs on your computer and uses local settings instead
Runs on your computer; we can only read tool lists from internet endpoints
Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.
It passed 1 of 1 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.
The registry does not list a required key, though some servers ask you to sign in on first use.
It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).
The GitHub repo last changed –, and the latest version (0.2.1) reached the registry 4 months ago.
Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Node.js on your computer.
In the same category: GitHub, Desktop Commander, Cloudflare MCP
Servers in the same category from other makers, sorted by stars.
Reading a card:★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi
GitHub’s official server lets AI read and manage code, issues and pull requests in your account. Use GitHub’s hosted version or run it locally with Docker.
MCP server for terminal commands, file operations, and process management
Cloudflare MCP servers
Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.
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.
Instead of switching to a terminal to run terraform plan, you can ask Claude:
"Plan the changes in
/infra/stagingand 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.
| Tool | Description | Destructive |
|---|---|---|
tf_init | Initialize a Terraform working directory | No |
tf_validate | Validate configuration syntax | No |
tf_plan | Run a plan and return the diff + risk/cost summary | No |
tf_apply | Apply changes (requires confirmed: true) | Yes |
tf_destroy | Destroy infrastructure (requires confirmed: true) | Yes |
tf_output | Read output values from state | No |
tf_state | List, show, move, or remove state entries | Partial |
tf_workspace | List, show, select, or create workspaces | No |
tf_preflight | Check provider CLI authentication before running | No |
tf_drift | Detect resources changed outside Terraform | No |
tf_resource | Import, taint, untaint, or refresh resources | Yes |
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:
── Plan Summary ──
💸 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!).
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.
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= ) — only names are logged.
tf_apply and tf_destroy use a two-step safety flow:
confirmed) → runs terraform plan, shows the diff, does nothing elseconfirmed: true) → actually applies or destroysClaude is instructed to never pass confirmed: true without first presenting the plan to you.
The server exposes a /tf-diagnose prompt that guides Claude through a systematic 5-step diagnosis of plan or apply failures.
No install needed — run it straight from npm:
npx @rajsir/mcp-server-terraform
Or, for development, from source:
git clone https://github.com/RajeevSirohi/mcp-server-terraform.git
cd mcp-server-terraform npm install npm run build
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_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.
Once connected, just talk to Claude about your Terraform workspaces in plain language. Some examples:
"Initialize the terraform config in
C:\infra\stagingand 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, ...).
"Plan the changes in
C:\infra\stagingand 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.
"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?"
"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:
💸 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.
"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-bucketinto state asaws_s3_bucket.legacy"
"Taint the web server so it gets recreated on the next apply"
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.
Control which tools are available via environment variables:
| Variable | Effect |
|---|---|
ALLOW_ONLY_READONLY_TOOLS=true | Only tf_validate, tf_plan, tf_output |
ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS=true | Blocks tf_apply, tf_destroy, tf_state mv/rm |
ALLOWED_TOOLS=tf_plan,tf_output | Explicit comma-separated allowlist |
Example — read-only mode:
{
"mcpServers": { "terraform": { "command": "node", "args": ["/path/to/dist/index.js"], "env": { "ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS": "true" } } } }
npm run dev # watch mode (recompiles on save)
npm test # run tests npm run build # production build
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
src/tools/tf-yourcommand.ts — export a *Schema const and an async handler functionsrc/index.tsreadonlyTools or destructiveTools arraycase in the CallToolRequestSchema handler switchSee CONTRIBUTING.md.
MIT — see LICENSE.