npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@plugix/mcp-terraform

v0.1.0

Published

MCP Server for Terraform - Infrastructure as Code management

Readme

@plugix/mcp-terraform

MCP server for Terraform infrastructure management.

Features

  • get_state - Get current terraform state summary
  • list_resources - List all managed resources
  • plan - Preview infrastructure changes
  • apply - Apply changes (with confirmation)
  • validate - Validate configuration files
  • format - Check or fix file formatting
  • get_outputs - Get output values
  • init - Initialize terraform working directory
  • show_resource - Show detailed resource information

Installation

npm install @plugix/mcp-terraform

Or run directly:

npx @plugix/mcp-terraform

Prerequisites

Terraform CLI must be installed and available in PATH:

# macOS
brew install terraform

# Linux (Ubuntu/Debian)
sudo apt-get install terraform

# Or download from https://www.terraform.io/downloads

Configuration

Set environment variables:

# Plugix API connection
API_URL=wss://api.plugix.ai
API_TOKEN=plx_live_your_token_here

# Terraform settings
TERRAFORM_DIR=/path/to/your/terraform/project  # Default: current directory
TERRAFORM_PATH=terraform                        # Default: terraform

Usage

Development

npm run dev

Production

npm run build
npm start

Docker

docker build -t plugix-mcp-terraform .
docker run --env-file .env -v /path/to/terraform:/workspace plugix-mcp-terraform

Claude Desktop Integration

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "terraform": {
      "command": "npx",
      "args": ["@plugix/mcp-terraform"],
      "env": {
        "API_URL": "wss://api.plugix.ai",
        "API_TOKEN": "plx_live_your_token",
        "TERRAFORM_DIR": "/path/to/terraform/project"
      }
    }
  }
}

Tools Reference

get_state

Get current terraform state summary including all managed resources.

Parameters: None

Example:

{
  "name": "get_state",
  "arguments": {}
}

list_resources

List all resources currently managed by terraform state.

Parameters: None

plan

Run terraform plan to preview changes.

Parameters:

| Name | Type | Description | |------|------|-------------| | target | string | Resource address to target (e.g., aws_instance.example) | | varFile | string | Path to terraform.tfvars file | | destroy | boolean | Create a destroy plan instead |

Example:

{
  "name": "plan",
  "arguments": {
    "target": "aws_instance.web"
  }
}

apply

Apply terraform changes. Requires confirmation.

Parameters:

| Name | Type | Required | Description | |------|------|----------|-------------| | target | string | No | Resource address to target | | varFile | string | No | Path to terraform.tfvars file | | confirmed | boolean | Yes | Must be true to apply |

Example:

{
  "name": "apply",
  "arguments": {
    "confirmed": true
  }
}

validate

Validate terraform configuration files.

Parameters: None

Example:

{
  "name": "validate",
  "arguments": {}
}

format

Check or fix terraform file formatting.

Parameters:

| Name | Type | Description | |------|------|-------------| | check | boolean | Only check formatting without changes | | recursive | boolean | Format files in subdirectories |

Example:

{
  "name": "format",
  "arguments": {
    "check": true,
    "recursive": true
  }
}

get_outputs

Get all terraform output values.

Parameters: None

init

Initialize terraform working directory.

Parameters:

| Name | Type | Description | |------|------|-------------| | upgrade | boolean | Upgrade provider versions | | reconfigure | boolean | Reconfigure backend |

Example:

{
  "name": "init",
  "arguments": {
    "upgrade": true
  }
}

show_resource

Show detailed information about a specific resource.

Parameters:

| Name | Type | Required | Description | |------|------|----------|-------------| | address | string | Yes | Resource address (e.g., aws_instance.example) |

Example:

{
  "name": "show_resource",
  "arguments": {
    "address": "aws_instance.web"
  }
}

Workflow Examples

Check Infrastructure Status

1. list_resources  -> See all managed resources
2. get_outputs     -> Get output values
3. validate        -> Check configuration is valid

Make Infrastructure Changes

1. plan            -> Preview changes
2. apply (preview) -> Double-check with confirmed=false
3. apply           -> Apply with confirmed=true
4. get_outputs     -> Verify new outputs

Clean Up Infrastructure

1. plan (destroy)  -> Preview destroy plan
2. apply           -> Apply destroy with confirmed=true

Security Notes

  • The MCP server executes terraform commands locally
  • Terraform state files may contain sensitive data
  • Use remote backends (S3, GCS, Terraform Cloud) for production
  • Credentials are handled by terraform, not this MCP server
  • Apply operations require explicit confirmation

Testing

npm test

License

MIT