Skip to main content
Glama
Unsloth Studio Marketing for Claude Desktop

Unsloth Studio Marketing for Claude Desktop

by ElMoorish
README.md
# Unsloth Studio Marketing for Claude Desktop

Make marketing images and short videos **on your own GPU** from Claude Desktop, using
[Unsloth Studio](https://github.com/unslothai/unsloth). Built for the common creator PC:
**Windows, 8 GB of VRAM (RTX 4060 class) and 16 GB of RAM.**

> Status: early (0.1). Tested against a simulated Studio; not yet verified end to end on real hardware.
> Reports from 8 GB machines are very welcome.

## Why this exists

Unsloth Studio already ships its own MCP server, and `unsloth mcp add` wires it into Claude Code,
Codex and Cursor. This connector builds on that server (it calls Studio's own MCP tools) and adds
what a small GPU and Claude Desktop need:

| Need | What the connector does |
|---|---|
| Claude Desktop is a one-click install | Packaged as a Claude Desktop extension (`.mcpb`) with a settings form; the API key is stored as a secret. |
| Long video renders vs. Claude Desktop's tool timeout (about 4 minutes on Windows) | Every job goes to a durable one-at-a-time queue. Tools return a job id quickly; `get_job_status` waits up to 45 s per call. Jobs survive a restart. |
| 8 GB of VRAM, 16 GB of RAM | Checks free RAM, VRAM fit and GPU temperature before each job, unloads the image model before a video model loads (and the reverse), clamps clips to 81 frames unless you opt in. |
| Picking models that fit and that you may use commercially | A curated list with 8 GB fit and license notes. Models that cannot fit (LTX 2.5, MiniMax H3) are refused with a reason. |
| Claude needs to see the result | Saves full-size masters, 1024 px previews and a 2x2 contact sheet for each video; `inspect_asset` shows them to Claude. |
| AI garbles logos, prices and small text | `add_brand_overlay` adds an exact logo, headline and CTA button with Pillow, no AI involved. |
| Reproducibility | A `.recipe.json` beside every file: model, seed, size, prompt, input hashes and the license note. |

## Requirements

- [Unsloth Studio](https://github.com/unslothai/unsloth) running on the same PC (default `http://127.0.0.1:8888`).
- In Studio: **Settings > Agents > Allow agent connections** on, and a **full-access** API key from
  **Settings > API** (an inference-only key cannot load models).
- [uv](https://docs.astral.sh/uv/) (Claude Desktop uses it to run the extension).
- Optional: `ffmpeg` on PATH for video contact sheets.
- Recommended on Windows: NVIDIA Control Panel > Manage 3D settings > **CUDA - Sysmem Fallback Policy: Prefer No Sysmem Fallback**,
  so running out of VRAM fails fast instead of crawling through shared memory.

## Install

**Extension (recommended).** Download `unsloth-marketing-studio-<version>.mcpb` from Releases and
double-click it, or drag it into Claude Desktop > Settings > Extensions. Fill in the Studio URL,
your API key and an output folder.

**Manual (Microsoft Store builds, or if the extension will not install).** Clone this repo, then:

```powershell
powershell -ExecutionPolicy Bypass -File scripts\install-claude-desktop.ps1 -Workspace "$HOME\UnslothMarketing"
```

It writes the entry to `claude_desktop_config.json` (both the standard and Store locations) with a
backup. Quit Claude Desktop from the tray icon and start it again.

## Tools

| Tool | Does |
|---|---|
| `studio_check` | Studio reachability, loaded models, VRAM, GPU temperature, free RAM. |
| `list_marketing_models` | Curated models with 8 GB fit and license notes. |
| `generate_marketing_image` | Stills with presets (`square_post`, `portrait_post`, `story`, `landscape`, `youtube_thumbnail`, `ad_banner`), A/B `variants`, edits and reference images. |
| `generate_marketing_video` | Starts a clip (image-to-video from an approved still, or text-to-video) as a background job. |
| `get_job_status`, `list_jobs`, `cancel_job` | Follow, list and stop jobs. |
| `inspect_asset` | Shows Claude an image or a video's contact sheet. |
| `add_brand_overlay` | Exact logo, headline and CTA button. |

A typical chat: *"Make three 9:16 story stills of our olive oil bottle in a sunlit Moroccan riad,
show me the best one, animate it with a slow push-in, then add our logo and a 'Commander' button."*

## Models (curated defaults)

| Alias | Kind | 8 GB | License (check the model card) |
|---|---|---|---|
| `flux-3-klein` (default image) | image + edit | yes | FLUX Kommunity License: reported free commercial use under US$5M revenue |
| `z-image-turbo` | image | yes | Apache-2.0 |
| `wan2.2-ti2v-5b` (default video) | video | borderline, keep clips short | Apache-2.0 |
| `qwen-image-2.1` | image + edit | borderline | not verified |

Any other Studio model id works too. License summaries are not legal advice; the Hugging Face
model card is the controlling document.

## Settings (environment variables)

| Variable | Default |
|---|---|
| `UNSLOTH_STUDIO_URL` | `http://127.0.0.1:8888` |
| `UNSLOTH_API_KEY` | required |
| `MARKETING_WORKSPACE` | `~/UnslothMarketing` |
| `MARKETING_INPUT_DIRS` | extra folders inputs may come from (`;` separated on Windows) |
| `MIN_FREE_RAM_MB` / `VRAM_BUFFER_MB` / `MAX_GPU_TEMP_C` | `6144` / `600` / `83` |
| `MAX_TOOL_WAIT_S` | `50` |

## Develop

```bash
uv run pytest -q                                   # runs against a simulated Studio
npx @anthropic-ai/mcpb@2.1.2 pack . dist/unsloth-marketing-studio.mcpb
```

## License

Apache-2.0. Unsloth Studio is a separate project under its own license (AGPL-3.0 for Studio);
this connector only talks to it over its MCP endpoint.