ed22a76fda
- delivery.ts: upload the stored result in its chosen format (output_ext, global or per-recipe) instead of always converting non-alpha to JPEG. - jobs POST froze the snapshot without output_ext -> per-conversion/per-recipe format choice was silently dropped. Now carried through. - telegram.ts: recipe snapshots carry output_ext + delivery_target_id (custom formats already flow via output_format). - mcp/klarbild-mcp.mjs: process_images gains tasks, output_ext, orientation, crop_mode, contour_mm, picdrop_gallery; job_status shows finished_at + errors. - Docs: llms.txt, mcp/README, changelog updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XNQ8ghPfzAfsyVYd6HgFb6
45 lines
1.7 KiB
Markdown
45 lines
1.7 KiB
Markdown
# Klarbild MCP-Server
|
|
|
|
Erlaubt einem KI-Assistenten (z. B. Claude), Bilder an Klarbild zu übergeben und dort zu
|
|
verarbeiten — etwa „nimm die Bilder aus Ordner XY" oder „verarbeite die Fotos, die mir jemand
|
|
per iMessage geschickt hat". Der Assistent besorgt die Bilddateien (mit seinen eigenen
|
|
Werkzeugen) und ruft dann die Klarbild-Tools auf.
|
|
|
|
## Einrichtung
|
|
|
|
1. In Klarbild einen Token erzeugen: **Admin → „Automatisierung / MCP-Zugriff" → Token erzeugen**.
|
|
2. Abhängigkeit installieren: `npm i @modelcontextprotocol/sdk`
|
|
3. Server starten (bzw. im MCP-Client eintragen):
|
|
|
|
```json
|
|
{
|
|
"mcpServers": {
|
|
"klarbild": {
|
|
"command": "node",
|
|
"args": ["/pfad/zu/mcp/klarbild-mcp.mjs"],
|
|
"env": {
|
|
"KLARBILD_URL": "https://klarbild.heidrich-digital.de",
|
|
"KLARBILD_TOKEN": "klb_…"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
```
|
|
|
|
## Tools
|
|
|
|
- **list_recipes** — verfügbare Presets/Rezepte auflisten.
|
|
- **process_images** — Bilder (lokale Pfade oder `data:`-URLs) hochladen und verarbeiten.
|
|
Entweder `recipeId` (Preset) oder `mode` (`each`/`compose`/`generate`) + Optionen:
|
|
`tasks` (`clean`/`cutout`/`format`/`contour`), `prompt_text`, `output_format`
|
|
(fest wie `30x40`/`theframe` **oder frei** `25x35` / `sticker5`), `output_ext` (`png`/`jpg`,
|
|
weglassen = globaler Standard), `orientation`, `crop_mode`, `contour_mm`, `picdrop_gallery`,
|
|
`delivery`. Liefert die Auftrags-ID.
|
|
- **job_status** — Status eines Auftrags abfragen (inkl. Endzeit und Fehlermeldungen).
|
|
|
|
## Sicherheit
|
|
|
|
Der Token gibt vollen programmatischen Zugriff auf Upload/Verarbeitung (nicht auf den
|
|
Admin-Bereich). Wie ein Passwort behandeln; bei Verdacht neuen Token erzeugen (der alte wird
|
|
dadurch ungültig).
|