# Turf

> Turf is an MCP server for cloud and infrastructure. Self-hosted infrastructure-as-code tool that AI agents drive, with human approval before. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Free trial
- **Platforms:** CLI, API, Self-hosted, Linux, macOS
- **Website:** https://turf.build/docs/
- **MCP Registry name:** build.turf/turf
- **Categories:** [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure)
- **Listing updated:** 2026-11-29

## About

Turf lets an AI agent plan infrastructure changes on OpenTofu configurations, pause for a person to approve, and then apply them. The agent connects through an MCP server that exposes Turf's operations as tools, prompts and resources, so the same workflow can be driven from an assistant rather than a terminal.

The engine runs on your own machine or in a cluster, and the MCP server connects to it through a restate-server ingress. Provider credentials are read from the environment and only sent to the engine when named explicitly. Access can be narrowed with permission tiers that limit which tools are listed and what their arguments may do.

It suits platform and DevOps engineers who want agents to handle routine infrastructure work while keeping a human in the loop for every apply. The software is proprietary: individuals, education and small businesses can use it under the Community license, while larger organisations need a commercial license.

## Features

- **Plan then approve:** The agent proposes an infrastructure plan and waits for a person to confirm before anything is applied.
- **OpenTofu based:** Configurations are run on OpenTofu, so existing OpenTofu modules and workflows carry over.
- **Permission tiers:** Read, plan, apply and full tiers control which tools the server exposes and what they may change.
- **Provider environment control:** Only the environment variables you name are passed to provider plugins, and PATH is never sent.
- **Self-hosted engine:** The engine runs locally or in a cluster and can be reached over HTTP or a unix socket.
- **Web console links:** When a console URL is configured, results include links to view the engine in a browser.

## Good for

- Letting an assistant plan and deploy cloud resources while a person signs off each apply
- Tearing down test or preview environments with a single reviewed command
- Importing existing infrastructure into managed workspaces
- Running infrastructure changes from an AI client without giving it unrestricted access

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add turf --env TURF_ACCEPT_EULA='<TURF_ACCEPT_EULA>' -- npx -y @turfbuild/turf-mcp-server
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "turf": {
      "command": "npx",
      "args": [
        "-y",
        "@turfbuild/turf-mcp-server"
      ],
      "env": {
        "TURF_ACCEPT_EULA": "<TURF_ACCEPT_EULA>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "turf": {
      "command": "npx",
      "args": [
        "-y",
        "@turfbuild/turf-mcp-server"
      ],
      "env": {
        "TURF_ACCEPT_EULA": "<TURF_ACCEPT_EULA>"
      }
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "turf": {
      "command": "npx",
      "args": [
        "-y",
        "@turfbuild/turf-mcp-server"
      ],
      "env": {
        "TURF_ACCEPT_EULA": "<TURF_ACCEPT_EULA>"
      }
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "turf": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@turfbuild/turf-mcp-server"
      ],
      "env": {
        "TURF_ACCEPT_EULA": "<TURF_ACCEPT_EULA>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add turf --env TURF_ACCEPT_EULA='<TURF_ACCEPT_EULA>' -- npx -y @turfbuild/turf-mcp-server
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.turf]
command = "npx"
args = ["-y", "@turfbuild/turf-mcp-server"]
env = { TURF_ACCEPT_EULA = "<TURF_ACCEPT_EULA>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "turf": {
      "command": "npx",
      "args": [
        "-y",
        "@turfbuild/turf-mcp-server"
      ],
      "env": {
        "TURF_ACCEPT_EULA": "<TURF_ACCEPT_EULA>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e TURF_ACCEPT_EULA='<TURF_ACCEPT_EULA>' turf npx -- -y @turfbuild/turf-mcp-server

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "turf": {
      "command": "npx",
      "args": [
        "-y",
        "@turfbuild/turf-mcp-server"
      ],
      "env": {
        "TURF_ACCEPT_EULA": "<TURF_ACCEPT_EULA>"
      }
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "turf": {
      "command": "npx",
      "args": [
        "-y",
        "@turfbuild/turf-mcp-server"
      ],
      "env": {
        "TURF_ACCEPT_EULA": "<TURF_ACCEPT_EULA>"
      }
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "turf": {
      "command": "npx",
      "args": [
        "-y",
        "@turfbuild/turf-mcp-server"
      ],
      "env": {
        "TURF_ACCEPT_EULA": "<TURF_ACCEPT_EULA>"
      }
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "turf": {
      "command": "npx",
      "args": [
        "-y",
        "@turfbuild/turf-mcp-server"
      ],
      "env": {
        "TURF_ACCEPT_EULA": "<TURF_ACCEPT_EULA>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "turf": {
      "command": "npx",
      "args": [
        "-y",
        "@turfbuild/turf-mcp-server"
      ],
      "env": {
        "TURF_ACCEPT_EULA": "<TURF_ACCEPT_EULA>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "turf": {
      "command": "npx",
      "args": [
        "-y",
        "@turfbuild/turf-mcp-server"
      ],
      "env": {
        "TURF_ACCEPT_EULA": "<TURF_ACCEPT_EULA>"
      }
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "turf": {
      "command": "npx",
      "args": [
        "-y",
        "@turfbuild/turf-mcp-server"
      ],
      "env": {
        "TURF_ACCEPT_EULA": "<TURF_ACCEPT_EULA>"
      }
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "turf": {
      "command": "npx",
      "args": [
        "-y",
        "@turfbuild/turf-mcp-server"
      ],
      "env": {
        "TURF_ACCEPT_EULA": "<TURF_ACCEPT_EULA>"
      }
    }
  }
}
```

## FAQ

### Does Turf require a licence to use?

Individuals, education and small businesses can use it free within the Community limits. Government and larger organisations need a commercial licence.

### Where does Turf run?

The engine is self-hosted, either on your own machine or in a cluster, and the MCP server connects to it.

### Can I limit what the agent can change?

Yes. The TURF_TIER setting chooses between read, plan, apply and full permissions.

### Is Turf free?

Turf is a paid product with a free trial.

### How do I add Turf to Claude Code?

Run this command in your terminal: claude mcp add turf --env TURF_ACCEPT_EULA='<TURF_ACCEPT_EULA>' -- npx -y @turfbuild/turf-mcp-server

### What are the best alternatives to Turf?

The closest alternatives to Turf are Tofu, FoggyKitchen MCP, MCP Server Terraform, Terraback and Tenkai.

## Where this comes from

- Description: written from the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Tofu](https://ai-powered.com/mcp/tofu): Tofu is a freemium MCP server for cloud and infrastructure.
- [FoggyKitchen MCP](https://ai-powered.com/mcp/foggykitchen-mcp): FoggyKitchen MCP is a paid MCP server for cloud and infrastructure.
- [MCP Server Terraform](https://ai-powered.com/mcp/mcp-server-terraform): MCP Server Terraform is an open-source MCP server for cloud and infrastructure.
- [Terraback](https://ai-powered.com/mcp/terraback): Terraback is a freemium MCP server for cloud and infrastructure.
- [Tenkai](https://ai-powered.com/mcp/tenkai): Tenkai is an MCP server for cloud and infrastructure.
- [Cloudforge](https://ai-powered.com/mcp/cloudforge): Cloudforge is a freemium MCP server for cloud and infrastructure.
- [Tares](https://ai-powered.com/mcp/tares): Tares is an open-source MCP server for developer tools.
- [Bult](https://ai-powered.com/mcp/bult): Bult is an open-source MCP server for cloud and infrastructure.

---
Source: https://ai-powered.com/mcp/turf
