https://github.com/citadel-cloud-management/mcp-server-terraform
MCP server for Terraform operations - plan, apply, validate, state, and output
https://github.com/citadel-cloud-management/mcp-server-terraform
ai anthropic automation claude infrastructure-as-code llm mcp model-context-protocol terraform typescript
Last synced: about 2 months ago
JSON representation
MCP server for Terraform operations - plan, apply, validate, state, and output
- Host: GitHub
- URL: https://github.com/citadel-cloud-management/mcp-server-terraform
- Owner: Citadel-Cloud-Management
- License: other
- Created: 2026-03-07T18:02:48.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-04-11T22:18:32.000Z (2 months ago)
- Last Synced: 2026-04-12T00:27:29.448Z (2 months ago)
- Topics: ai, anthropic, automation, claude, infrastructure-as-code, llm, mcp, model-context-protocol, terraform, typescript
- Language: TypeScript
- Homepage: https://citadel-cloud-management.github.io/mcp-server-terraform/
- Size: 14.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# mcp-server-terraform
An MCP (Model Context Protocol) server that exposes Terraform CLI operations as tools for Claude and other MCP-compatible AI assistants. Enables AI-driven infrastructure-as-code workflows including planning, applying, and validating Terraform configurations.
## Architecture
```mermaid
graph TB
subgraph Client["MCP Client (Claude)"]
style Client fill:#4A90D9,stroke:#2C5F8A,color:#FFFFFF
A[Claude Desktop / CLI]
end
subgraph Server["MCP Server"]
style Server fill:#2ECC71,stroke:#1A9B52,color:#FFFFFF
B[StdioTransport]
C[Tool Registry]
end
subgraph Tools["Terraform Tools"]
style Tools fill:#F39C12,stroke:#D68910,color:#FFFFFF
D[terraform_init]
E[terraform_plan]
F[terraform_apply]
G[terraform_validate]
H[terraform_state_list]
I[terraform_output]
end
subgraph Infra["Infrastructure"]
style Infra fill:#9B59B6,stroke:#7D3C98,color:#FFFFFF
J[Terraform CLI]
K[State Backend]
L[Cloud Providers]
end
A -->|stdio| B
B --> C
C --> D
C --> E
C --> F
C --> G
C --> H
C --> I
D --> J
E --> J
F --> J
G --> J
H --> J
I --> J
J --> K
J --> L
```
## Tools
| Tool | Description |
|------|-------------|
| `terraform_init` | Initialize a working directory, download providers and modules |
| `terraform_plan` | Generate and display an execution plan |
| `terraform_apply` | Apply changes to reach desired infrastructure state |
| `terraform_validate` | Validate configuration files for syntax errors |
| `terraform_state_list` | List all resources in the state file |
| `terraform_output` | Read output values from state |
## Quick Start
```bash
npm install
npm run build
npm start
```
## Docker
```bash
docker build -t mcp-server-terraform .
docker run -i mcp-server-terraform
```
## Claude Desktop Configuration
```json
{
"mcpServers": {
"terraform": {
"command": "node",
"args": ["dist/index.js"],
"cwd": "/path/to/mcp-server-terraform"
}
}
}
```
## License
MIT