Skip to content

Feat/claude images mcp #3029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions _blog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6541,3 +6541,14 @@
- llm
- evaluation
- agents

- local: claude-images-mcp
title: Create Images with Claude and Hugging Face
author: evalstate
thumbnail: /blog/assets/claude-images-mcp/thumbnail.png
date: Aug 14, 2025
tags:
- mcp
- llm
- qwen
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- qwen
- qwen
- flux

(or krea)

- text_to_image
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- text_to_image
- text-to-image

This one is more used.

Binary file added assets/claude-images-mcp/thumbnail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
90 changes: 90 additions & 0 deletions claude-images-mcp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
---
title: "Create Images with Claude and Hugging Face"
thumbnail: /blog/assets/claude-images-mcp/thumbnail.png
authors:
- user: evalstate
---

# Create Images with Claude and Hugging Face

> [!TIP]
> **TL;DR:** Its easier than ever to generate detailed pictures using the latest AI models - by connecting Claude to Hugging Face Spaces. This article describes how, why, and introduces recently launched models which excel at producing natural images and including text.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe link some example text to image spaces here?

and perhaps we can emphasise that these models are SoTA.

essentially clause is SoTA for text/ code and these models are SoTA for Image* - combined we make a beast.

## Introduction

Recent advances in Image Generation models have improved their ability to produce realistic outputs and incorporate high quality text. It's easier than ever to use these models by connecting them directly to Claude.

The advantages of generating pictures using this way are:
- The AI can assist in building detailed prompts that may improve the output quality of generated images.
- The AI can "see" the generated images, then help iterate on designs and techniques to get perfect results.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not always true tho no? :p - specially not in the case of claude


To get started, create a free [Hugging Face account](https://huggingface.co/join), then connect Claude from its "Search and tools" menu in the chat input box. The video below shows the exact steps needed:

<figure class="image flex flex-col items-center text-center m-0 w-full">
<video
alt="claude-auth-flow.mp4"
autoplay loop autobuffer muted playsinline
>
<source src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/claude-images-mcp/claude-auth-flow.mp4" type="video/mp4">
</video>
<figcaption>Conneting Claude to Hugging Face</figcaption>
</figure>

Confirm that that the Hugging Face tools are available from the "Search and tools" menu... and now we are ready to try some of the latest models.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe here we can add a small blurb about the HF MCP Server

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somewhere here, I think it might be good to talk about ZeroGPU too i.e. they are able to use these chonky models thanks to our serverless GPU platform.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have added some text; i didn't want the article to become too technical/explanatory though - wanted to keep it accessible to Claude users that might already be uncomfortable with some of the terminology. not sure i've managed it though :D


## Natural Images with Flux.1 Krea Dev

[FLUX.1 Krea [dev]](https://huggingface.co/black-forest-labs/FLUX.1-Krea-dev) aims to eliminate the telltale "AI look" that often plague generated images - for example plastic skin, oversaturated colors, or overly smooth textures. If you want images that look like they were shot by a professional photographer rather than generated by a computer, Krea delivers the realistic textures, natural lighting, and authentic aesthetics that other AI models struggle with. You can read more about how they did this [on their blog](https://www.krea.ai/blog/flux-krea-open-source-release).

<figure class="image text-center">
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/claude-images-mcp/bfl_krea_image_wide.avif" alt="Examples from Krea">
<figcaption>Examples from the Krea Image Generator</figcaption>
</figure>




To try **Krea**, go to [`huggingface.co/mcp/settings`](https://huggingface.co/settings/mcp) and add `evalstate/flux1-krea` to your "Spaces Tools". This will add a tool named something similar to "`flux1_krea_dev_infer`" to Claude. This enables Claude to generate beautiful, realistic looking images. Note the precise name may vary slightly depending on your configuration.

<figure class="image flex flex-col items-center text-center m-0 w-full">
<video
alt="adding-mcp-space.mp4"
autoplay loop autobuffer muted playsinline
>
<source src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/claude-images-mcp/adding-mcp-space.mp4" type="video/mp4">
</video>
<figcaption>Adding a Space in <a href='https://huggingface.co/settings/mcp'>MCP Settings</a></figcaption>
</figure>


You can then try a prompt in Claude like:

> "Use Krea to create an image of a Vibrant garden with victorian house".
To begin generating pictures.

## Qwen Image

[Qwen-Image](https://huggingface.co/Qwen/Qwen-Image) is a powerful AI image generator that excels at creating images with accurate text rendering, making it ideal for designing posters, signs, infographics, and marketing materials where text quality matters. Read more about the Qwen-Image model from their [blog post](https://qwenlm.github.io/blog/qwen-image/).

<figure class="image text-center">
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/claude-images-mcp/qwen_sample.jpg" alt="Examples from Qwen">
<figcaption>Examples from the Qwen-Image Generator</figcaption>
</figure>


To use **Qwen-Image** add `evalstate/qwen-image` from your [MCP Servers setting](https://huggingface.co/settings/mcp) page, then check it is enabled in Claude to start using it.

You can even keep both enabled and ask Claude to use both and compare results for similar concepts - for example: "Use Krea and Qwen to generate a street scene with 'Hugging Face' graffiti sprayed on the wall".


<figure class="image text-center">
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/claude-images-mcp/krea_hf_example.webp" alt="Hugging Face Graffiti Street Scene">
<figcaption>Hugging Face Graffiti Street Scene</figcaption>
</figure>


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to spice things up a bit should we add the ltx-fast example as a nice ending too? :p

I think it could work quite well.


## Conclusion

Hugging Face Spaces paired with the Claude Connectors gives you simple access to the very latest AI models - often on the day of launch. With a Hugging Face account, it's simple to add new tools to Claude and use them straight away.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to end more enthusiastically

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evalstate - we can create a community discussion here and ask people to share their feedback and generations there? wdyt?

and give them a to-do to try some image to video models with the generated images too.

think it could be nice way to end.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request re-review, have made it more optimistic. vb - i was planning to follow up with an article on a) a LoRA image space and b) using Kontext/explaining the gradio_files feature i added this week...