Flux Schnell Server
Provides an HTTP interface to call the Flux Schnell image generation model hosted on Hugging Face, allowing for customized image creation with adjustable dimensions and seed values
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Flux Schnell Server generate a serene mountain landscape at sunset with a lake, width 1024, height 768"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Flux Schnell Server
基于Flux Schnell模型的MCP图像生成服务器。
功能特点
提供基于MCP协议的图像生成API
支持自定义图片尺寸(宽度和高度)
支持设置随机种子以复现特定生成结果
支持异步流式响应
提供HTTP接口调用Hugging Face的模型服务
Related MCP server: Flux Schnell MCP Server
安装要求
Python >= 3.10
依赖包:
httpx >= 0.28.1
mcp[cli] >= 1.3.0
使用方法
开发环境设置
创建并激活 Python 虚拟环境
uv venv && source .venv/bin/activate # Unix/macOS
# 或
.venv\Scripts\activate # Windows安装开发依赖
uv sync # 以可编辑模式安装项目调试方法
启用调试
mcp dev main.py
或者
npx -y @modelcontextprotocol/inspector uv run main.py调用图像生成工具:
# 示例代码
async def test_main():
img_url = await image_generation(
prompt="your prompt here",
image_width=512, # 可选,默认512
image_height=512, # 可选,默认512
seed=3 # 可选,默认3
)
print(img_url)API参数说明
prompt(str): 图像生成提示词image_width(int, optional): 生成图片宽度,默认512image_height(int, optional): 生成图片高度,默认512seed(int, optional): 随机种子,默认3
示例
春天的生机

春天来了,大地苏醒,万物复苏。花儿竞相开放,嫩绿的叶子在微风中轻轻摇曳。空气中弥漫着泥土的芬芳和花儿的香气。小鸟在枝头欢快地歌唱,蝴蝶在花丛中翩翩起舞。阳光洒在大地上,温暖而明亮。春天的生机勃勃,让人心旷神怡。
这个示例展示了使用服务生成的图片效果。您可以在demo目录中找到完整的网页展示代码。
生成的图片URL可以直接用于:
网页图片展示
社交媒体分享
应用程序界面
Available Tools
1 toolimage_generationC
Generate an image from a prompt.
Args:
prompt (str): 生成图片的提示词
image_size (int, optional): 生成图片的大小. Defaults to 512.
Returns:
str: 生成的图片的base64编码
Inputs: prompt (required), image_width, image_height, seed.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'image_generation' has a clear, distinct purpose that cannot be confused with any other tool in this server.
The single tool name 'image_generation' follows a clear noun_verb pattern. With only one tool, there is no inconsistency to evaluate, and the naming convention is straightforward and appropriate for its function.
A single tool for an image generation server feels thin and limited in scope. While it covers the core functionality, typical image generation servers might include additional tools for variations, editing, or different models. This minimal set may restrict agent capabilities.
The server provides basic image generation, but lacks tools for related operations like image editing, style transfer, or batch processing. The surface is functional but incomplete for a comprehensive image generation domain, potentially causing agent workarounds.
Maintenance
Related MCP Connectors
MCP server for Flux AI image generation
Official FLUX MCP server. Generate, edit, vary, and browse images from Black Forest Labs.
MCP server for Qwen Image 3 AI image generation
MCP server for Wan AI video generation
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables generation of high-quality images using the Flux.1 Schnell model via Together AI, allowing users to create images from text prompts with customizable dimensions.118MIT
- AlicenseNot gradedqualityDmaintenanceA server that enables generating images through the Replicate API by calling the Flux Schnell model via the Model Context Protocol (MCP).2MIT
- AlicenseCqualityDmaintenanceAn MCP server that generates images based on text prompts using Black Forest Lab's FLUX model, allowing for customized image dimensions, prompt upsampling, safety settings, and batch generation.31MIT
- FlicenseBqualityNot gradedmaintenanceAn MCP server that enables generating and editing high-quality images with natural language using Black Forest Labs' FLUX.1 Kontext Pro model.25 npm-