Logo von Terry-Form MCP with LSP Integration

Terry-Form MCP with LSP Integration

Community
aj-geddes

MCP server that enables AI assistants to execute Terraform commands locally through secure, containerized environment using HashiCorp's official Terraform Docker image.

Herausgeberaj-geddes
Repositoryterry-form-mcp
SprachePython
Forks
2
Sterne
10
Verfügbare Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Links
  • Tools mit KI-Workflows verbinden

    Terry-Form MCP with LSP Integration stellt MCP-Funktionen bereit, die kompatible KI-Clients und Agenten nutzen können.

  • Verfügbare Tools: 0

    Unten finden Sie die aufrufbaren Aktionen. Namen und Beschreibungen werden angezeigt, sofern der Server sie bereitstellt.

  • Konfiguration zum Kopieren

    Nutzen Sie die Installationsbeispiele, um diesen Server in Ihrem bevorzugten MCP-Client zu konfigurieren.

  • Open-Source-Kennzahlen

    Kennzahlen des verlinkten Repositorys: Sterne (10) und Forks (2).

Terry-Form MCP

AI-powered Terraform execution through the Model Context Protocol.

Release License: MIT Docker Python

Terry-Form MCP is a containerized Model Context Protocol server that gives AI assistants like Claude safe, structured access to Terraform. It exposes 25 MCP tools spanning Terraform execution, LSP intelligence, GitHub integration, and Terraform Cloud connectivity — all running inside Docker with destructive operations blocked by design.

Documentation Site


Dashboard

Terry-Form MCP Dashboard

The built-in web dashboard provides real-time server health monitoring, tool category overview, and integration status at a glance. Live status auto-refreshes every 5 seconds.

Configuration UI

Server Configuration

A tabbed configuration interface lets you manage server settings, integrations, cloud provider credentials, and rate limits — all without touching config files. Built with the HAT stack (HTMX + Alpine.js + Tailwind CSS).

GitHub IntegrationCloud ProvidersRate Limits
GitHubCloud ProvidersRate Limits

Tool Catalog

Tool Catalog

The interactive tool catalog at /tools lists all 25 MCP tools with search, category filtering, and expandable parameter details. Also available as a raw JSON endpoint at /api/tools and as a static tools.json file.


Quick Start

Prerequisites

  • Docker installed and running
  • Python >= 3.10 (for local development)

1. Build

bash
scripts/build.sh      # Linux/macOS
scripts\build.bat     # Windows
# or directly:
docker build -t terry-form-mcp .

2. Run as MCP Server

bash
docker run -it --rm \
  -v "$(pwd)":/mnt/workspace \
  terry-form-mcp

3. Verify the Image

bash
scripts/verify.sh   # Runs 8 checks: Docker, image size, Terraform, terraform-ls, Python, files, tools, startup

Environment Variables

All configuration is through environment variables. No config file is required for basic use.

Server Configuration

VariableDescriptionDefaultRequired
MCP_TRANSPORTTransport protocol: stdio, sse, or streamable-httpstdioNo
TERRY_HOSTServer bind address (fallback: HOST)0.0.0.0No
TERRY_PORTServer port (fallback: PORT)8000No
TERRY_FORM_API_KEYAPI key for frontend auth; if unset, auth is disabledNoneNo
TERRY_CSRF_SECRETCSRF token secret; regenerated on restart if unsetRandomRecommended
TERRY_WORKSPACE_ROOTTerraform workspace root directory/mnt/workspaceNo
TERRY_CONFIG_PATHConfig file path/app/config/terry-config.jsonNo

Terraform

VariableDescriptionDefaultRequired
MAX_OPERATION_TIMEOUTTerraform command timeout in seconds (10–3600)300No

LSP

VariableDescriptionDefaultRequired
TERRY_TERRAFORM_LS_PATHPath to terraform-ls binaryterraform-lsNo
TERRY_LSP_TIMEOUTLSP request timeout in seconds30No
TERRY_LSP_MAX_RESPONSE_BYTESMaximum LSP response size in bytes10485760No

