# io.github.RajeevSirohi/mcp-server-terraform (npm · @rajsir/mcp-server-terraform)

Safety-first Terraform: confirmation-gated apply/destroy, risk & cost analysis, drift detection

- Trust score: 71/100 (medium)
- Change this week: +45
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-03

## Components

- npm · `@rajsir/mcp-server-terraform`: 71/100 (this document), [markdown](https://verifymcp.io/servers/rajeevsirohi-mcp-server-terraform/rajsir-mcp-server-terraform.md), [page](https://verifymcp.io/servers/rajeevsirohi-mcp-server-terraform/rajsir-mcp-server-terraform)

## Channel facts

- Registry: `npm`
- Package: `@rajsir/mcp-server-terraform`
- Version: `0.2.1`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-03.

- **Supply Chain Security**: 87/100
  - No malware found by supply-chain analysis.
  - Only part of the dependency tree could be resolved (95 of 99), so this covers what we could see, not the whole tree.
  - No install/post-install scripts declared.
  - Only part of the dependency tree could be resolved (95 of 99), so this covers what we could see, not the whole tree.
- **Provenance & Transparency**: 45/100
  - Source repository is publicly reachable at the declared URL.
  - Provenance check failed: no build-provenance attestation is published.
  - Clear OSI-approved license (MIT).
  - Actively maintained (last published 26 days ago).
  - Disclosure check failed: no security disclosure policy was found in the source repository.
- **Schema Quality & AI Usability**: 84/100
  - 100% of prompts and resources have a non-trivial description (not blank, and not just the item's name).
  - AI-judged instruction clarity (excellent).
  - Context-footprint check failed: tool/resource definitions use about 1339 tokens (~121/item across 11 items; 11 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 27/100
  - Stability observed for 8 of 30 days with no destabilising changes; credit accrues until the full window elapses.
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

## Install

### Claude

```bash
claude mcp add rajeevsirohi-mcp-server-terraform -- npx -y @rajsir/mcp-server-terraform
```

### Codex

```bash
codex mcp add rajeevsirohi-mcp-server-terraform -- npx -y @rajsir/mcp-server-terraform
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "rajeevsirohi-mcp-server-terraform": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@rajsir/mcp-server-terraform"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add rajeevsirohi-mcp-server-terraform --command npx --arg -y --arg @rajsir/mcp-server-terraform
```

### Hermes

```yaml
mcp_servers:
  rajeevsirohi-mcp-server-terraform:
    command: "npx"
    args: ["-y", "@rajsir/mcp-server-terraform"]
```

### Other

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

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-03 (score 71, +1)

No change was recorded against any check on this day. Stability & Change Management went from 23 to 27. That category is still filling its 30-day observation window: 7 days of observed history at the previous scan, 8 at this one. The score rises as the window fills, whether or not the server changes.

### 2026-08-02 (score 70, +44)

- [security regression] Provenance: unverified → fail
- [security improvement] Known CVEs: unverified → partial
- [security improvement] Install scripts: unverified → pass
- [security improvement] Malware scan: unverified → pass
- [functional regression] Tool coverage: 100 → unverified
- [functional regression] Schema quality: 100 → unverified
- [functional improvement] Stability: unverified → 0.23
- [functional improvement] MCP protocol: unverified → pass
- [functional improvement] Maintenance: unverified → pass
- [functional improvement] Dependency health: unverified → partial
- [functional improvement] License: unverified → pass
- [functional improvement] Schema quality: unverified → excellent
- [functional] Licence: MIT

### 2026-07-31 (score 26, −26)

- [functional] We updated how we score, so this day's move reflects our rubric, not a change to the server

### 2026-07-28 (score 52, +26)

- [functional regression] Dependency health: partial → unverified
- [functional improvement] Schema quality: unverified → 100
- [functional improvement] Tool coverage: unverified → 100
- [functional] First check of Tool coverage: 100
- [functional] First check of Schema quality: unverified
- [functional] First check of Schema quality: fail
- [functional] First check of Schema quality: fail

### 2026-07-27 (score 26)

First indexed and scored.

## MCP tools (11)

### `tf_validate` (~45 tokens)

Validate Terraform configuration files for syntax and internal consistency. Does not access remote state or APIs.

Input parameters:

- `workdir` (string, required): Absolute or relative path to the directory containing .tf files

### `tf_plan` (~152 tokens)

Run terraform plan and return a human-readable diff of what will change. Safe — makes no changes to infrastructure.

Input parameters:

- `savePlanFile` (string): Optional path to save the binary plan file for use with tf_apply
- `target` (string): Limit operation to a specific resource address, e.g. aws_instance.web
- `varFile` (string): Path to a .tfvars or .tfvars.json file
- `vars` (array): Variable overrides in key=value format, e.g. ["region=us-east-1"]
- `workdir` (string, required): Absolute or relative path to the directory containing .tf files
- `workspace` (string): Terraform workspace to use (default: current workspace)

### `tf_output` (~84 tokens)

Read Terraform output values from the current state. Returns all outputs as JSON, or a specific output by name.

Input parameters:

- `name` (string): Specific output name to retrieve. Omit to get all outputs.
- `workdir` (string, required): Absolute or relative path to the directory containing .tf files
- `workspace` (string): Terraform workspace to use (default: current workspace)

### `tf_preflight` (~57 tokens)

Check which cloud providers are used in a Terraform workspace and verify authentication status for each. Call this before plan or apply to catch credential issues early.

Input parameters:

- `workdir` (string, required): Absolute or relative path to the directory containing .tf files

### `tf_drift` (~85 tokens)

Detect infrastructure drift — resources that were changed outside of Terraform (e.g. manually in the cloud console). Runs a refresh-only plan and reports differences between state and reality. Read-only, makes no changes.

Input parameters:

- `workdir` (string, required): Absolute or relative path to the directory containing .tf files
- `workspace` (string): Terraform workspace to use (default: current workspace)

### `tf_apply` (~216 tokens)

Apply Terraform changes to real infrastructure.

TWO-STEP SAFETY FLOW:
1\. Call without confirmed=true → runs terraform plan, shows the diff, returns without applying.
2\. Call with confirmed=true after reviewing the diff → actually applies the changes.

Never pass confirmed=true without first showing the plan output to the user.

Input parameters:

- `confirmed` (boolean): Must be true to actually apply. Omit or set false to preview only.
- `planFile` (string): Path to a saved plan file from tf_plan (recommended for exact apply)
- `target` (string): Limit operation to a specific resource address, e.g. aws_instance.web
- `varFile` (string): Path to a .tfvars or .tfvars.json file
- `vars` (array): Variable overrides in key=value format, e.g. ["region=us-east-1"]
- `workdir` (string, required): Absolute or relative path to the directory containing .tf files
- `workspace` (string): Terraform workspace to use (default: current workspace)

### `tf_destroy` (~193 tokens)

Destroy all Terraform-managed infrastructure in the workspace.

TWO-STEP SAFETY FLOW:
1\. Call without confirmed=true → shows the destroy plan (what will be deleted).
2\. Call with confirmed=true after the user explicitly approves → destroys everything.

This is irreversible. Always show the plan and get explicit user approval first.

Input parameters:

- `confirmed` (boolean): Must be true to actually destroy. Omit or false to preview only.
- `target` (string): Limit operation to a specific resource address, e.g. aws_instance.web
- `varFile` (string): Path to a .tfvars or .tfvars.json file
- `vars` (array): Variable overrides in key=value format, e.g. ["region=us-east-1"]
- `workdir` (string, required): Absolute or relative path to the directory containing .tf files
- `workspace` (string): Terraform workspace to use (default: current workspace)

### `tf_state` (~148 tokens)

Manage Terraform state. Supports the following operations:
\- list: List all resources in state
\- show: Show attributes of a specific resource
\- mv: Move/rename a resource in state (use with care)
\- rm: Remove a resource from state without destroying it (destructive)

Input parameters:

- `address` (string): Resource address for show/rm/mv source, e.g. aws_instance.web
- `destination` (string): Destination address for mv operation only
- `operation` (string, required): State operation to perform
- `workdir` (string, required): Absolute or relative path to the directory containing .tf files
- `workspace` (string): Terraform workspace to use (default: current workspace)

### `tf_resource` (~175 tokens)

Resource-level state operations:
\- import: Bring an existing cloud resource under Terraform management (requires address + id)
\- taint: Mark a resource for recreation on next apply (requires address)
\- untaint: Remove the taint mark (requires address)
\- refresh: Sync state with real infrastructure (accepts drift into state)

Input parameters:

- `address` (string): Resource address, e.g. aws_instance.web (required for import/taint/untaint)
- `id` (string): Cloud provider resource ID for import, e.g. i-0abcd1234 or an Azure resource ID
- `operation` (string, required): Resource operation to perform
- `workdir` (string, required): Absolute or relative path to the directory containing .tf files
- `workspace` (string): Terraform workspace to use (default: current workspace)

### `tf_init` (~87 tokens)

Initialize a Terraform working directory. Downloads providers and modules. Run this before plan or apply on a fresh workspace.

Input parameters:

- `reconfigure` (boolean): Pass -reconfigure to reinitialize backend even if already configured
- `upgrade` (boolean): Pass -upgrade to update providers/modules to latest allowed versions
- `workdir` (string, required): Absolute or relative path to the directory containing .tf files

### `tf_workspace` (~97 tokens)

Manage Terraform workspaces. Supports:
\- list: List all workspaces and show which is active
\- show: Show the current workspace name
\- select: Switch to a workspace
\- new: Create a new workspace

Input parameters:

- `name` (string): Workspace name for select or new operations
- `operation` (string, required): Workspace operation to perform
- `workdir` (string, required): Absolute or relative path to the directory containing .tf files

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/rajeevsirohi-mcp-server-terraform/rajsir-mcp-server-terraform#diagnostics

## Score history

- 2026-08-03: 71
- 2026-08-02: 70
- 2026-08-01: 26
- 2026-07-31: 26
- 2026-07-30: 52
- 2026-07-28: 52
- 2026-07-27: 26

## Links

- npm package: https://www.npmjs.com/package/@rajsir/mcp-server-terraform
- Socket report: https://socket.dev/npm/package/@rajsir/mcp-server-terraform
- Repository: https://github.com/RajeevSirohi/mcp-server-terraform
- Changelog RSS feed: https://verifymcp.io/servers/rajeevsirohi-mcp-server-terraform/rajsir-mcp-server-terraform/changelog.xml
- Changelog JSON feed: https://verifymcp.io/servers/rajeevsirohi-mcp-server-terraform/rajsir-mcp-server-terraform/changelog.json
- HTML version of this page: https://verifymcp.io/servers/rajeevsirohi-mcp-server-terraform/rajsir-mcp-server-terraform
