PluginBench
MCP Server
Active
AGPL-3.0

TerraVision MCP Server

io.github.patrickchugh/terravision

Auto-generate professional cloud architecture diagrams from Terraform code with official AWS, Azure, and GCP icons.

What is the TerraVision MCP server?

TerraVision is an MCP server that automatically converts Terraform code into professional-grade cloud architecture diagrams using official AWS, GCP, and Azure icon sets. Diagrams stay in sync with your infrastructure, run 100% client-side, and support interactive HTML output, draw.io export, and optional AI annotations.

TerraVision transforms your Terraform configurations into visual architecture diagrams that never go out of date. It parses Terraform code locally (no cloud credentials needed), generates diagrams with official cloud provider icons, and outputs interactive HTML, PNG, SVG, PDF, or editable draw.io files. Perfect for documentation, CI/CD pipelines, and keeping stakeholders aligned with your actual infrastructure.

How to install TerraVision

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "terravision": {
      "command": "uvx",
      "args": [
        "terravision",
        "--from",
        "terravision[mcp]",
        "mcp"
      ]
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • draw — Generate static architecture diagrams (PNG, SVG, PDF, draw.io) from Terraform code or pre-generated plans
  • visualise — Generate interactive HTML diagrams with clickable nodes, pan/zoom, search, and animated data flow
  • AI annotations — Optional labels, titles, and flow sequences via Ollama (local), AWS Bedrock, or OpenAI-compatible REST API

Use cases

  • Generate architecture diagrams automatically from Terraform code for documentation and presentations
  • Create interactive HTML diagrams that stakeholders can explore and search without installing tools
  • Export editable draw.io files to refine diagrams in Lucidchart or draw.io
  • Automate diagram updates in CI/CD pipelines on every infrastructure change
  • Visualize multi-cloud deployments across AWS, GCP, and Azure in a single diagram

TerraVision MCP server FAQ

What is TerraVision?

TerraVision automatically converts Terraform code into professional cloud architecture diagrams using official AWS, GCP, and Azure icons. It runs locally, keeps diagrams in sync with infrastructure, and outputs interactive HTML, PNG, SVG, PDF, or editable draw.io files.

Is TerraVision free?

Yes, TerraVision is free and open source. No licenses or cloud services required.

Do I need cloud credentials to use TerraVision?

No. TerraVision runs 100% client-side and parses Terraform locally. You can optionally use pre-generated Terraform plans (terraform plan -json) to avoid needing Terraform or cloud access at diagram-generation time.

How do I install TerraVision in Cursor or Claude?

Install via PyPI: `pipx install terravision` (or `pip install terravision` in a virtual environment). You also need Python 3.10+, Terraform 1.x, Graphviz, and Git. See the Installation Guide for platform-specific steps.

What output formats does TerraVision support?

PNG, SVG, PDF, draw.io (editable), and interactive HTML. The HTML output is a single self-contained file that works fully offline.

Can TerraVision add AI annotations to diagrams?

Yes, optionally. You can use Ollama (local LLM, no data leaves your machine), AWS Bedrock, or any OpenAI-compatible REST API to add labels, titles, and flow sequences. Only metadata and the summary graph are sent to the LLM, never your Terraform source.

README (reference)

Source of truth, from the repository.

TerraVision

<!-- mcp-name: io.github.patrickchugh/terravision -->

Turn Terraform code into professional cloud architecture diagrams that stay in sync with your infrastructure — automatic, secure, living documents

lint-and-test PyPI version PyPI downloads Python version GitHub stars License Code style: black

📖 Full documentation site →


Watch a 4-Minute Intro

TerraVision intro video


What is TerraVision?

TerraVision automatically converts your Terraform code into professional-grade cloud architecture diagrams using the official AWS, GCP, and Azure icon sets. Your diagrams stay in sync with your infrastructure — no more outdated Visio, draw.io or Lucidchart files.

Why TerraVision?

  • ✅ Always up-to-date — diagrams generated directly from your Terraform code
  • ✅ 100% client-side — no cloud access required, runs locally, your code never leaves your machine
  • ✅ CI/CD ready — automate diagram updates on every PR merge
  • ✅ Free & open source — no expensive diagramming tool licenses
  • ✅ Multi-cloud — AWS (full), GCP, and Azure (core services)
  • ✅ Interactive HTML output — clickable nodes, pan/zoom, search, animated data flow
  • ✅ Editable draw.io export — open in draw.io, Lucidchart, or any mxGraph editor
  • ✅ Optional AI annotations — labels, titles, and flow sequences from Ollama (local) or AWS Bedrock
  • ✅ Terragrunt compatible — auto-detects single- and multi-module Terragrunt projects
  • ✅ MCP server — let AI agents generate diagrams from your Terraform, see the guide

Supported Cloud Providers

ProviderStatusResources
AWS✅ Full support200+ services
Google Cloud🔄 Partial supportCore services
Azure🔄 Partial supportCore services

Quick Start

Install

pipx install terravision   # or: pip install terravision if in a virtual env

You also need Python 3.10+, Terraform 1.x, Graphviz, and Git. See the Installation Guide for platform-specific instructions, Docker, and Nix.

Generate your first diagram

git clone https://github.com/patrickchugh/terravision.git
cd terravision

# EKS cluster example
terravision draw --source tests/fixtures/aws_terraform/eks_automode --show

# Azure VM scale set
terravision draw --source tests/fixtures/azure_terraform/test_vm_vmss --show

# From a public Git repo (note the // for subfolder)
terravision draw --source https://github.com/patrickchugh/terraform-examples.git//aws/wordpress_fargate --show

That's it — your diagram is saved as architecture.png and opens automatically.

Generate an interactive HTML diagram

terravision visualise --source ./path-to-your-terraform --show

Click any resource to see its Terraform metadata, search resources, pan/zoom, and watch animated data flow on edges. The HTML is a single self-contained file that works fully offline.


Try the Interactive Demos

Click any of these to see the interactive HTML output TerraVision produces:

  • 🟧 AWS demo — Wordpress on ECS Fargate with CloudFront, RDS, EFS
  • 🟦 Azure demo — VM scale set with load balancer and VNet
  • 🟩 GCP demo — Core GCP networking and compute

Basic Usage

Generate a diagram

# From a local directory
terravision draw --source ./path-to-your-terraform

# From a Git repository
terravision draw --source https://github.com/user/repo.git

# Custom format and filename
terravision draw --source ./path-to-your-terraform --format svg --outfile my-architecture

# Editable draw.io file
terravision draw --source ./path-to-your-terraform --format drawio --outfile my-architecture

Use a pre-generated Terraform plan (no cloud credentials needed)

# Step 1: in your Terraform environment
terraform plan -out=tfplan.bin
terraform show -json tfplan.bin > plan.json
terraform graph > graph.dot

# Step 2: diagram generation, no Terraform or cloud access required
terravision draw --planfile plan.json --graphfile graph.dot --source ./path-to-your-terraform

AI-powered annotations (optional)

terravision draw --source ./path-to-your-terraform --ai-annotate ollama   # local LLM (no data leaves your machine)
terravision draw --source ./path-to-your-terraform --ai-annotate bedrock  # AWS Bedrock via boto3 (uses your AWS credentials)
terravision draw --source ./path-to-your-terraform --ai-annotate restapi  # any OpenAI-compatible endpoint (OpenAI, LiteLLM, vLLM, ...)

Only metadata and the summary graph are sent to the LLM — never your .tf source. The bedrock backend authenticates via the standard AWS credential chain (no infrastructure to deploy); restapi is configured via TV_RESTAPI_URL, TV_RESTAPI_KEY, and TV_RESTAPI_MODEL. See the Annotations Guide and AI-Powered Annotations for the full configuration.

Simplified view

terravision draw --source ./path-to-your-terraform --simplified

Strips VPCs, subnets, and networking plumbing. Great for executive presentations.

Common options

terravision --help shows full help text details.

OptionDescriptionExample
--sourceTerraform directory or Git URL./path-to-your-terraform
--formatOutput format: png, svg, pdf, drawio, and moresvg
--outfileOutput filenamemy-architecture
--workspaceTerraform workspaceproduction
--varfileVariable file (repeatable)prod.tfvars
--planfilePre-generated plan JSONplan.json
--graphfilePre-generated graph DOTgraph.dot
--ai-annotateAI annotation backendollama, bedrock, restapi
--simplifiedHigh-level view (no networking)(flag)
--showOpen after generation(flag)

Documentation

The complete documentation lives at patrickchugh.github.io/terravision.

For users:

For contributors:


FAQ

Common questions — cloud credentials, LLM data privacy, offline use, Terragrunt, output formats, and more — are answered in the FAQ on the documentation site.


Contributing

Contributions are very welcome. See CONTRIBUTING.md for development setup, coding standards, and the PR process.

Support

License

See LICENSE.

Acknowledgments

  • Graphviz — diagram rendering
  • Terraform — infrastructure parsing
  • Terragrunt — multi-module orchestration
  • Cloud provider icons from official AWS, GCP, and Azure icon sets

Related MCP servers

A dynamic, self-refreshing MCP gateway for the complete Telegram Bot API

0
TypeScript
MIT
View repository →
MNMneme logo

Mneme

Maintained

Memory layer for AI coding assistants. Indexes git history + code, exposes via MCP.

7
TypeScript
MIT
View repository →

Search 200M+ patents and 216M+ scientific papers with natural language and structured filters.

75
JavaScript
Apache-2.0
View repository →
GRGrain logo

Grain

Active

Run SQL queries and inspect database schemas through safe, visible MCP tools.

3
View repository →

Turn a YouTube channel into a webhook: a signed HTTP POST seconds after every new video.

0
JavaScript
MIT
View repository →

Free, agent-first social-post metrics — a post URL in, views/likes/comments out.

1
JavaScript
View repository →