GitHub Integration

VariableDescriptionDefaultRequired
GITHUB_APP_IDGitHub App IDNoneFor GitHub features
GITHUB_APP_PRIVATE_KEY_PATHPath to GitHub App private key fileNoneFor GitHub features
GITHUB_APP_PRIVATE_KEYGitHub App private key (inline PEM)NoneAlt to path
GITHUB_APP_INSTALLATION_IDGitHub App installation IDNoneNo
GITHUB_APP_WEBHOOK_SECRETWebhook signature verification secretNoneNo

Terraform Cloud

VariableDescriptionDefaultRequired
TF_API_TOKENTerraform Cloud API tokenNoneFor TF Cloud features

Rate Limits

VariableDescriptionDefaultRequired
TERRY_RATE_LIMIT_TERRAFORMTerraform operations per minute20No
TERRY_RATE_LIMIT_GITHUBGitHub operations per minute30No
TERRY_RATE_LIMIT_TF_CLOUDTerraform Cloud operations per minute30No
TERRY_RATE_LIMIT_DEFAULTDefault rate limit per minute100No

Cloud Provider Passthrough

These variables are forwarded directly to the Terraform subprocess. Set them to authenticate with your cloud provider.

AWS: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, AWS_DEFAULT_REGION, AWS_REGION, AWS_PROFILE

GCP: GOOGLE_CREDENTIALS, GOOGLE_APPLICATION_CREDENTIALS, GOOGLE_PROJECT, GOOGLE_REGION, GOOGLE_ZONE

Azure: ARM_CLIENT_ID, ARM_CLIENT_SECRET, ARM_SUBSCRIPTION_ID, ARM_TENANT_ID


MCP Client Configuration

Add Terry-Form to any MCP-compatible client:

json
{
  "mcpServers": {
    "terry": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "/path/to/your/workspace:/mnt/workspace",
        "terry-form-mcp"
      ]
    }
  }
}

Claude Desktop (Windows)

json
{
  "mcpServers": {
    "terry": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "C:\\Users\\YourUsername\\terraform-projects:/mnt/workspace",
        "terry-form-mcp"
      ]
    }
  }
}

Claude Desktop (macOS)

json
{
  "mcpServers": {
    "terry": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "/Users/YourUsername/terraform-projects:/mnt/workspace",
        "terry-form-mcp"
      ]
    }
  }
}

VSCode (uses workspace variable)

json
{
  "mcp.servers": {
    "terry": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "${workspaceFolder}:/mnt/workspace",
        "terry-form-mcp"
      ]
    }
  }
}

Tools (25)

CategoryToolsCount
Core Terraformterry, terry_version, terry_environment_check, terry_workspace_list4
LSP Intelligenceterraform_validate_lsp, terraform_hover, terraform_complete, terraform_format_lsp, terraform_lsp_status5
Diagnosticsterry_lsp_debug, terry_workspace_info, terry_lsp_init, terry_file_check, terry_workspace_setup, terry_analyze6
Securityterry_security_scan, terry_recommendations2
GitHubgithub_clone_repo, github_list_terraform_files, github_get_terraform_config, github_prepare_workspace4
Terraform Cloudtf_cloud_list_workspaces, tf_cloud_get_workspace, tf_cloud_list_runs, tf_cloud_get_state_outputs4

Core Terraform

python
# Initialize and validate a project
terry(path="infrastructure/aws", actions=["init", "validate"])

# Plan with variables
terry(path="environments/prod", actions=["plan"], vars={"instance_count": "3", "region": "us-east-1"})

Only init, validate, fmt, and plan are permitted. apply and destroy are blocked.

LSP Intelligence

python
# Code completions
terraform_complete(file_path="main.tf", line=10, character=0)

# Hover documentation
terraform_hover(file_path="main.tf", line=15, character=12)

# Detailed validation with error locations
terraform_validate_lsp(file_path="main.tf")

