把视频链接转成 GIF 动图的 MCP 服务 (含 SSRF 防护, 供魔搭/DEAP/Claude 等 MCP 客户端调用)
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"video2gif-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# video2gif MCP 服务 把「视频链接 → GIF 动图」做成一个标准 MCP 服务,可被**魔搭、钉钉 DEAP、Claude Code / Desktop、Cursor** 等任意支持 MCP 的客户端调用。 - **工具**:`video_to_gif(video_url, size, ...)` —— 下载视频 → ffmpeg 两趟调色板转 GIF → 直接返回 GIF 图片 + 文本摘要。 - **传输**:`stdio`(魔搭托管 / uvx 默认),可选 `MCP_TRANSPORT=http` 起 Streamable HTTP(自托管)。 - **安全**:SSRF 防护(默认开,逐跳校验重定向)+ 可选鉴权 token(HTTP 自托管模式)。 - **资源上限**:输入视频 ≤50MB、fps≤30、宽度≤1280px、单次截取≤60s、输出 GIF≤20MB(防止 serverless 被打爆)。 ## 目录结构 ``` video2gif-mcp/ ├── pyproject.toml # 打包配置 + stdio 入口 + 依赖 ├── src/video2gif/ │ ├── __init__.py │ ├── __main__.py # python -m video2gif │ └── server.py # MCP 服务 (MCPServer + video_to_gif 工具) ├── test_client.py # 本地 stdio 测试客户端 ├── deap-config.json # DEAP 注册模板 (填入 URL 后可用) ├── Dockerfile # 备选: 自托管 HTTP └── LICENSE / README.md ``` ## 工具参数 | 参数 | 类型 | 默认 | 说明 | |------|------|------|------| | `video_url` | string | 必填 | 可公开下载的视频直链 (mp4/mov/avi/webm/mkv) | | `size` | string | `medium` | 体积预设:`small`(320px/8fps) / `medium`(480px/15fps) / `large`(720px/20fps) | | `fps` | int | 0 | 覆盖帧率(上限 30),0=用 size 预设 | | `width` | int | 0 | 覆盖宽度(上限 1280),0=用 size 预设 | | `start` | float | 0 | 从第几秒开始 | | `duration` | float | 0 | 截取时长(上限 60 秒),0=到结尾 | | `loop` | int | 0 | 循环次数,0=无限,负值=不循环 | ## 快速开始(本地) ```bash cd video2gif-mcp # 方式一:uvx(无需安装,stdio) uvx --from . video2gif-mcp # 方式二:pip 安装后运行 pip install . video2gif-mcp # 或 python -m video2gif # 本地验证工具调用(自动以 stdio 拉起服务,结果存到 output.gif) python test_client.py --url "https://www.w3schools.com/html/mov_bbb.mp4" --size small ``` ## 部署到魔搭 ModelScope(免费,供他人使用) 魔搭 MCP 广场的「可托管部署」要求 **PyPI 包 + `uvx` 拉起(stdio 传输)**,平台会帮你包成 HTTP 端点暴露出来。 1. **发布到 PyPI**: ```bash pip install uv uv build # 生成 dist/*.whl 和 *.tar.gz uv publish --token <你的PyPI token> ``` 2. **魔搭 MCP 广场创建**:打开 <https://modelscope.cn/mcp> →「创建 MCP」→ 选「**可托管部署 / Hosted**」,填入配置 JSON(不要带注释): ```json { "mcpServers": { "video2…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.