redfox-ai-gen-mcp
RedFoxHub AI 生成 MCP Server — 将 GPT-Image-2 图片、豆包 Seedream 图片(Pro/Lite)、豆包 Seedance 视频生成能力封装为 8 个 MCP 工具,适用于 dsh、Claude Code、Cursor 等任意 MCP 客户端。
工具(8)
| 工具 | 说明 |
|---|---|
gpt_image_generate |
GPT-Image-2 图片生成,支持文生图 / 参考图生图(resolution 1k/2k/4k、size 13 种宽高比、n 最多 4 张、reference_images 最多 2 张) |
gpt_image_result |
查询 GPT-Image-2 图片生成任务结果(超时返回 taskId 后补查) |
doubao_image_pro_generate |
豆包 Seedream 5.0 Pro 图片生成 |
doubao_image_pro_result |
查询 Seedream 5.0 Pro 任务结果 |
doubao_image_lite_generate |
豆包 Seedream 5.0 Lite 图片生成,支持组图 |
doubao_image_lite_result |
查询 Seedream 5.0 Lite 任务结果 |
doubao_video_generate |
豆包 Seedance 2.0 视频生成 |
doubao_video_result |
查询豆包视频生成任务结果 |
异步工具内部自动轮询:提交 → 等待 → 返回完整结果,无需手动处理 taskId。若等待超过 timeout_seconds(图片默认 240 秒、视频默认 480 秒),返回 taskId,可用对应的 result 工具补查。
GPT-Image-2 注意事项:任务状态实测为
queued/in_progress/completed/failed,仅后两者为终态(接口文档所写的processing实测不会返回);reference_images需为公网可访问的图片 URL。实测 1k 单张约 40~75 秒。
认证
- 前往 https://redfox.hk/settings/api-keys?source=mcp 获取 API Key
- 设置环境变量:
export REDFOX_API_KEY="YOUR_API_KEY"
未配置 key 时,每个工具都会返回结构化的获取引导。
安装与运行(本地 stdio)
需要 Python ≥ 3.10,推荐使用 uv:
uvx redfox-ai-gen-mcp
或:
pip install redfox-ai-gen-mcp
redfox-ai-gen-mcp
客户端配置
Claude Code:
claude mcp add redfox-ai-gen --env REDFOX_API_KEY=YOUR_API_KEY -- uvx redfox-ai-gen-mcp
Cursor / 其他 MCP 客户端:
{
"mcpServers": {
"redfox-ai-gen": {
"command": "uvx",
"args": ["redfox-ai-gen-mcp"],
"env": { "REDFOX_API_KEY": "YOUR_API_KEY" }
}
}
}
远程 HTTP 模式(多租户)
适用于 MCP 市场与托管场景,每个用户携带自己的 API Key:
redfox-ai-gen-mcp --transport http --host 0.0.0.0 --port 8000
# 或环境变量:REDFOX_MCP_TRANSPORT=http REDFOX_MCP_HOST=0.0.0.0 REDFOX_MCP_PORT=8000
- MCP 端点:
http://<host>:8000/mcp(Streamable HTTP);健康检查:GET /health - 每个请求通过请求头
REDFOX_API_KEY: <key>(或Authorization: Bearer <key>)携带自己的 key,按 key 建独立客户端缓存,额度互不共享
客户端配置(远程 URL + 请求头):
{
"mcpServers": {
"redfox-ai-gen": {
"url": "http://<host>:8000/mcp",
"headers": { "REDFOX_API_KEY": "ak_your_key" }
}
}
}
Docker 部署
本包目录自带 Dockerfile,可独立构建部署:
cd packages/redfox-ai-gen-mcp
docker build -t redfox-ai-gen-mcp .
docker run -d -p 8000:8000 redfox-ai-gen-mcp
镜像不内置任何 API Key,调用方通过请求头携带自己的 key。
底层实现
基于官方 SDK redfox-python-sdk。API 文档:https://redfox.hk/?source=mcp。
License
MIT
Metadata
Release files for redfox-ai-gen-mcp 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| redfox_ai_gen_mcp-0.2.2.tar.gz | 4.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| redfox_ai_gen_mcp-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.7 kB
Release files / redfox_ai_gen_mcp-0.2.2.tar.gz
| Download URL | redfox_ai_gen_mcp-0.2.2.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74f96ba37724df93f772d75841eb6349a98e375ba0bb9d7bae440cb5c55d1d2e
|
|
BLAKE2b-256 checksum How to use checksums |
dec1b68754bce0861d9ae01fbd0645943d3884c9812d2927713a3d89bf4eee81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / redfox_ai_gen_mcp-0.2.2-py3-none-any.whl
| Download URL | redfox_ai_gen_mcp-0.2.2-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
220fd600439275ecc23cadd27058b0634d10142578942e24d5948dd1b62780d6
|
|
BLAKE2b-256 checksum How to use checksums |
25528d385fceac4d50ac24f1156a6f464ace53c938e1fe3a18176085215b5768
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for redfox-ai-gen-mcp 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.