Terraform Assistant
Provides tools to review and generate Terraform scripts, enforcing organization-specific rules via localized configuration files.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Terraform AssistantReview main.tf for policy violations"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Terraform Assistant MCP Server
This is a Model Context Protocol (MCP) server built in Python that acts as an advisory co-pilot for reviewing existing Terraform scripts, and a generative co-pilot for writing new, compliant Terraform infrastructure. It enforces organization-specific rules via localized configuration files (standards.md & endpoints_lookup.md).
Setup Instructions
Initialize the Python Environment: Navigate to the root directory where this
README.mdis located and create a virtual environment, then install the dependencies:Mac / Linux:
python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txtWindows:
python -m venv .venv .\.venv\Scripts\activate pip install -r requirements.txt
Related MCP server: MCP CloudOps IaC Rules Server
How to Use in VS Code
This server does not have its own custom UI. Instead, it plugs seamlessly into popular AI extensions for VS Code that support the Model Context Protocol, such as Cline or Roo Code.
1. Install an MCP-compatible VS Code Extension
Install the Roo Code or Cline extension in VS Code.
2. Configure the MCP Server
Open the MCP configuration file for your chosen extension.
For Roo Code or Cline, click on the MCP Servers icon (the plug icon) in the extension's sidebar to edit the cline_mcp_settings.json file.
Add the following configuration block:
Mac / Linux Example:
{
"mcpServers": {
"terraform-assistant": {
"command": "/home/teosevinc/workspaces/terraform-assistant/.venv/bin/python3",
"args": [
"src/server.py"
],
"cwd": "/home/teosevinc/workspaces/terraform-assistant",
"env": {
"PYTHONPATH": "src"
}
}
}
}Windows Example:
{
"mcpServers": {
"terraform-assistant": {
"command": "C:\\path\\to\\your\\terraform-assistant\\.venv\\Scripts\\python.exe",
"args": [
"src\\server.py"
],
"cwd": "C:\\path\\to\\your\\terraform-assistant",
"env": {
"PYTHONPATH": "src"
}
}
}
}(By pointing the command directly to the .venv/bin/python3 or .venv\Scripts\python.exe that you created in Step 1, the extension will run the MCP server with all the correct dependencies regardless of what workspace you have active!)
3. Usage inside VS Code
Open the Chat inside your AI extension.
Make sure you have your API key set up for your LLM (like Azure OpenAI) within the extension's settings.
The AI will now instantly have access to tools like
read_standards,read_lookup, andread_terraform_file.Try asking it prompts like:
"Review my existing
main.tffile and tell me if it violates anything in our standards.""Generate a new PostgreSQL server resource and apply all relevant compliance checks from the endpoints lookup."
Architecture Restrictions
Advisory Mode: For evaluating existing
.tffiles, the assistant will read them locally and advise you on fixes, but it will never automatically overwrite your existing code.Generative Mode: For creating new
.tffiles, the assistant will author the appropriate resources from scratch ensuring 100% compliance with the rules without you needing to do it manually.
Configuration & Authentication Notes
You do not need to configure Bitbucket or Azure OpenAI secrets anywhere in this server code!
Bitbucket API Keys: Because of our Scenario A architectural decision, the MCP server operates natively against the local filesystem clone on the developer's laptop rather than fetching from the remote Bitbucket API. This ensures the AI evaluates your local, uncommitted code changes in real-time as you type them in VS Code.
Azure OpenAI API Keys: The MCP server itself does not securely generate responses or talk to LLMs. The VS Code extension (e.g., Cline or Roo Code) acts as the client that communicates with Azure OpenAI. You will input your Azure API key and Endpoint URL directly into your VS Code extension's LLM API settings menu.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceExposes your organization's Terraform style guide to AI coding agents, enabling them to generate, validate, and ensure Infrastructure as Code follows your specific conventions, naming standards, security defaults, and best practices.Last updated1MIT
- Flicense-qualityDmaintenanceEnables the validation and generation of Terraform Infrastructure as Code according to Pragma CloudOps standards, covering security, structure, and documentation rules. It provides specialized tools for automated compliance reporting, security auditing, and standardized template generation.Last updated
- AlicenseAqualityCmaintenanceAI-powered cloud architecture - describe infrastructure in natural language, get Terraform, cost estimates, and compliance reportsLast updated1932MIT
- Alicense-qualityCmaintenanceProvides intelligent assistance for Azure Terraform development, including documentation retrieval, code validation, security scanning, and best practices guidance.Last updated1MIT
Related MCP Connectors
Threat modeling, code/cloud/pipeline scanning, shadow-AI discovery, compliance checks and fixes.
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Let AI operate servers without SSH. Choose actions, approve risky changes, and audit every step.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/teomanS/terraform-assistant'
If you have feedback or need assistance with the MCP directory API, please join our Discord server