Get started · Turf 1.5
Two commands: the first downloads Turf™ and accepts its license, the second adds the MCP server to Claude Code, Claude Desktop, Cursor, Codex, Gemini CLI or VS Code. In Claude Code and Claude Desktop, Turf runs on your Claude subscription — no model API key.
Turf is free for individuals, education and small businesses within the Community limits, under the Turf Community Edition License 1.0. Government and larger organizations need a commercial license, and any organization can evaluate Turf in non-production for 30 days: turf.build/licensing.
Read the terms at turf.build/license/v1 first: the first line accepts them.
$ npx -y @turfbuild/turf-mcp-server license accept # downloads Turf, about a minute, and accepts the terms $ npx add-mcp@2 @turfbuild/turf-mcp-server --name turf -g
The first line downloads Turf here, in your terminal, which takes about a minute, and
records your acceptance once, in ~/.turf/license.json. The second adds Turf to
the agents on this machine. Your agent's first start is then quick.
It needs Node 18 or later, on macOS or Linux, arm64 or x64.
The second line runs add-mcp, Neon's open-source installer. It finds the agents you have installed, asks which ones to add Turf to, and writes each one's config; running it again replaces the entry. Restart Claude Desktop or Cursor after the config changes.
There is nothing else to install. npm brings the server and its engine, and the engine starts when your agent first needs it. If your agent's first start fails, turn Turf off in your agent, run the first line in a terminal and let it finish, then reconnect. Later starts take several seconds.
Providers run in the engine, not in your agent's session. Cloud credentials in their usual
files are read there with nothing set. A variable a provider needs goes in the
env of Turf's entry, with TURF_PROVIDER_ENV naming it:
Send a variable to providers.
Turf sends anonymous usage telemetry to Turf LLC by default: the version, the platform,
counts of resources, changes and runs, and an anonymous installation id. It never sends
resource contents, credentials, state, variable values or names. Turn it off with
turf telemetry off, or with TURF_TELEMETRY=off or
DO_NOT_TRACK=1 in the engine's environment; the full field list and the endpoint
are at turf.build/telemetry.
With this install, the engine's environment is the env of Turf's entry in each
of your agents: set it there, reconnect them, and stop the engine. The steps are on
that page; turf telemetry off comes with the
turf CLI.
Each client can also add the server itself, in place of the second line. Run the first line before it:
# Claude Code $ claude mcp add turf --scope user -- npx -y @turfbuild/turf-mcp-server # Codex CLI $ codex mcp add turf -- npx -y @turfbuild/turf-mcp-server # Gemini CLI $ gemini mcp add -s user turf npx -y @turfbuild/turf-mcp-server # VS Code $ code --add-mcp '{"name":"turf","command":"npx","args":["-y","@turfbuild/turf-mcp-server"]}'
Claude Desktop and Cursor read the same entry from their config file. Add it, then restart the app:
{ "mcpServers": { "turf": { "command": "npx", "args": ["-y", "@turfbuild/turf-mcp-server"] } } }
The server speaks MCP over stdio by default, or over HTTP with
npx -y @turfbuild/turf-mcp-server --transport http
(turf-mcp-server --transport http with Homebrew or the script; it binds
loopback). To require a token, set
TURF_MCP_AUTH_TOKEN in the server's environment; clients then send
Authorization: Bearer <token>.
A server can be given less than every tool: --tier read, plan,
apply or full (the default; or TURF_TIER). A plan-tier
server plans and keeps each plan as a planfile; an apply-tier server, with its own credentials,
applies one.
Until you accept, the server connects and lists its tools, and every call answers with the license notice. Your acceptance is read at the next call, so there is nothing to restart.
Where no one is there to answer, such as a container or a CI job, setting
TURF_ACCEPT_EULA=yes in the environment accepts the terms at
turf.build/license/v1 instead.
Accept the license in the docs has
each case.
Turf's prompts are slash commands in Claude Code. Start with the walkthrough: it runs a real example from turf-examples and shows the plan gate and the approval point on the way.
# first-run walkthrough > /turf:guide # deploy or update a configuration directory > /turf:up path/to/config # tear it down > /turf:destroy path/to/config
In any other client, ask in words: “deploy the configuration in ./infra with Turf”. Slash-command arguments are one word each, so the path has no spaces. Every change is planned, shown to you, and applied as approved, round by round — a plan gate and an approval point every round. Nothing runs off-plan.
Homebrew adds the turf CLI and an engine that starts at login. The tap installs
five binaries: turf-mcp-server, the MCP server your agent talks to; the engine
behind it, turf-engine and turf-builtin-provider; the console,
turf-ui; and the turf CLI.
$ brew install restatedev/tap/restate-server turfbuild/tap/turf $ turf license accept $ npx add-mcp@2 "$(command -v turf-mcp-server)" --name turf -g $ brew services start turf # optional: the engine at every login
The second line accepts the license terms at
turf.build/license/v1: read them first. The third writes each
agent's config with the server's absolute path, so an app launched from the Dock finds it
too; in your client's own command, turf-mcp-server takes the place of
npx -y @turfbuild/turf-mcp-server.
The last line is optional. Without it, the server starts the engine when a tool first needs it; the service starts the same engine at every login. Upgrading is in the docs.
$ curl -fsSL https://get.turf.build/install.sh | bash
With Homebrew on your PATH the script runs the same install and starts the service. Without
it, the script unpacks the release into ~/.turf/bin, and the server starts the
engine when a tool first needs it. Then connect your agent with the Homebrew line above.
A multi-arch image is published to GHCR, for a cluster: Running Turf in a cluster.
$ docker pull ghcr.io/turfbuild/turf-mcp-server:latest
Turf's own agent, turf chat, drives the same server and engine with a model you
bring. The turf CLI comes with the Homebrew install or the script. Set a key for
a hosted model, or run fully local with no key and no cost.
# hosted frontier model $ export ANTHROPIC_API_KEY=sk-... # or a local model — no API key, no cost $ turf --model dmr/ai/qwen3 chat # or a private GPU endpoint (vLLM, LM Studio, gateways) $ turf --base-url https://gpu.internal/v1 --model my-model chat
Chat interactively, or converge a whole stack from a config directory.
$ turf chat $ cd path/to/config && turf up $ cd path/to/config && turf destroy
The container image is signed with cosign (keyless, via GitHub OIDC).
# verify the signature $ cosign verify ghcr.io/turfbuild/turf-mcp-server:latest \ --certificate-identity-regexp '^https://github.com/turfbuild/turf-mcp-server/' \ --certificate-oidc-issuer https://token.actions.githubusercontent.com # verify the SBOM attestation $ cosign verify-attestation --type cyclonedx ghcr.io/turfbuild/turf-mcp-server:latest \ --certificate-identity-regexp '^https://github.com/turfbuild/turf-mcp-server/' \ --certificate-oidc-issuer https://token.actions.githubusercontent.com
Installed with Homebrew? Verify the binary's provenance with
gh attestation verify turf --repo turfbuild/turf. The npm packages are published
with npm provenance from the turfbuild/turf repository's publish workflow, and
carry the release's own binaries.
Verify a release has every command.