> ## Documentation Index
> Fetch the complete documentation index at: https://clumio.reclear.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Terraform with MCP

> Generate Clumio Terraform configuration from an AI agent over the Model Context Protocol.

Clumio publishes a Model Context Protocol (MCP) repository that lets an AI agent generate
Terraform configuration for Clumio, including account connections, policies, protection groups, organisational
units, user assignments and compliance reporting.

<Warning>
  **Status: example implementation.** Clumio labels this repository "FOR EXAMPLE PURPOSES ONLY." Treat
  it as reference code rather than a supported product. Test and review any generated Terraform before
  applying it.
</Warning>

## What it does

An MCP server exposes tools that a compatible agent can call. These tools generate Terraform
configuration rather than applying it. Review the HCL, then apply it through your normal Terraform
workflow.

| Tool                            | Generates                                       |
| ------------------------------- | ----------------------------------------------- |
| `generate_providers`            | The `provider` block and required variables     |
| `generate_aws_connection`       | `clumio_aws_connection` for an AWS account      |
| `generate_policy`               | `clumio_policy` with retention and RPO settings |
| `generate_protection_group`     | `clumio_protection_group` bindings              |
| `generate_organizational_unit`  | Organisational unit structure                   |
| `generate_policy_rule`          | Protection rules within a policy                |
| `generate_user_assignment`      | User and role assignments                       |
| `generate_report_configuration` | Backup compliance report configuration          |

## Run it

```bash theme={null}
git clone https://github.com/clumio-code/clumio-terraform-mcp
cd clumio-terraform-mcp

pip install -e .
python src/clumio_terraform_mcp/app.py
```

Requires Python 3.12 or later. The server is built on `fastmcp`.

## Point an agent at it

Register the server in your MCP client's configuration so the agent can discover the tools above.

```json theme={null}
{
  "mcpServers": {
    "clumio-terraform": {
      "command": "python",
      "args": ["/path/to/clumio-terraform-mcp/src/clumio_terraform_mcp/app.py"]
    }
  }
}
```

Then ask the agent for what you want in plain language. For example: *"Write a Terraform policy for
S3 at 15-minute RPO with 30-day retention."* Review the generated HCL before applying it.

<Note>
  The
  [Python SDK](/developer-tools/python-sdk), [Go SDK](/developer-tools/go-sdk) and
  [REST API](https://api.commvault.com/docs/latest/api/cv/ClumioAPIs/clumio-rest-api/) can also be called from agent tooling. This repository focuses
  on generating Terraform configuration.
</Note>

<CardGroup cols={2}>
  <Card title="Source and issues" icon="github" href="https://github.com/clumio-code/clumio-terraform-mcp" arrow>
    Read the implementation, report a gap, or open a pull request.
  </Card>

  <Card title="Terraform provider" icon="cube" href="/developer-tools/terraform" arrow>
    Where the generated configuration gets applied.
  </Card>
</CardGroup>
