Generate Images with Claude and Hugging Face

TL;DR

Hugging Face has enabled the integration of state-of-the-art image generation models directly into Claude by connecting Claude to Hugging Face Spaces via the Model Context Protocol (MCP) server. This allows users to leverage Claude's reasoning and vision capabilities to build detailed prompts and iterate on image designs using various Hugging Face models.

Integration via Hugging Face MCP Server

Claude can now be extended with tools from the Hugging Face MCP Server, providing access to AI applications running on ZeroGPU-powered Spaces. This integration allows for a streamlined workflow where the AI can assist in crafting prompts and "see" the generated images to help refine results.

Setup and Configuration

To enable this functionality, users must create a Hugging Face account and connect Claude through the "Search and tools" menu.

Update (October 2025): Due to changes in Anthropic's Connector Directory Policy, users must now use the "Add custom connector" option and set the Remote MCP server URL to https://huggingface.co/mcp?login to access image generation and other Gradio Spaces from Claude.

Supported Image Generation Models

Users can configure specific image generation tools within their MCP settings at huggingface.co/mcp/settings to determine which models Claude can access.

FLUX.1 Krea [dev]

FLUX.1 Krea [dev] is designed to eliminate common AI artifacts such as plastic skin, oversaturated colors, and overly smooth textures. It focuses on producing realistic textures, natural lighting, and authentic aesthetics to create images that look like professional photography.

Qwen-Image

Qwen-Image is optimized for prompt adherence and accurate text rendering. It is specifically suited for the creation of marketing materials, signs, infographics, and posters where high-quality text is required. This model includes a Prompt Enhancer tool to help users write more detailed prompts.

Comparative Workflows

Because multiple tools can be enabled simultaneously, users can instruct Claude to use different models for the same prompt to compare results. For example, a user can request a street scene with specific graffiti using both Krea and Qwen-Image to evaluate the difference in output quality and text rendering.

Sources