
Flux Schnell Server
An MCP image generation server based on the Flux Schnell model that provides API access for generating images from text prompts with customizable dimensions and seeds.
README
Flux Schnell Server
基于Flux Schnell模型的MCP图像生成服务器。
功能特点
- 提供基于MCP协议的图像生成API
- 支持自定义图片尺寸(宽度和高度)
- 支持设置随机种子以复现特定生成结果
- 支持异步流式响应
- 提供HTTP接口调用Hugging Face的模型服务
安装要求
- 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可以直接用于:
- 网页图片展示
- 社交媒体分享
- 应用程序界面
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.