# Format a file
terraform_format_lsp(file_path="main.tf")

Powered by terraform-ls v0.38.5 — provides context-aware completions, inline documentation, and diagnostics with precise source locations.

GitHub Integration

python
# Clone a repo and prepare it for Terraform operations
github_clone_repo(owner="myorg", repo="infrastructure")
github_prepare_workspace(owner="myorg", repo="infrastructure", config_path="environments/prod")

Security Scanning

python
# Scan for hardcoded credentials, missing encryption, overly permissive policies
terry_security_scan(path="my-project")

# Get actionable improvement recommendations
terry_recommendations(path="my-project")

Architecture

┌─────────────┐     MCP Protocol     ┌──────────────────────────────────────┐
│ AI Assistant │ ◄──────────────────► │  Terry-Form MCP Server               │
│ (Claude)     │                      │                                      │
└─────────────┘                      │  ┌─────────────┐  ┌──────────────┐  │
                                     │  │ Terraform    │  │ terraform-ls │  │
                                     │  │ CLI 1.12     │  │ LSP 0.38.5   │  │
                                     │  └──────┬───────┘  └──────┬───────┘  │
                                     │         │                 │          │
                                     │         ▼                 ▼          │
                                     │  ┌──────────────────────────────┐   │
                                     │  │   /mnt/workspace (isolated)   │   │
                                     │  └──────────────────────────────┘   │
                                     └──────────────────────────────────────┘
                                              Docker Container

Key Components

FilePurpose
src/server_enhanced_with_lsp.pyMain FastMCP server — registers all 25 tools
src/terry-form-mcp.pyCore Terraform subprocess execution
src/terraform_lsp_client.pyAsync LSP client wrapping terraform-ls
src/mcp_request_validator.pyInput sanitization, path traversal prevention, rate limiting
src/github_repo_handler.pyClone repos and extract Terraform files
src/github_app_auth.pyGitHub App JWT/OAuth authentication
src/frontend/HAT stack web UI (dashboard + configuration)

Frontend Stack

The built-in web UI uses the HAT stack:

  • HTMX 2.0 — partial page updates without full reloads
  • Alpine.js 3.14 — lightweight client-side reactivity for tabs and toasts
  • Tailwind CSS — dark-mode-first utility styling

Accessible at the server root when running with streamable-http or sse transport.


Security Model

Terry-Form implements defense-in-depth with four layers:

LayerProtection
Container IsolationAll execution in ephemeral Docker containers. No host access.
Operation AllowlistOnly init, validate, fmt, plan. No apply/destroy.
Workspace IsolationAll file operations restricted to /mnt/workspace. Path traversal blocked.
Input ValidationJSON schema enforcement, variable sanitization, rate limiting per category.

Forced environment variables: TF_IN_AUTOMATION=true, TF_INPUT=false, CHECKPOINT_DISABLE=true.


Running with the Web UI

To use the dashboard and configuration UI, run with HTTP transport:

bash
# Local
MCP_TRANSPORT=streamable-http HOST=0.0.0.0 PORT=8000 python3 src/server_enhanced_with_lsp.py

# Docker
docker run -it --rm \
  -p 8000:8000 \
  -v "$(pwd)":/mnt/workspace \
  -e MCP_TRANSPORT=streamable-http \
  terry-form-mcp

Then open http://localhost:8000 in your browser.

Configuration Tabs

TabWhat it configures
ServerTransport mode, host, port, API key
GitHubApp ID, installation ID, private key path, webhook secret
Terraform CloudAPI token
Cloud ProvidersAWS, GCP, and Azure credentials
Rate LimitsPer-category request limits (applied immediately)
Terraform OptionsLog level, operation timeout

Container Details

Built on hashicorp/terraform:1.12 (Alpine-based, ~150MB). Includes:

  • Terraform CLI 1.12
  • terraform-ls v0.38.5 for LSP support
  • Python 3.12 with FastMCP 3.0+
  • Runs as non-root user terraform (UID 1001)

