mcp server terraform for VS Code
io.github.rajeevsirohi/mcp-server-terraform
Safety-first Terraform: confirmation-gated apply/destroy, risk & cost analysis, drift detection
client:VS Code
transport:stdio
runtime:npm
Install mcp server terraform in VS Code
.vscode/mcp.json
{
"inputs": [
{
"type": "promptString",
"id": "allow-only-readonly-tools",
"description": "ALLOW_ONLY_READONLY_TOOLS",
"password": true
},
{
"type": "promptString",
"id": "allow-only-non-destructive-tools",
"description": "ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS",
"password": true
},
{
"type": "promptString",
"id": "audit-log-path",
"description": "AUDIT_LOG_PATH",
"password": true
}
],
"servers": {
"mcp-server-terraform": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@rajsir/mcp-server-terraform"
],
"env": {
"ALLOW_ONLY_READONLY_TOOLS": "${input:allow-only-readonly-tools}",
"ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS": "${input:allow-only-non-destructive-tools}",
"AUDIT_LOG_PATH": "${input:audit-log-path}"
}
}
}
}
VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs