Thermomix-MCP
by modulrdesign
README.md
# Thermomix-MCP
Rezepte aus **beliebigen Quellen** (Rezept-Websites, YouTube, Instagram, TikTok, KI) in
ein **Thermomix-Rezept** verwandeln — und wahlweise direkt in **Cookidoo → „Meine
Kreationen"** hochladen, inkl. **Guided-Cooking-Schritten** und Bild, sodass es am **TM7**
abrufbar ist.
Zwei Betriebsarten:
- **MCP-Server** (Chat-Flow) — Claude bekommt die Rohdaten und baut das Rezept.
- **Webhook** (headless) — nimmt eine geteilte URL entgegen und macht die Umwandlung
selbst per Anthropic-API. Ideal für einen „aus jeder App teilen"-Flow.
> **Kein offizielles Vorwerk-/Cookidoo-API.** Der Cookidoo-Upload nutzt eine
> reverse-engineerte Schnittstelle ([`cookidoo-api`](https://github.com/miaucl/cookidoo-api)
> + rohe `created-recipes`-Endpoints) und ein aktives Cookidoo-Abo. Das kann jederzeit
> brechen. Der TM7 selbst lässt sich **nicht** fernsteuern — nur Content-Sync über den Account.
## Quellen
| Quelle | Weg |
|--------|-----|
| Rezept-Websites (Chefkoch & Co.) | `schema.org/Recipe` / JSON-LD (`recipe-scrapers`) |
| YouTube | Beschreibung + Transkript |
| Instagram / TikTok | Caption (oEmbed), optional Tonspur-Transkription (Whisper) |
| KI-generiert | Claude erstellt das Rezept ohne Quelle |
Enthält ein Post kein Rezept (z. B. TikTok-Caption „recipe on the blog"), sucht der
**Deep-Hunt** die Original-Rezeptseite per Websuche und transkribiert notfalls die Tonspur.
## MCP-Tools & Prompts
| Tool | Zweck |
|------|-------|
| `fetch_recipe(url)` | Rezept-Rohdaten aus Web/YouTube/Instagram/TikTok |
| `find_recipe_image(query)` | Fallback-Bildsuche (Pexels) |
| `save_thermomix_recipe(markdown, filename)` | Rezept-Karte als `.md` speichern |
| `upload_thermomix_recipe(recipe, image_url=…)` | Rezept nach Cookidoo hochladen (Guided) |
Prompts: `thermomix_guide` (TM-Konvertierungsregeln), `cookidoo_guide` (Modus-Zuordnung).
## Setup
```bash
uv sync # Kern
uv sync --extra cookidoo # + Cookidoo-Upload
uv sync --extra whisper # + Audio-Transkription (Social-Reels)
cp .env.example .env # Keys/Optionen eintragen
```
`ffmpeg` wird für YouTube-/Social-Audio gebraucht (`brew install ffmpeg`).
### In Claude Code einbinden
```bash
claude mcp add thermomix -- uv --directory /pfad/zu/thermomix-mcp run thermomix-mcp
```
Dann z. B.: *„Mach mir aus dieser Chefkoch-URL ein Thermomix-Rezept."*
## Webhook — „aus jeder App teilen"
```bash
uv run thermomix-webhook # startet auf 0.0.0.0:8787
```
Endpunkte:
- `GET /health` → Status
- `POST /recipe` mit `{"url": "…", "caption": "…"(optional)}` und Header
`X-Auth-Token: <WEBHOOK_TOKEN>` → extrahiert, wandelt um, speichert die Karte, lädt
(wenn konfiguriert) nach Cookidoo hoch. Rezeptlose Video-Posts → sofort `202` +
Deep-Hunt im Hintergrund.
Für den Zugriff von unterwegs den Webhook über einen **Tunnel** freigeben (z. B.
[Tailscale Funnel](https://tailscale.com/kb/1223/funnel) oder Cloudflare Tunnel — feste
HTTPS-URL, keine Portfreigabe). Ein iOS-Kurzbefehl im Teilen-Menü POSTet die geteilte URL
dorthin. **Vor jeder öffentlichen Exposure `WEBHOOK_TOKEN` setzen.**
## Konfiguration (.env)
| Variable | Zweck |
|----------|-------|
| `THERMOMIX_OUTPUT_DIR` | Zielordner für Rezept-Karten (Default `./recipes`) |
| `PEXELS_API_KEY` | Fallback-Bildsuche ([kostenlos](https://www.pexels.com/api/)) |
| `WHISPER_MODEL` | `tiny`/`base`/`small`/`medium` (Default `base`) |
| `YTDLP_COOKIES_FROM_BROWSER` | `safari`/`chrome`/… für Login-Wände bei Instagram/TikTok |
| `ANTHROPIC_API_KEY` | **Webhook:** für die headless-Umwandlung nötig |
| `THERMOMIX_LLM_MODEL` | Webhook-Modell (Default Haiku; `claude-sonnet-5` für mehr Qualität) |
| `WEBHOOK_TOKEN` | **Webhook:** Auth-Token — vor öffentlicher Exposure zwingend |
| `WEBHOOK_HOST` / `WEBHOOK_PORT` | Webhook-Bind (Default `0.0.0.0:8787`) |
| `COOKIDOO_EMAIL` / `COOKIDOO_PASSWORD` | Cookidoo-Upload (braucht aktives Abo) |
## Lizenz
[MIT](LICENSE)
TDQS
A4.1/5.0
Scored across 4 tools
Disambiguation5/5
Each tool has a distinct and non-overlapping purpose: fetching raw recipe data, finding a fallback image, saving as markdown, and uploading to Cookidoo. No ambiguity.
Naming Consistency5/5
All tool names follow a consistent verb_noun pattern with underscores (e.g., fetch_recipe, find_recipe_image), making them predictable and easy to understand.
Tool Count4/5
4 tools is on the lower side but appropriate for the focused domain of Thermomix recipe processing. Each tool serves a clear step in the workflow without unnecessary bloat.
Completeness4/5
The tool set covers the core workflow: fetching, image fallback, saving locally, and uploading. The conversion step is handled by the model via a prompt, so no gap exists.
Maintenance
ActivityStale
ResponsivenessNo issues