Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Pytraeger Client

БесплатноНе проверен

Async Python client for the Traeger WiFIRE grill IoT API, with an optional MCP server

GitHubEmbed

Описание

Async Python client for the Traeger WiFIRE grill IoT API, with an optional MCP server

README

Async Python client for the Traeger WiFIRE grill IoT API, with an optional MCP server so LLM agents (Claude Desktop, Claude Code, …) can monitor and control your grill.

Disclaimer: This library uses an unofficial, reverse-engineered API that may change at any time without notice. It is not affiliated with or endorsed by Traeger. See api.md for the API reference this is built on.

The Traeger API is fully cloud-based: the library talks to Traeger's cloud (HTTPS + MQTT over WebSockets, all on port 443), never to the grill directly. It works from anywhere with internet access — your laptop, a server, or a cloud agent sandbox — as long as the grill itself is online.

Installation

pip install pytraeger-client            # client library
pip install "pytraeger-client[mcp]"     # + MCP server

Requires Python 3.11+.

Library usage

import asyncio
from pytraeger_client import TraegerClient

async def main():
    async with TraegerClient("[email protected]", "your-password") as client:
        grills = await client.get_grills()
        grill = grills[0]
        print(grill.friendly_name, grill.thing_name)

        # Read live state (one MQTT round trip)
        state = await client.get_status(grill.thing_name)
        print(state.status.system_status.name, state.status.grill_temperature)

        # Control the grill
        await client.set_temperature(grill.thing_name, 225)
        await client.set_probe_temperature(grill.thing_name, 165)
        await client.set_super_smoke(grill.thing_name, True)
        # await client.shutdown(grill.thing_name)

asyncio.run(main())

Streaming live updates

There is no REST endpoint for grill state — the grill publishes it over MQTT. TraegerMqttListener handles the signed-URL handshake, subscription, and reconnection for you:

from pytraeger_client import TraegerClient, TraegerMqttListener

async with TraegerClient(username, password) as client:
    listener = TraegerMqttListener(client, ["YOUR_THING_NAME"])
    async for state in listener.listen():
        print(state.status.grill_temperature, "→", state.status.target_temperature)

API surface

Method Effect
get_user() / get_grills() Account profile and registered grills
get_status(thing_name) One-shot live state via MQTT
set_temperature(thing_name, temp) Set grill target temperature
set_timer(thing_name, seconds) / clear_timer(...) Cook timer
set_probe_temperature(thing_name, temp) Probe target/alarm temperature
set_keep_warm(thing_name, on) Keep Warm mode
set_super_smoke(thing_name, on) Super Smoke mode
shutdown(thing_name) Start the cool-down cycle
send_command(thing_name, cmd) Raw command escape hatch

Temperatures use whatever units the grill is configured for — check state.status.units (Units.CELSIUS / Units.FAHRENHEIT).

MCP server

The traeger-mcp server exposes the grill as MCP tools: list_grills, get_grill_status, set_grill_temperature, set_cook_timer, clear_cook_timer, set_probe_target, set_keep_warm, set_super_smoke, and shutdown_grill.

Credentials come from the TRAEGER_USERNAME / TRAEGER_PASSWORD environment variables.

Claude Code

claude mcp add traeger \
  -e [email protected] \
  -e TRAEGER_PASSWORD=your-password \
  -- traeger-mcp

Claude Desktop

Open the config file from Settings → Developer → Edit Config (this creates it if needed), or edit it directly:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Use an absolute command path. Claude Desktop launches MCP servers with a minimal environment that usually does not include your shell PATH, so a bare "command": "traeger-mcp" typically fails with "spawn traeger-mcp ENOENT". Point command at the full path instead — find it with which traeger-mcp (macOS/Linux) or where traeger-mcp (Windows) after installing.

{
  "mcpServers": {
    "traeger": {
      "command": "/absolute/path/to/traeger-mcp",
      "env": {
        "TRAEGER_USERNAME": "[email protected]",
        "TRAEGER_PASSWORD": "your-password"
      }
    }
  }
}

Or run it straight from a source checkout with uv, which avoids the PATH problem entirely (replace the directory with your clone location):

{
  "mcpServers": {
    "traeger": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/pytraeger-client", "traeger-mcp"],
      "env": {
        "TRAEGER_USERNAME": "[email protected]",
        "TRAEGER_PASSWORD": "your-password"
      }
    }
  }
}

If uv itself isn't found, use its absolute path too (which uv).

After saving, fully quit and reopen Claude Desktop (a window reload isn't enough). The traeger tools then appear under the tools (🔨) icon in the chat box. If the server fails to start, check the logs at ~/Library/Logs/Claude/mcp-server-traeger.log (macOS).

Remote / cloud hosting

The server also speaks Streamable HTTP for use as a remote MCP endpoint:

traeger-mcp --transport http --host 0.0.0.0 --port 8000

Security: in HTTP mode, anyone who can reach the endpoint can control your grill with your credentials. Run it only on a private network or behind an authenticating reverse proxy — never exposed directly to the internet.

Development

uv sync                      # install with dev dependencies
uv run pytest                # mocked tests (no credentials needed)
uv run ruff check . && uv run mypy

# Live read-only smoke test against your real account/grill:
TRAEGER_USERNAME=... TRAEGER_PASSWORD=... uv run python scripts/smoke_test.py

License

MIT

from github.com/bruno-t-de-renzo/pytraeger-client

Установка Pytraeger Client

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/bruno-t-de-renzo/pytraeger-client

FAQ

Pytraeger Client MCP бесплатный?

Да, Pytraeger Client MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Pytraeger Client?

Нет, Pytraeger Client работает без API-ключей и переменных окружения.

Pytraeger Client — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Pytraeger Client в Claude Desktop, Claude Code или Cursor?

Открой Pytraeger Client на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Compare Pytraeger Client with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории development