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 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 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: generate-images-with-claude-and-mcp
title: Generate Images with Claude and Hugging Face
author: evalstate
thumbnail: /blog/assets/generate-images-with-claude-and-mcp/thumbnail.png
date: Aug 14, 2025
tags:
- mcp
- llm
- qwen
- text_to_image
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
91 changes: 91 additions & 0 deletions generate-images-with-claude-and-mcp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
title: "Generate Images with Claude and Hugging Face"
thumbnail: /blog/assets/generate-images-with-claude-and-mcp/thumbnail.png
authors:
- user: evalstate
---

# Create Images with Claude and Hugging Face

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

## 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.

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>
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
<figcaption>Conneting Claude to Hugging Face</figcaption>
<figcaption>Connecting Claude to Hugging Face</figcaption>

</figure>

Behind the scenes Claude is now set up to use tools from the [Hugging Face MCP Server](https://huggingface.co/mcp?login), seamlessly extending it's capabilities. This includes the latest AI Applications running on our innovative [ZeroGPU](https://huggingface.co/docs/hub/spaces-zerogpu) powered Spaces - providing free access to large, powerful models that are would normally be expensive to use.
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
Behind the scenes Claude is now set up to use tools from the [Hugging Face MCP Server](https://huggingface.co/mcp?login), seamlessly extending it's capabilities. This includes the latest AI Applications running on our innovative [ZeroGPU](https://huggingface.co/docs/hub/spaces-zerogpu) powered Spaces - providing free access to large, powerful models that are would normally be expensive to use.
Behind the scenes, Claude is now set up to use tools from the [Hugging Face MCP Server](https://huggingface.co/mcp), seamlessly extending its capabilities. This includes the latest AI Applications running on our innovative [ZeroGPU](https://huggingface.co/docs/hub/spaces-zerogpu) powered Spaces - providing free access to large, powerful models that would normally be expensive to use.

Perhaps we could tone down "free" a bit saying that users have free credits to use ZeroGPU (and later on in the post we could recommend to upgrade to Pro to get more credits).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've tweaked this and think it reads better.

Copy link
Member

Choose a reason for hiding this comment

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

Did you push it? I'm not sure I'm seeing the latest revisions.


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.

## 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">
Copy link
Member

Choose a reason for hiding this comment

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

This video shows how to add Qwen, not Krea (even if Krea is a tool already added to the user's config)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will cut a new video; will be less confusing.

</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>
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
<figcaption>Hugging Face Graffiti Street Scene</figcaption>
<figcaption>Hugging Face Graffiti Street Scene Generated with Krea</figcaption>

(would be cool to see results from both side by side, as introduced in the text)

</figure>



## Conclusion

Connecting Claude to Hugging Face Spaces makes using state-of-the-art models on the day of release as easy as clicking a button. Explore the AI App Directory at [https://huggingface.co/spaces](https://huggingface.co/spaces) and build amazing things with [Video Generation](https://huggingface.co/spaces/evalstate/ltx-video-distilled), [Text Generation](https://huggingface.co/spaces/amd/gpt-oss-120b-chatbot), [Image Editing](https://huggingface.co/spaces/evalstate/FLUX.1-Kontext-Dev) and many thousands more. Let us know what you find and create in the comments below.
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
Connecting Claude to Hugging Face Spaces makes using state-of-the-art models on the day of release as easy as clicking a button. Explore the AI App Directory at [https://huggingface.co/spaces](https://huggingface.co/spaces) and build amazing things with [Video Generation](https://huggingface.co/spaces/evalstate/ltx-video-distilled), [Text Generation](https://huggingface.co/spaces/amd/gpt-oss-120b-chatbot), [Image Editing](https://huggingface.co/spaces/evalstate/FLUX.1-Kontext-Dev) and many thousands more. Let us know what you find and create in the comments below.
Connecting Claude to Hugging Face Spaces makes using state-of-the-art models as easy as clicking a button, even the day new models are released. Explore the AI App Directory at [https://huggingface.co/spaces](https://huggingface.co/spaces) and build amazing projects with [Video Generation](https://huggingface.co/spaces/evalstate/ltx-video-distilled), [Text Generation](https://huggingface.co/spaces/amd/gpt-oss-120b-chatbot), [Image Editing](https://huggingface.co/spaces/evalstate/FLUX.1-Kontext-Dev) and many thousands more. Let us know what you find and create in the comments below!

Is the AMD gpt-oss space compatible with MCP?


With a Hugging Face account, it's simple to add new tools to Claude and use them straight away.