title: HF Thumbnail Crafter
emoji: π¨
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
license: mit
HF Thumbnail Crafter
A web-based thumbnail creator for HuggingFace users with AI tool integration. Create professional thumbnails through the web interface OR call it programmatically from HuggingChat and other AI assistants via MCP (Model Context Protocol).
π€ AI Tool Integration - Comprehensive MCP API (NEW!)
This Space is now fully MCP-compatible with complete programmatic control! AI agents can use ALL features just like a human:
β¨ 50+ API methods - Complete canvas control π¨ 5 pre-designed layouts - Professional templates π 44+ Huggy mascots - Rich asset library π§ Full object manipulation - Add, edit, move, resize anything π¦ One-shot creation - Generate complete thumbnails in one call
Example Usage in HuggingChat
You: "Create a fun thumbnail with the title 'AI Revolution',
add a Game Jam Huggy, use a light blue background"
HuggingChat:
π¨ Loading layout...
βοΈ Adding title text...
π€ Adding Huggy mascot...
π¨ Setting background...
β
Here's your thumbnail! [returns image]
Key Features
17+ MCP Tools Available:
- Canvas Management: Set size, background, export
- Layout System: Load 5 professional layouts
- Object Operations: Add/update text, images, shapes
- Huggy Library: Access 44+ mascot assets
- Text Operations: Update, style, search/replace
- Transform: Move, resize, rotate objects
- Batch Operations: Execute multiple commands at once
create_thumbnail- High-level one-shot generation
What AI Agents Can Do:
- β Create thumbnails from scratch
- β Use and customize layouts
- β Add text with custom fonts/sizes/colors
- β Add Huggy mascots
- β Upload custom images
- β Position and style elements
- β Export finished designs
MCP Endpoint
POST https://huggingface.co/spaces/Chunte/Thumbnail-Crafter.mini.mcp_experiment/tools
Setup in HuggingChat
- Go to HuggingChat β Settings β MCP Servers
- Add this Space's URL:
https://huggingface.co/spaces/Chunte/Thumbnail-Crafter.mini.mcp_experiment - Enable it as a tool
- Start creating! Examples:
- "Create a thumbnail with the title 'New Feature'"
- "Load the Serious Collab layout and add a Huggy Chef"
- "Make a LinkedIn-sized thumbnail with Impact Title layout"
Architecture
This Space combines:
- React Frontend - Professional canvas-based design tool
- window.thumbnailAPI - 50+ JavaScript methods for complete control
- FastAPI MCP Server - Exposes API as MCP tools
- Playwright Automation - Headless browser control for real app interaction
AI agents interact with the actual React app, not just backend image generation!
π Documentation:
- MCP_COMPREHENSIVE_GUIDE.md - Complete integration guide
- API_SPECIFICATION.md - Full API reference (50+ methods)
- IMPLEMENTATION_STATUS.md - What's been built
Features
- 4 Pre-designed Layouts: Serious Collab, Fun Collab, Sandwich, and Docs layouts
- 44+ Huggy Mascot Assets: Loaded directly from HuggingFace dataset
- Custom Text Editing: Support for Inter & IBM Plex Mono fonts with bold/italic styling
- Image Upload: Drag-and-drop support for local images (PNG, JPG, WebP)
- Layer Management: Use
[and]keyboard shortcuts to reorder objects - Smart Canvas Tools:
- Multi-select with drag-to-select box or Shift+Click
- Arrow key movement (1px or 10px with Shift)
- Shift-constrained drag (horizontal/vertical lock)
- Smart snapping to canvas center lines
- Export: High-quality PNG export with custom filename
- Undo/Redo: Full history support (Ctrl+Z / Ctrl+Shift+Z)
Usage
- Select a Layout: Click the Layout button in the sidebar to choose from 4 pre-designed templates
- Customize:
- Add Huggys from the Huggy menu
- Upload your own images
- Edit text directly on canvas (double-click)
- Adjust colors using the background selector
- Arrange Objects:
- Drag to reposition
- Use
[and]keys to change layer order - Transform with scaling and rotation
- Export: Click the export button and download your thumbnail as PNG
Keyboard Shortcuts
T: Activate text creation modeDelete/Backspace: Delete selected objectsCtrl+Z: UndoCtrl+Shift+Z: RedoCtrl+D: Duplicate selected objectsArrow Keys: Move selection 1px (hold Shift for 10px)[: Send backward (decrease layer order)]: Bring forward (increase layer order)Shift + Drag: Constrain to horizontal/vertical axis
Canvas Sizes
- 1200Γ675: Default size (X/Twitter)
- 1200Γ627: LinkedIn size
- 1160Γ580: HuggingFace custom size
Tech Stack
- Frontend: React 18 + TypeScript
- Build Tool: Vite
- Canvas: react-konva + Konva.js
- Styling: Tailwind CSS
- Icons: Custom Figma-exported SVGs
- Fonts: Inter, IBM Plex Mono, Bison Bold
Development
# Install dependencies
npm install
# Run dev server
npm run dev
# Build for production
npx vite build
License
MIT
π€ Built with Claude Code