Development

bash
# Install dependencies
pip install -r requirements.txt

# Run locally
python3 src/server_enhanced_with_lsp.py

# Code quality
black .       # Format (88-char line limit)
flake8 .      # Lint
mypy src/*.py # Type check

Limitations

  • No state modification — apply and destroy are intentionally blocked
  • String variables only — complex variable types not supported via CLI passthrough
  • LSP cold start — first LSP operation takes 1-2 seconds for initialization
  • Local execution — designed for development workflows, not production CI/CD

License

MIT

Installation

TypingMind
Voraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "aj-geddes-terry-form-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "terry-form-mcp"
      ]
    }
  }
}

Terry-Form MCP with LSP Integration MCP mit mehreren KI-Modellen nutzen

TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. Sobald Terry-Form MCP with LSP Integration verbunden ist, können Sie die Integration mit verschiedenen KI-Modellen in TypingMind verwenden, statt sie für jedes Modell separat einzurichten. Diese MCP-Integration läuft lokal über den TypingMind-MCP-Konnektor auf Ihrem Gerät.

Einrichtungsanleitung für den lokalen Konnektor

Nutzen Sie diese Option, wenn der MCP-Server Zugriff auf lokale Dateien, Apps oder private Ressourcen auf Ihrem Computer benötigt.

1

MCP-Einstellungen öffnen

Gehen Sie in TypingMind zu „Einstellungen“, „Erweiterte Einstellungen“ und dann „Model Context Protocol“ und wählen Sie „Konnektor einrichten“.

  1. Öffnen Sie TypingMind in Ihrem Browser.
  2. Klicken Sie auf das Symbol „Einstellungen“.
  3. Gehen Sie zu „Erweiterte Einstellungen“.
  4. Öffnen Sie den Abschnitt „Model Context Protocol“.
  5. Klicken Sie auf „Konnektor einrichten“ und wählen Sie „Dieses Gerät“.
Einrichtungsbildschirm des TypingMind-MCP-Konnektors mit ausgewählter Option „Dieses Gerät“
2

Konnektor-Befehl ausführen

Wählen Sie „Dieses Gerät“, kopieren Sie den Befehl aus TypingMind und führen Sie ihn im Terminal aus. Lassen Sie den Prozess laufen, solange Sie MCP verwenden.

  1. Kopieren Sie den in TypingMind angezeigten Einrichtungsbefehl.
  2. Öffnen Sie „Terminal“ (macOS) bzw. „Windows Terminal“ (Windows).
  3. Fügen Sie den Befehl ein und führen Sie ihn aus.
  4. Bestätigen Sie die Paketinstallation, wenn Sie im Terminal zum Fortfahren aufgefordert werden.
  5. Lassen Sie das Terminalfenster geöffnet und den Prozess darin laufen, solange Sie MCP-Tools verwenden.
3

Terry-Form MCP with LSP Integration als Server hinzufügen

Wenn der Konnektorstatus „Bereit“ anzeigt, klicken Sie auf „Server bearbeiten“ und fügen Sie die MCP-Server-Konfiguration ein.

  1. Warten Sie, bis der Konnektorstatus „Bereit“ anzeigt.
  2. Klicken Sie auf „Server bearbeiten“.
  3. Fügen Sie die MCP-Server-Konfiguration für Terry-Form MCP with LSP Integration ein.
  4. Speichern Sie die Serverliste.
  5. Aktualisieren Sie die Ansicht, um bei Bedarf zu prüfen, ob der Konnektor weiterhin bereit ist.
MCP-Einstellungen in TypingMind mit aktivem Server und der Schaltfläche „Server bearbeiten“
{
  "mcpServers": {
    "aj-geddes-terry-form-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "terry-form-mcp"
      ]
    }
  }
}
4

Verbindung modellübergreifend nutzen

Speichern Sie die Serverliste, öffnen Sie „Plugins“ und aktivieren Sie die MCP-Tools von Terry-Form MCP with LSP Integration. Wählen Sie dann ein beliebiges unterstütztes KI-Modell in TypingMind und verwenden Sie die Tools im Chat oder weisen Sie sie einem KI-Agenten zu.

  1. Öffnen Sie die Seite „Plugins“ in TypingMind.
  2. Aktivieren Sie die MCP-Tools von Terry-Form MCP with LSP Integration.
  3. Starten Sie einen Chat und wählen Sie das KI-Modell, das Sie verwenden möchten.
  4. Nutzen Sie die MCP-Tools im Chat oder weisen Sie sie einem KI-Agenten zu.
  5. Wechseln Sie bei Bedarf zu einem anderen KI-Modell, ohne die MCP-Verbindung erneut herzustellen.
TypingMind-Chat mit aktivierten MCP-Tools und einem ausgewählten KI-Modell
Können Sie mir mit Terry-Form MCP with LSP Integration bei dieser Aufgabe helfen?
Terry-Form MCP with LSP Integration
Gerne. Ich habe es gelesen.
Das habe ich mit Terry-Form MCP with LSP Integration gefunden.

Häufig gestellte Fragen

Wofür wird der MCP-Server Terry-Form MCP with LSP Integration verwendet?

Terry-Form MCP with LSP Integration ist ein MCP-Server, über den kompatible KI-Clients auf externe Tools und Kontext zugreifen können. In TypingMind können Sie diesen MCP-Server einmal hinzufügen und seine Tools in Ihrem KI-Arbeitsbereich verfügbar machen.

Kann ich den MCP-Server Terry-Form MCP with LSP Integration mit mehreren KI-Modellen in TypingMind verwenden?

Ja. TypingMind bindet MCP-Tools auf Arbeitsbereichsebene ein. So können Sie Terry-Form MCP with LSP Integration mit verschiedenen KI-Modellen wie Claude, ChatGPT, Gemini oder anderen in TypingMind konfigurierten Modellen verwenden, ohne den MCP-Server für jedes Modell separat einzurichten.

Warum den MCP-Server Terry-Form MCP with LSP Integration mit TypingMind nutzen?

TypingMind ist eine der besten Oberflächen für LLM-Chats, da es mehrere KI-Modelle, Prompts, Plugins, KI-Agenten, API-Schlüssel und MCP-Tools in einem Arbeitsbereich vereint. Sobald Terry-Form MCP with LSP Integration verbunden ist, können Sie die zugehörigen MCP-Tools mit Ihren bevorzugten Modellen nutzen und Ihre Chat-Abläufe in TypingMind übersichtlich organisieren.

Wie verbinde ich den MCP-Server Terry-Form MCP with LSP Integration mit TypingMind?

Terry-Form MCP with LSP Integration wird über den lokalen MCP-Konnektor von TypingMind angebunden. Das ist die beste Wahl, wenn der MCP-Server auf lokale Dateien, Desktop-Apps, Befehlszeilentools oder private Ressourcen auf Ihrem Computer zugreifen muss.

Welche Tools stellt der MCP-Server Terry-Form MCP with LSP Integration in TypingMind bereit?

Terry-Form MCP with LSP Integration stellt MCP-Funktionen bereit, die Sie auf der Plugins-Seite in TypingMind aktivieren und im Chat verwenden oder KI-Agenten zuweisen können.

Muss ich meine API-Schlüssel mit TypingMind teilen, um den MCP-Server Terry-Form MCP with LSP Integration zu verwenden?

Nein. TypingMind arbeitet vorrangig lokal. Sie wählen Ihre Modellanbieter selbst und behalten die Kontrolle über Ihre API-Schlüssel, Prompts und MCP-Konfiguration. Falls Terry-Form MCP with LSP Integration eine Authentifizierung erfordert, fügen Sie beim Erstellen der Verbindung die erforderlichen Header, OAuth-Einstellungen oder die lokale Konfiguration für diesen MCP-Server hinzu.

Ähnliche MCP-Server

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