Skip to main content
Glama
m-mcp

Flux Schnell Server

by m-mcp

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

使用方法

开发环境设置

  1. 创建并激活 Python 虚拟环境

uv venv && source .venv/bin/activate  # Unix/macOS
# 或
.venv\Scripts\activate  # Windows
  1. 安装开发依赖

uv sync  # 以可编辑模式安装项目

调试方法

  1. 启用调试

mcp dev main.py
或者
npx -y @modelcontextprotocol/inspector uv run main.py
  1. 调用图像生成工具:

# 示例代码
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): 生成图片宽度,默认512

  • image_height (int, optional): 生成图片高度,默认512

  • seed (int, optional): 随机种子,默认3

示例

春天的生机

春天的生机

春天来了,大地苏醒,万物复苏。花儿竞相开放,嫩绿的叶子在微风中轻轻摇曳。空气中弥漫着泥土的芬芳和花儿的香气。小鸟在枝头欢快地歌唱,蝴蝶在花丛中翩翩起舞。阳光洒在大地上,温暖而明亮。春天的生机勃勃,让人心旷神怡。

这个示例展示了使用服务生成的图片效果。您可以在demo目录中找到完整的网页展示代码。

生成的图片URL可以直接用于:

  1. 网页图片展示

  2. 社交媒体分享

  3. 应用程序界面

Available Tools

1 tool
image_generationC
Generate an image from a prompt.
Args:
    prompt (str): 生成图片的提示词
    image_size (int, optional): 生成图片的大小. Defaults to 512.
Returns:
    str: 生成的图片的base64编码
ParametersJSON Schema
NameRequiredDescriptionDefault
promptYes
image_widthNo
image_heightNo
seedNo

TDQS

C2.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the basic action (generation) and return format (base64), but lacks critical behavioral information such as rate limits, processing time, quality expectations, model details, or error conditions. For a generative AI tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief but has structural issues. It front-loads the core purpose, but the parameter documentation is inconsistent with the actual schema. The bilingual nature (English description with Chinese parameter documentation) creates confusion. While concise, the structural problems reduce its effectiveness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an image generation tool with 4 parameters, 0% schema description coverage, no annotations, and no output schema, the description is incomplete. It doesn't explain the generation process, quality factors, limitations, or what the base64 output represents. The parameter mismatch between description and schema creates additional confusion.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It documents 'prompt' and 'image_size' parameters, but the input schema actually has 'prompt', 'image_width', 'image_height', and 'seed' - with 'image_size' not matching the schema's separate width/height parameters. This creates confusion and doesn't adequately cover the 4 parameters, especially missing 'seed' entirely.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with 'Generate an image from a prompt' - a specific verb ('Generate') and resource ('image'). It distinguishes itself by focusing on image generation from text prompts. However, without sibling tools, it doesn't need to differentiate from alternatives, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any prerequisites, limitations, or typical use cases. The only contextual information is the parameter documentation, which doesn't constitute usage guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count2/5

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.

Completeness3/5

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

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    B
    quality
    Not graded
    maintenance
    An MCP server that enables generating and editing high-quality images with natural language using Black Forest Labs' FLUX.1 Kontext Pro model.
    2
    5

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/m-mcp/flux-schnell-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server