media-gen-mcp
This server combines free AI-powered media generation with deterministic local rendering tools for diagrams, charts, cards, and more — all through a unified MCP interface.
🤖 AI Generation (Online, Free)
Text-to-Image & Image-to-Image: Generate images from text prompts or transform existing images via Agnes AI or Zhipu providers.
Text-to-Video, Image-to-Video & Keyframe Animation: Create videos from text/images or animate between keyframes, with smart async polling.
Poll & Download Video Tasks: Check status and retrieve generated videos by task/video ID.
List Available Models: Inspect available models and video constraints per provider.
📐 Structured Local Rendering (Offline/Deterministic, No API Key Required)
Diagrams: Render flowcharts, sequence, class, ER, mindmaps, and architecture diagrams from D2 DSL or Graphviz DOT syntax to SVG/PNG — fully offline.
Data Charts: Bar, line, pie, area, and scatter charts from Vega-Lite JSON specs to SVG/PNG — fully offline.
Math Formulas: Render LaTeX expressions to vector SVG via MathJax with embedded glyph paths — fully offline.
Share/OG Cards: 5 templates (og, quote, minimal, hero, panel) with gradient backgrounds, glow/gradient title effects, emoji, CJK font support, and embedded logos.
Vector Icons: Fetch and render 200,000+ Iconify icons (e.g.
mdi:home,logos:github) to SVG/PNG.QR Codes: Generate QR codes from any text or URL with customizable error correction, colors, and margins — fully offline.
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., "@media-gen-mcpgenerate a photo of a golden retriever playing in the snow"
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.
Claude Code 的「图像全家桶」—— 造图、画想法、看懂图,一句话搞定,全免费。
给 Claude Code 装一次,以后所有图像活儿都是一句话。 设计师出图、程序员画架构图、运营做分享卡、财务抠发票表格 —— 生图 / 视频 + 识别 + 画图 / 卡片 / 二维码全覆盖,全免费(免费服务方 + 本地引擎,装上即用)。
每周做几次图、装 N 个工具记 N 套参数很烦?这里只装一次,所有图像场景都丢给 Claude。
简体中文 | English
目录
Related MCP server: Gemini Nano Banana MCP
你说一句话,得到什么
你说 …… | 你得到 |
"画只赛博朋克猫,霓虹辉光" | AI 写实图,落盘到 |
"生成 5 秒海边日落视频" | AI 视频 MP4(后台生成,完成通知你) |
"画个架构图:客户端 → API 网关 → 订单服务 + 支付服务" | 矢量架构图 |
"把这组销售数据画成柱状图" | 高清数据图表 |
"做个指向 github.com 的二维码" | 矢量二维码 |
"把 E=mc² 渲染成高清公式" | 矢量公式 |
"做张深色渐变分享卡,标题 七月新品 🚀" | 排版好的分享卡(中文 + emoji 自动) |
"识别这张发票截图里的表格" | 可粘贴的 HTML/Markdown 表格 |
"把这张柱状图读成数据点" | 结构化 JSON 数据 |
"描述一下这张图里有什么" | 自然语言回答 |
"把这份 20 页 PDF 报告的文字全抠出来" | 整篇文本 / Markdown / JSON(数字版秒出,扫描件自动逐页 OCR) |
"把这份合同扫描件提文字,水印和红章忽略掉" | 干净文本(自动剔除水印 / 红章 / 页眉页脚区域) |
"这份双栏论文按阅读顺序合并成一段" | 单栏连续文本(多栏阅读序自动还原,不再串行错位) |
"我现在能识别表格吗?中文 OCR 配好了吗?" | 当前能力清单 + 路由建议(哪个能用 / 哪个没配 / 该用什么) |
不用学工具名,不用装系统依赖,Claude 自动挑最合适的方式完成。
60 秒上手
核心思路:画图 / 卡片 / 二维码 / 公式是本地引擎,识图(OCR 文字识别)也默认进程内兜底——默认路径不调 AI、不连网,装上即用(例外:卡片非默认字体 / 彩色 emoji、架构图 icon: 图标首次会从 CDN 取资源;离线自动降级 —— emoji 变纯文本、图标省略、字体可经 fontPath 本地化)。只有 AI 写实图 / 视频才需要免费 API Key —— 把"第一张图"和"第一次读图"都提前到注册之前。
30 秒|一行接入(零 Key)
# 一行装上(不带 Key,30 秒)
claude mcp add media-gen-mcp npx media-gen-mcp-server
# 重启 Claude Code → 输入 /mcp → 看到 media-gen-mcp ✓ Connected 即成功30 秒|免 Key 立刻出第一张图
直接对 Claude 说一句:
做张深色科技风的分享卡,标题:Claude Code 图像全家桶→ 矢量图自动落盘到 output/,打开就能用。你还没注册任何 API Key,已经拿到结果。
下面这些也都是零 Key 零联网即时出:
「做个指向 github.com 的二维码」
「把 E=mc² 渲染成高清公式」
「画个架构图:客户端 → 网关 → 订单服务 + 支付服务 → 数据库,深色科技风」
「识别这张验证码图片里的数字」(OCR,默认进程内,不装任何东西)
「把这张截图里的英文文字提取出来」
想要中文 SOTA 识图 / 看图问答?配一行智谱 GLM Key(零部署,可选)
默认轻量引擎对英文 / 数字够用,中文准确率一般。不想自建 PaddleX / vLLM,又想要中文 SOTA + 复杂表格 + 看图问答? 配一行智谱 GLM Key 即可 —— 云端 GLM-4.6V-Flash 永久免费,零部署、零本地资源:
# ① 到 https://open.bigmodel.cn/console/apikey 注册免费账号 + 申请 api_key(格式 {id}.{secret})
# 注意:只接受 open.bigmodel.cn 标准 key;Code Plan key(ZAI_API_KEY)不可用 —— 它绑定 Z.ai 端点 + 白名单工具,违规调用会封号
# ② 写到 ~/.media-gen-mcp/config.json
{
"providers": {
"glm-vision": { "apiKey": "你的{id}.{secret}" }
}
}
# ③ 回 Claude Code 说:"识别这张中文发票截图里的表格" / "这张图里有几个人?在做什么?"
# → 中文 SOTA 识别 + 看图问答,落盘 / 直接回答配好后 MCP 自动纳入 fallback 链:paddle → glm-vision → vlm → tesseract;哪一档临时挂掉自动降级,你无感。详见配置详解 · 档位 2。
想要 AI 写实图 / 视频?再加免费 API Key(可选)
# ① 拿免费 API Key(推荐 Agnes,默认服务方)
# https://platform.agnes-ai.com/ → 注册 → API Keys → 复制 sk-xxx
# (智谱 cogview-3-flash / cogvideox-flash 也永久免费,可二选一或都配)
# ② 写到 ~/.media-gen-mcp/config.json(只配一家也行)
{
"providers": {
"agnes": { "apiKey": "sk-你的agnes-key" }
}
}
# ③ 回 Claude Code 说:"画只赛博朋克橙猫,写实风"
# → AI 写实图落盘。视频同理:"生成 5 秒海边日落视频"不想用 npx?全局装也行:先
npm i -g media-gen-mcp-server,再claude mcp add media-gen-mcp -s user "$(which media-gen-mcp-server)"。
能力全家桶
直接对 Claude 说你想干嘛,它自动挑最合适的方式完成。下面按「你想做的事」分组 —— 你不用知道背后叫什么。
造一张图(从无到有)
画一张写实照片或插画
你:"画只赛博朋克橙猫,霓虹辉光,写实风" 得到:写实图落盘到
output/(也支持插画 / 产品概念图 / Logo 草稿 / 科幻场景)
把一句话或一张图变成短视频
你:"生成 5 秒海边日落视频" 得到:MP4 视频(3–18 秒;长视频后台生成,完成后通知你取片)
抓一个图标或品牌 Logo
你:"抓一个 GitHub 的 Logo,128 像素" 得到:20 万+ 图标库里的矢量 Logo,即下即用(GitHub / Twitter / Material / Lucide / Font Awesome 等)
逆向 AI 生成图的提示词与参数
你:"这张图是用什么 prompt、什么参数生成的?能复现吗?" 得到:结构化参数 —— 正向 / 负向 prompt、模型、采样步数、CFG、种子、尺寸(从 PNG 嵌入的 ComfyUI / A1111 元数据本地解析;Agnes 生成的图自带完整生成参数,拿到 prompt 可用 generate_image 一键复现)
Google Flow 渠道(Veo 3.1 / Nano Banana,免 API Key)
是什么:接入你已登录 Google Flow 的本机 Chrome,把 Flow 的生成能力变成工具 —— 免 API Key,生图 0 积分,视频按积分计费(7-100/条,提交前必经计费确认门:第一次调用只返回积分预估+确认令牌,你确认后才真提交)。
前置(只需一次;跨机器通用,lasso 非必需):一台开了调试端口的 Chrome 并登录 labs.google/fx —— lasso launch-chrome --port 9223 --idle-ms 0(推荐,静默),或裸 Chrome --remote-debugging-port=9223 --user-data-dir=~/.media-gen-mcp/chrome-profile 后在窗口登录;MCP 自动经 CDP 直连,不依赖 lasso 进程。
一句话能干什么:
你说 …… | 得到 |
"用 Flow 画一张 ……"(或配置链让生图自动走 Flow) | 0 积分 AI 图(Nano Banana 2/Pro/Lite,含 2K 放大) |
"用 Flow 把这张图动起来 / 生成 8 秒视频" | Veo 3.1 / Omni Flash 视频(文生/图生/参考图一致性/首尾帧/延长/编辑/1080p 超分,超分 0 积分) |
"Flow 还剩多少积分?/ 把这条视频下载下来 / 删掉这批废图 / 生成分享链接" |
|
视频积分明细与各会员档价目随
flow_status实时可查;渠道优先级配置(让"生图"自动走 Flow)见配置详解。
看懂一张图 / 一份 PDF(把图和文档变数据)
从截图里抠出文字
你:"把这张验证码里的数字读出来" 得到:纯文本(验证码 / 发票号 / 扫描文档 / 聊天记录都能抠)
把表格图变成 HTML / Markdown
你:"识别这张发票截图里的表格" 得到:可直接粘贴的 Markdown 表格(发票 / 报表 / 扫描件不用再手动重打)
从图表反推原始数据点
你:"把这张柱状图读成数据" 得到:JSON 结构化数据(柱状 / 折线 / 饼图都行;glm-vision/vlm 走 prompt 抽取,paddle 的 chart 字段是占位、真实数据在 markdown 描述里)
让它用大白话讲讲这张图
你:"这张图里一共有几个人?在做什么?" 得到:自然语言回答(看图问答 / 手写 / 公式 / 复杂场景理解)
把整份 PDF 的文字抠出来
你:"把这份 20 页 PDF 报告的文字全抠出来,导出 Markdown" 得到:整篇文本 / Markdown / JSON —— 数字版 PDF 直接抽文字层秒出,扫描件自动逐页渲染 + OCR;支持指定页码范围(
3/1-10/odd/last)、忽略水印 / 页眉页脚区域、多页合并或分页输出;长文档后台跑,完成通知你取结果(发票 / 合同 / 财报 / 论文 / 扫描书都行)
让识图 / 读 PDF 结果更干净、更顺读
你:「把这份合同扫描件提文字,水印和红章忽略掉」「这份双栏论文按阅读顺序合并成一段」 得到:干净、连续的文本 —— 两个开关在识图 / PDF 提取里可用(tesseract 完整支持;glm-vision/vlm 不返回 blocks,两开关会被跳过并提示;paddle 的块无坐标,忽略区域仅告警级):
忽略区域:圈出水印 / 红章 / 页眉页脚 / 表头区域,识别结果自动剔除,合同 / 证书 / 扫描件不再被水印糊住
多栏阅读序:论文 / 报刊 / 简历 / 双栏 / 三栏排版,自动按人类阅读顺序合并成单栏连续文本,不再串行错位
先问一句"我装的识别服务都能干啥"
你:"我现在能识别表格吗?中文 OCR 配好了吗?手写识别能用吗?" 得到:当前能力清单 —— 四档识别服务哪个已配置 / 哪个没配 / 哪个正在冷却或出错,以及"要做表格识别该走哪个、手写识别该走哪个"的路由建议;先问一句再动手,避免直接调用才发现报错
把想法画清楚(免 Key,装上就能用)
画结构图
你:"画个架构图:客户端 → API 网关 → 订单服务 + 支付服务 → 数据库" 得到:矢量架构图(也支持流程图 / 时序图 / 类图 / ER 图 / 思维导图)
画交互式 / 动态 HTML 图(浏览器打开可交互,边数据流 + 节点动画,主题跟随系统深/浅色)
你:"画个架构图,浏览器打开能交互、能动、主题跟着系统走" 得到:单文件 HTML(D2 双调色板默认开箱即反色 + viewer 平移/缩放/主题切换/导出 SVG + 边数据流/依次高亮/节点入场三种动画,Motion Governor 自动守无障碍)
画可下钻的嵌套架构图(浏览器打开点层进入子架构,面包屑回溯任意层)
你:"把这套系统画成嵌套架构图:顶层 5 大模块,点'订单服务'进它的内部架构,再点进创建订单的时序图" 得到:单文件 HTML(点某层 → 切到那层内部架构,层级可任意嵌套,每层可以是架构图 / 时序图 / 类图 / ER 图 / 流程图;面包屑或 Esc 回任意祖先层;URL 深链分享到某一层;主题跟随系统深/浅色)
把数据画成图表
你:"把这组销售数据画成柱状图" 得到:高清数据图表(柱状 / 折线 / 饼图 / 面积 / 散点,丢一串数字或一份 CSV 都行)
做卡片 / 海报 / 二维码(发出去好看)
做分享卡 / OG 图 / 引言卡 / 封面 / 海报
你:"做张深色渐变分享卡,标题 七月新品 🚀" 得到:排版精美的卡片(标题、副标题、渐变色、辉光、彩色 emoji、Logo 内嵌全自动,中文与日文汉字不乱码)
生成二维码
你:"做个指向 github.com 的二维码" 得到:矢量二维码(URL / 文本都行,海报印刷也清晰)
把数学公式渲染成高清图
你:"把 E=mc² 渲染成高清公式" 得到:矢量公式(LaTeX、复杂分式、化学方程式都支持)
做酷炫动效 / 科技感图形(同输入永远同输出)
把 SVG 渲染成高清 PNG
你:"画一个带辉光、星场、景深的科技感背景" 得到:酷炫 PNG,自动选最佳渲染方式保真不失真
把 HTML / CSS 动画变成视频
你:"做一个 3 秒的产品片头动画,渐变色 + 粒子" 得到:MP4 / GIF / WebM 视频(产品片头 / 品牌动画 / 动效演示,逐帧渲染,同输入永远同输出)
渲染浏览器依赖:动效视频与滤镜 SVG 的 100% 保真渲染推荐 lasso 渲染档(确定性旗标内置、空闲 10 分钟自动回收、与本工具的日常 Chrome 完全隔离)——
npm i -g lasso-mcp后跑一次npx -y lasso-mcp render-chrome --ensure即装;MEDIA_GEN_RENDER_MODE=attach钉死该档(CI/验收)。未装 lasso 时滤镜 SVG 自动降级 resvg(~92% 保真),动效视频返回带修复指引的结构化错误(legacy 自管池已退役,2026-09-03)。
小提示:造图 / 读图走联网 AI;画图 / 卡片 / 二维码 / 动画是本地引擎 —— 装上就能用、矢量高清、同样的输入永远出同样的图。
配置详解
一句话:结构化能力(画图 / 图表 / 卡片 / 二维码 / 公式)零配置开箱即用;AI 生成配一行 API Key;识图默认零配置,要中文 SOTA / 表格 / 图表才自托管。 你想用的能力决定要配什么 —— 不用全配。
按「我想干什么」查配置
你想干什么 | 要配什么 | 配了立刻能用 |
画架构图 / 数据图表 / 卡片 / 二维码 / 公式 | 什么都不用配 | 本地引擎,装完即用 |
酷炫动效视频 / 滤镜 SVG 100% 保真( | 推荐装 lasso 渲染档: | 装上即用;未装 lasso 时滤镜 SVG 自动降级 resvg(~92% 保真),动效视频返回带修复指引的结构化错误(legacy 自管池已退役) |
AI 写实图 / AI 视频(文生图、文生视频) | 配一家免费 API Key(Agnes 或智谱,二选一) | 联网生成,落盘到 |
用 Google Flow 生图(0 积分)/ 管理生成资产 | 不用配 Key:本机 Chrome 登录 Flow 即可( | 生图 / 放大 / 上传 / 删除 / 分享 / 取消 / 查询全 0 积分;视频按积分计费(7–100 积分/条) |
OCR 文字识别(英文 / 验证码 / 数字 / 简单文档) | 什么都不用配 | 默认走进程内轻量引擎,装完即用 |
中文 OCR / 发票表格 / 图表读数 / 看图问答 / 手写 / 公式 | 配一行智谱 GLM Key(零部署,云端永久免费)或 自托管 PaddleX / vLLM | 配 GLM Key 即开即用;自托管服务跑起来后填一行 baseUrl |
PDF 文字提取(数字版 / 扫描件 / 多页) | 装两个依赖 | 数字版 PDF 秒出;扫描件按上面 OCR 档位走(默认零配置也能跑) |
去水印 / 红章 / 页眉页脚、多栏阅读序还原 | 什么都不用配 | 调识图 / PDF 工具时直接说"Claude,忽略水印"或"按阅读顺序合并",自动应用 |
查当前识别能力(哪个能用 / 哪个没配) | 什么都不用配 | 直接问,Claude 回一份当前能力清单 + 路由建议 |
一、生成类配置(AI 生图 / 视频)
配一家免费 Key 就够(推荐 Agnes,默认服务方;智谱备选,中文场景原生优化):
{
"providers": {
"agnes": { "apiKey": "sk-你的agnes-key" },
"zhipu": { "apiKey": "你的智谱-key" }
}
}Agnes(推荐):https://platform.agnes-ai.com/ → 注册 → API Keys →
sk-xxx智谱:open.bigmodel.cn → API Keys(免费模型
cogview-3-flash/cogvideox-flash永久免费)配两家更稳:任一家限流/波动,另一家自动顶上,零感知零重复扣费
配置文件:
~/.media-gen-mcp/config.json(Windows:%USERPROFILE%\.media-gen-mcp\config.json);没有也不崩 —— 结构化能力与默认 OCR 照常工作
渠道优先级链(可选)——一行让"生图"自动走 Flow 免费档:
{
"imageProviderPriority": ["flow", "agnes", "zhipu"],
"videoProviderPriority": ["agnes", "zhipu"]
}链即开关:渠道列进链 = 启用(链头即默认),不列 = 不启用;链头失败自动按序回落(60 秒熔断,不反复重试);显式
provider="flow"点名永远合法且失败直抛(环境不可用返回带启动指引的[flow] S1xx,绝不静默换渠道)视频默认不走 Flow(消耗积分,刻意不进默认链):要么写进
videoProviderPriority自担积分,要么每次显式provider="flow"计费确认门(两段式,默认开):Flow 视频第一次调用不提交,只返回
{needConfirm, estimatedCost, confirmToken};原参数 + confirmToken 再调才真提交。令牌 10 分钟有效、与全部计费参数绑定(改任一项失效);当前会员档不可用的 key 不发令牌直接拒绝并附各档价目;0 积分操作与非 Flow 渠道不触发。关闭:"flow": { "videoConfirm": false }
Flow 资产管理(全 0 积分):flow_status 支持查积分/查状态/下载,以及分享(shareMediaIds)/取消(cancelMediaIds)/批量删除(deleteMediaIds)。配套 "flow": { "toolDeadlineMs": 110000 } 为 Flow 长操作设工具级截止(防卡死,超时转 [flow] S410,底层不取消,稍后经 flow_status 复查)。
二、识别类配置(识图 / OCR / 表格 / 图表 / 视觉理解)
识别能力分 4 档,按需选装,默认档位 1 零配置即用:
档位 | 能干什么 | 要配什么 | 费用 |
1 默认(进程内) | 英文/数字/验证码/简单文档 OCR | 零配置 | 免费 |
2 智谱 GLM-4.6V-Flash | 中文 SOTA + 复杂表格 + 图表读数 + 看图问答(全 4 task) | 一行 Key(推荐,零部署) | 永久免费 |
3 PaddleX | 中文 SOTA + 发票表格 + 版面分析 | 自托管(GPU 12GB 或 CPU 8GB 起) | 免费开源 |
4 vLLM Qwen2.5-VL | 看图问答/手写/公式/复杂场景 | 自托管(GPU 16-24GB) | 免费开源 |
大多数用户:档位 1 + 配一行档位 2 的 GLM Key 就齐了;档位 3/4 给有 GPU、想全离线的用户(部署细节/CUDA 要求/Unlimited-OCR 长文档进阶见 doc/自托管部署指南)。
档位 2 配置(最常用):
{
"providers": {
"glm-vision": { "apiKey": "你的{id}.{secret}" }
}
}Key 申请:open.bigmodel.cn(免费注册,格式
{id}.{secret})⚠️ 只接受标准 api_key;Code Plan key(ZAI_API_KEY)不可用(绑定 Z.ai 端点+白名单工具,违规调用会封号);多 key 轮换技术上支持但智谱协议禁止多账号,请自担合规风险
默认模型
glm-4.6v-flash(可经providers["glm-vision"].model换glm-4v-flash或付费视觉模型)
档位 3/4 自托管(服务跑起来后各填一行 baseUrl,细节见部署指南):
{
"providers": {
"paddle": { "baseUrl": "http://127.0.0.1:8080" },
"vlm": { "baseUrl": "http://127.0.0.1:8000" }
}
}三、自动兜底机制(配了就不用管)
生成侧:Agnes ↔ 智谱,任一家失败自动切另一家(60 秒内连续失败触发软切换,你不用重启、不用改配置)
识别侧:默认轻量引擎(进程内兜底)→ 按能力自动降级(fallback 按 tier 序:paddle(10)→ glm-vision(9)→ vlm(8);tesseract 是默认头兼最后兜底)
唯一例外:视频轮询取片时不切换(避免拿到错的结果)
你要做的:配两家生成 API Key + 可选装一档识别服务,剩下的交给 Claude
你机器跑不动 PaddleX 或 vLLM?继续用默认轻量引擎即可,MCP 不会因为没装本地服务而报错 —— 只是中文 SOTA / 表格 / 看图问答 这几项能力不可用,其它全照常。
常见问题
Q:不装任何东西能用吗? A:能。装上 MCP 就有画图 / 卡片 / 二维码 / 公式 / 数据图表 + 英文 / 验证码 OCR,全部本地跑,零联网。
Q:识别中文乱码吗? A:默认轻量引擎对英文 / 数字 / 简单文档够用,中文准确率一般。要中文 SOTA 自托管 PaddleX(GPU 12GB 或 CPU 4 核 8GB),详见上方配置详解。
Q:AI 视频要等多久? A:5 秒视频约 1–3 分钟,18 秒视频可能 5–10 分钟。后台异步生成,完成后自动通知你取片;预估 ≤60 秒的会同步等。
Q:我的 RTX 3060 能跑表格识别吗? A:能。PaddleX GPU 模式最低 12GB VRAM(RTX 3060 12GB 正好),CPU 模式 4 核 + 8GB 内存也能跑(慢 3–5 倍)。详见配置详解。
Q:中文 / emoji / 渐变能正常出吗? A:能。分享卡通过内置中文字体 + 排版引擎全自动支持中文、日文汉字、彩色 emoji、渐变标题、辉光效果,无需额外字体配置。
Q:支持 Mermaid 吗? A:不支持(需要浏览器)。用 D2 或 Graphviz 代替,能力等价且更稳,矢量输出。
Q:踩限流(429)? A:免费层有每分钟请求数限制。配两家服务方(Agnes + 智谱)后自动切换,基本无感。
Q:视频帧数限制? A:随分辨率递减 —— 1080p ≤ 241 帧(约 10 秒),720p 可达 441 帧(约 18 秒)。可问 Claude 查实时约束。
Q:npx 连不上 / 启动慢?
A:全局装也行:先 npm i -g media-gen-mcp-server,再 claude mcp add media-gen-mcp -s user "$(which media-gen-mcp-server)"。
Q:能用敏感词 / 武器 / 战争题材吗? A:真实武器词会触发内容过滤。改用科幻设定词(如"未来战甲"、"机甲")可绕过,效果等同。
Q:Claude 会不会选错工具?(比如「做张分享卡」时去调生图) A:这类模糊请求的路由已经做过校准 —— 「做卡片 / 海报 / OG 图」「把图表里的数据读出来」「做产品片头动画」「画架构图 / 流程图」「把这组数据画成柱状图」等会自动落到合适的专用工具,无需手动纠正。当然你也可以在请求里直接点名某个工具。
这是给谁的
Claude Code 重度用户 —— 每周都要做几次图像任务,不想为每件事装一个 MCP、记一套参数。
写技术文档 / 博客的开发者 —— 反复需要架构图、时序图、ER 图、数据图、公式,不想离开工作流。
个人开发者 / 独立产品 —— 关注成本(全免费)与可控(同输入同输出),不想为图像任务单独搭后端。
数据 / 财务 / 法务 —— 双向场景:把数据画成图表,从截图 / 发票 / PDF 报告 / 合同里反向抽数据点(水印 / 红章可忽略,双栏论文按阅读序合并)。
教育 / 学术 —— 学生从课件截图 / 扫描讲义 / 论文 PDF 提文字、把双栏论文合并成连续文本、问图表里读出的数据;老师把纸质试卷扫描件变成可编辑文本。
运营 / 内容创作者 / 公众号作者 —— 分享卡 / OG 图 / 海报 / 二维码,中文 + 彩色 emoji + 渐变开箱即用。
不太适合:不用 Claude Code 的用户;只要单一能力且已搭好流水线的工程化团队;需要付费商用模型 / 训练微调 / 实时视频 OCR 的场景(这些超出免费 MCP 范围)。
💝 支持作者
如果 media-gen-mcp 帮到你,欢迎请作者喝杯咖啡 ☕
微信 | 支付宝 |
或 ⭐ Star 这个仓库、提 Issue / 发 PR —— 都是对作者的鼓励与支持。
License
MIT —— 主体代码随便用。
识别侧依赖全栈 Apache 2.0(tesseract.js + PaddleOCR + Qwen2.5-VL),企业商用无 license 风险。
技术细节:服务方与引擎都可插拔,结构化工具同输入同输出可入 git,失败自动切换服务方。完整文档见
doc/目录。
Available Tools
11 toolscreate_videoA
Create an AI video — text-to-video, image-to-video, or keyframe animation (文生视频/图生视频/关键帧动画/让这张图动起来/做个动画) — via free models (Agnes AI default, or Zhipu). Use this for any '生成视频/做动画' request; no local video tools needed. Smart async: long videos return a handle to poll with get_video; short ones block until done. Multilingual triggers: 動画 · vídeo · vidéo · Video · видео · vídeo (ja/es/fr/de/ru/pt).
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| seed | No | ||
| wait | No | 省略=智能(预估≤60s 同步、>60s 异步返回 handle);true=阻塞等待(发 progress);false=立即返回 handle。 | |
| image | No | image-to-video: single image URL. | |
| model | No | Optional; omit to use the provider default video model. | |
| ratio | No | 16:9 / 9:16 / 1:1 / 4:3 / 3:4 (preferred over raw size). | |
| outDir | No | 产物落盘目录,省略用默认(会话目录/output)。 | |
| prompt | Yes | Video content description. | |
| download | No | ||
| provider | No | agnes | |
| frameRate | No | ||
| keyframes | No | keyframes: image URL array. | |
| numFrames | No | Provider-specific allowed values (Agnes: 8n+1, ≤441). | |
| timeoutMs | No | ||
| resolution | No | Provider may snap to nearest preset (Agnes size_mapping). | 720p |
| negativePrompt | No | ||
| pollIntervalMs | No | ||
| durationSeconds | No | If set, auto-pick the nearest valid numFrames (~3/5/10/18s). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries the burden. It discloses smart async behavior (long videos return handle, short block) and mentions free models. It does not cover rate limits or auth needs, but provides useful behavioral context beyond the schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single paragraph, dense with information including multilingual triggers. It is efficient but could be better structured with bullet points for clarity. No waste, but front-loading could be improved.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists. The description mentions a handle for long videos but does not describe the return structure for short videos or error handling. Given the complexity (18 params, no output schema), the description is incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 56%, so baseline is 3. The description adds context for `mode` and `wait` parameters but does not explain all 18 parameters. It adds value for key ones but is not comprehensive.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool creates AI videos in three modes (text-to-video, image-to-video, keyframe animation) and distinguishes it from siblings like `get_video` and `generate_image`. The verb 'Create' and resource 'AI video' are specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description says 'Use this for any 生成视频/做动画 request; no local video tools needed.' It implies use instead of local tools and contrasts with `get_video` for polling. It does not explicitly state when not to use, but the context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_cardA
Generate a share card / OG image / quote card / poster / cover image (分享卡/分享图/封面图/海报/引言卡/金句卡/OG图; default 1200x630 PNG). The rendering engine is BUILT IN and runs entirely in-process — do NOT write HTML+CSS and screenshot it with headless Chrome/Puppeteer/Playwright, do NOT use Pillow/PIL/Python, and do NOT hand-code SVG; just call this tool with title/subtitle/body and it renders deterministically. Prefer this for ANY text/card/OG/poster/cover-image request. (For illustrated or photographic subjects, use generate_image instead.) Supports 5 templates (og/quote/minimal/hero/panel), gradient title + glow effects, embedded logo/avatar, Chinese + Japanese kanji auto, color emoji auto. LIMITS: Japanese kana and Korean need fontPath; titleGradient + glow don't combine; no JS execution / no animation (those would need a browser). Multilingual triggers: カード · tarjeta · carte · Karte · карточка · cartão (ja/es/fr/de/ru/pt).
| Name | Required | Description | Default |
|---|---|---|---|
| bg | No | Background: a solid color (default #0f172a) OR a CSS gradient string, e.g. linear-gradient(135deg, #4f46e5, #06b6d4) / radial-gradient(circle at 30% 30%, #f59e0b, #ef4444) | |
| blob | No | hero template only: blurred accent blob behind the title for depth (default true) | |
| body | No | Body / description text | |
| glow | No | Title glow (text-shadow). Pass 'true' to auto-derive from accent color, or a full text-shadow CSS value like '0 0 40px rgba(245,158,11,.6)'. Pass 'false' to disable. Does NOT combine with titleGradient (shadow is clipped when text is gradient-filled). | |
| logo | No | Embedded image (brand logo / avatar): a URL, data URI, or local file path (.png/.jpg/.webp/.svg). Placed at the top of the card content. | |
| name | No | Output filename (without extension) | |
| color | No | Title text color (default #f8fafc). Note: only the title uses this; subtitle uses accent, body/footer use a muted gray. | |
| title | Yes | Main title (required) | |
| width | No | Pixel width (default 1200, OG standard) | |
| accent | No | Accent color (default #6366f1) | |
| footer | No | Footer (author / date / domain) | |
| format | No | png | |
| height | No | Pixel height (default 630, OG standard) | |
| outDir | No | Output directory, default session-dir/output | |
| fontPath | No | Local base-font file path (.ttf/.otf/.woff) to override the default Inter; optional (CJK auto-supported via built-in Noto Sans SC) | |
| logoSize | No | Logo pixel size (square edge), default 88 | |
| subtitle | No | Subtitle / kicker (accent color) | |
| template | No | Layout template. Fields shown: og/panel = title+subtitle+body+footer; quote = title(as quote)+body+footer; minimal = title+subtitle; hero = title+subtitle+footer. (og=left hierarchy, quote=centered quote, minimal=bare, hero=big showcase, panel=glass panel) | og |
| logoRound | No | Logo circular (for avatars); default false = rounded square | |
| fontFamily | No | Font family from @fontsource (default Inter, Latin only) | |
| quoteStyle | No | quote template only: 'top' = big quote mark above the text (default); 'flank' = large quote marks flank the text left/right on the same line, wrapping it | top |
| titleGradient | No | CSS gradient applied to the title text via background-clip:text, e.g. linear-gradient(90deg,#f59e0b,#ef4444). Note: does not combine with glow (Satori drops the shadow when text is clipped to a gradient — use one or the other). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, but description fully discloses behavior: built-in rendering engine, in-process, deterministic, no browser/PIL/SVG. Mentions features like gradient, glow, emoji auto, but does not explicitly state the return value format (though schema implies file output).
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is comprehensive yet well-structured. Front-loaded main purpose, followed by 'do not' warnings, alternatives, template details, features, limits, and multilingual triggers. Slightly long but every sentence is informative.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 22 parameters and no output schema, description covers templates, feature interactions, and limitations thoroughly. It doesn't explain return values but the output (file) is inferred from outDir and format parameters. Adequate for the complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 95% (high), baseline 3, but description adds significant meaning: explains templates and field mappings, gradient/glow interactions, logo accepts URL/data URI/local path, format enum values, etc. This adds value beyond schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it generates share cards, OG images, quote cards, posters, cover images (1200x630 PNG). It distinguishes itself from sibling tool 'generate_image' by explicitly noting 'For illustrated or photographic subjects, use generate_image instead.'
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit guidance: 'Prefer this for ANY text/card/OG/poster/cover-image request' and 'do NOT write HTML+CSS and screenshot it... do NOT use Pillow/PIL/Python.' Also lists conditions like when to use generate_image and limits (e.g., Japanese kana/Korean need fontPath).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_chartA
Generate bar / line / pie / area / scatter charts and data visualizations (柱状图/折线图/饼图/散点图/数据可视化) from your data — Claude converts your numbers/CSV/data into a Vega-Lite spec internally; you just pass the data and chart type. Vega-Lite + vega are BUILT IN (bundled) — no matplotlib, no Python, no graphviz, no system install needed; prefer this over writing Python/matplotlib. Renders to vector SVG. No AI. NOTE: Vega image marks with external URLs are NOT embedded; use data URIs for self-contained output. Multilingual triggers: グラフ · gráfico · graphique · Diagramm · график · gráfico (ja/es/fr/de/ru/pt).
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Output filename (without extension) | |
| spec | Yes | Vega-Lite v5 spec (JSON object). Docs: https://vega.github.io/vega-lite/docs/. Skeleton: { data: {...}, mark: '...', encoding: {...} }. MARK TYPES: 'bar'(bar chart), 'line'(line), 'area', 'circle'/'point'(scatter), 'arc'(pie/donut, needs theta channel), 'tick', 'text'. DATA: { values: [{a:'A',b:28},{a:'B',b:55}] }. ENCODING channels: x, y, color, size, shape, opacity, text, theta. Field types: 'quantitative'(numbers), 'nominal'(categories), 'temporal'(dates), 'ordinal'(ordered). PIE/DONUT: mark='arc' + encoding.theta (NOT 'angle' — v5 changed). Donut: add mark.innerRadius. AGGREGATION: { aggregate:'sum', field:'v', type:'quantitative' }. EXAMPLE bar: { data:{values:[{cat:'A',v:28}]}, mark:'bar', encoding:{x:{field:'cat',type:'nominal'},y:{field:'v',type:'quantitative'}} } MISTAKES: (1) pie uses 'theta' not 'angle'; mark is 'arc' not 'pie'. (2) Always set type on x/y. (3) mark object needs type key. NOTE: image marks with external URLs NOT embedded; use data URIs. | |
| format | No | svg | |
| outDir | No | Output directory, default session-dir/output |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully bears the burden of behavioral disclosure. It details internal use of Vega-Lite, rendering to SVG, no AI, no system installation, and warns about image marks with external URLs not being embedded—highly transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is comprehensive yet efficient, front-loading the purpose and key guidance. Could be slightly more structured (e.g., bullet points), but every sentence adds value and there is no fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of chart generation (nested spec JSON, multiple mark types, encoding) and no output schema, the description is remarkably complete: covers mark types, encoding channels, aggregation, pie/donut specifics, common mistakes, and multilingual triggers. Sibling context is clear.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 75%, and tool description adds substantial value beyond the schema: includes Vega-Lite links, mark types, encoding channels, pie/bar examples, common mistakes, and format defaults. Only minor redundancy with schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly defines the tool as generating bar/line/pie/area/scatter charts and data visualizations using Vega-Lite. It distinguishes from sibling tools like generate_diagram, generate_image, and render_svg by focusing on data-driven charts with specific mark types.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly advises preferring this tool over writing Python/matplotlib, provides multilingual triggers, and notes that no external libraries are needed. Lacks explicit when-not-to-use compared to generate_diagram or other siblings, but overall context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_diagramA
Generate architecture / flowchart / sequence / class / ER / mindmap diagrams (架构图/流程图/时序图/类图/ER图/思维导图/示意图), rendered locally to vector SVG. The D2 and Graphviz engines are BUILT IN (WASM, bundled with this tool) — you do NOT need d2/dot/graphviz installed, do NOT run which d2/which dot, and do NOT shell out to them or write DOT files by hand; just call this tool and provide the D2 or DOT DSL. Prefer this for structured technical diagrams (architecture, flowchart, sequence, ER, class). LIMITS: D2 produces clean auto-laid-out diagrams with shapes/connections/basic style (fill/stroke/shadow/border-radius/gradients) — it does NOT support SVG filters (feGaussianBlur glow/blur), ambient lighting, vignette, pattern grids, or artistic depth effects. For highly stylized '酷炫/霓虹/科技感' graphics requiring glow/blur/depth beyond what D2 offers, hand-writing SVG is appropriate. mermaid is not supported in-process (needs a browser); use d2 or graphviz instead. Multilingual triggers: 図 · diagrama · diagramme · Diagramm · диаграмма · diagrama (ja/es/fr/de/ru/pt).
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | D2 or DOT source code. D2 SYNTAX (full docs: https://d2lang.com): RULE 1: in { } blocks, each property on its OWN LINE (newline-separated). WRONG: `x: { fill: red; shape: oval }`. RIGHT: x: { shape: oval style.fill: red } RULE 2 (CRITICAL): `#` starts a COMMENT. Hex colors MUST be quoted: `style.fill: "#f0ff3a"` (WRONG: `style.fill: #f0ff3a`). Named colors don't need quotes: `style.fill: red`. Gradients: `style.fill: "linear-gradient(#hex, #hex)"` (quoted) or `style.fill: linear-gradient(red, blue)` (named). RULE 3 (CRITICAL): numeric properties accept INTEGERS ONLY (NOT floats). `style.stroke-width: 2` ✅, `style.stroke-width: 1.5` ❌ ERROR. SHAPES: rectangle(default), oval, circle, diamond, hexagon, cylinder, cloud, person, page, step, stored_data, package. LAYOUT: `direction: right` (or left/up/down) at top level only. CONNECTIONS: `a -> b: label`, `a <-> b`, chain `a -> b -> c`. STYLE (value types matter!): style.fill / style.stroke / style.font-color → color: named (red) or hex QUOTED ("#ff0000") or gradient QUOTED. style.stroke-width → INTEGER 0-15 (NOT float!) style.stroke-dash → INTEGER 0-10 style.font-size → INTEGER 8-100 style.border-radius → INTEGER 0-20 style.opacity → FLOAT 0-1 style.shadow / style.3d / style.double-border / style.bold / style.italic → true or false style.text-transform → uppercase / lowercase / title / none width / height → INTEGER (pixels) CONTAINERS: nested { }; cross-ref `parent.child`. ICONS: `icon: lucide:server` (Iconify set:name, auto-resolved by this tool). EXAMPLE (styled): direction: right db: { shape: cylinder style.fill: "#1a1a2e" style.stroke: "#f0ff3a" style.stroke-width: 2 style.shadow: true } api: { shape: hexagon style.fill: "#16213e" style.border-radius: 14 } api -> db: query MISTAKES: (1) space-separating properties on one line = ERROR. (2) Unquoted hex (# starts comment) = ERROR. (3) Float for integer property (1.5 for stroke-width) = ERROR. (4) Referencing by label not key. (5) `direction:` is top-level only. Graphviz DOT (semicolons OK): digraph G { rankdir=LR; A -> B; C } | |
| name | No | Output filename (without extension) | |
| theme | No | Theme (D2 theme name or ID; d2 only) | |
| engine | No | Render engine: d2 (D2 WASM, default) or graphviz (DOT). mermaid is listed for discoverability but unsupported in-process — use d2/graphviz. | d2 |
| format | No | Output format (svg = vector high-res) | svg |
| outDir | No | Output directory, default session-dir/output | |
| diagramType | No | Diagram type hint (flowchart/sequence/class/architecture...) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It discloses that D2 and Graphviz are built-in (WASM), limits of D2 (no SVG filters), and that mermaid is unsupported. Also details common mistakes and style constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is long but well-structured, front-loading core purpose and key constraints. Each sentence is informative, though some could be consolidated; however, given complexity, thoroughness is justified.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given high complexity (multiple engines, DSL syntax, constraints) and no output schema, the description is remarkably complete. It covers all parameters, usage patterns, limitations, and error prevention.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, but description adds enormous value beyond schema: full D2 syntax, examples, common errors, and detailed parameter usage. This is exceptional.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description explicitly states the tool generates various diagram types (architecture, flowchart, sequence, etc.) and renders to SVG. It clearly distinguishes from siblings by focusing on structured technical diagrams using D2 or Graphviz DSL.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit when-to-use ('Prefer this for structured technical diagrams') and when-not-to-use ('For highly stylized graphics... hand-writing SVG is appropriate'). Also warns against shelling out for d2/dot and clarifies mermaid is unsupported in-process.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_formulaA
Render a math formula to vector SVG (数学公式/公式渲染/方程). Pass the formula as LaTeX (e.g. E=mc^2, \frac{a}{b}, \sum_{i=1}^n i^2) — even simple formulas qualify; the user need not say 'LaTeX'. MathJax is BUILT IN (bundled) — no KaTeX/system install, no font dependency; just call this tool. Prefer this over any manual approach. Pure local, no AI. Multilingual triggers: 数式 · fórmula · formule · Formel · формула · fórmula (ja/es/fr/de/ru/pt).
| Name | Required | Description | Default |
|---|---|---|---|
| tex | Yes | LaTeX source, e.g. \frac{a}{b} or \sum_{i=1}^{n} i^2 | |
| name | No | Output filename (without extension) | |
| color | No | Foreground color (default black) | |
| width | No | Target pixel width for PNG (default 600); SVG ignores this | |
| format | No | svg | |
| outDir | No | Output directory, default session-dir/output | |
| display | No | true=block (display) style, false=inline | |
| fontSize | No | Font size in em (default 18) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses that MathJax is bundled, no external dependencies, pure local, and no AI. However, it omits details like return format, potential limitations, or error behavior. With no annotations, these gaps reduce transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded with the core purpose, followed by examples and technical details. Some secondary info (multilingual triggers) could be omitted, but overall efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has 8 parameters and no output schema or annotations. The description explains the main input and rendering behavior but does not mention what the tool returns (e.g., file path, data URI) or how SVG output is handled, leaving the agent to infer.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 88%, so the baseline is 3. The description adds that even simple formulas qualify and user need not say 'LaTeX', but does not elaborate on other parameters beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Render') and resource ('a math formula to vector SVG'), specifies input as LaTeX, and provides multilingual triggers. It is distinct from sibling tools like generate_chart or render_svg by focusing solely on math formula rendering.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'Prefer this over any manual approach' and notes that MathJax is built-in and local, implying ease of use. However, it does not specify when not to use the tool or compare with alternatives like render_svg.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_iconA
Fetch and render a vector icon / logo / symbol / favicon (图标/logo/符号) from Iconify — 200k+ icons. Renders to SVG/PNG locally. Needs network (Iconify API); cached after first fetch. Browse at https://icon-sets.iconify.design. No AI. Multilingual triggers: アイコン · icono · icône · Symbol · значок · ícone (ja/es/fr/de/ru/pt).
| Name | Required | Description | Default |
|---|---|---|---|
| icon | Yes | Iconify icon ID, format: SET:NAME. Common sets: mdi (Material Design), lucide (Lucide), logos (brand logos), fa-solid / fa-brands (Font Awesome). Examples: mdi:home, lucide:gem, logos:github, fa-brands:twitter. Browse all at https://icon-sets.iconify.design | |
| name | No | Output filename (without extension); defaults to sanitized icon ID | |
| size | No | Pixel size (square), default 128 | |
| color | No | Foreground color (default currentColor; PNG defaults to black) | |
| format | No | svg | |
| outDir | No | Output directory, default session-dir/output |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It discloses network requirement, caching, local rendering, SVG/PNG support, and no AI involvement. However, it omits details on error handling or limitations like maximum size.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences plus a multilingual line, very concise and front-loaded with the main purpose. Every sentence adds value, no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 6 parameters and no output schema, the description covers purpose, network, caching, format, and browsing reference. It lacks error handling details but is otherwise complete for a fetch-and-render tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is high (83%), so baseline is 3. The description adds examples of icon IDs and mentions multilingual triggers, but does not significantly enhance parameter understanding beyond the schema. The schema already describes each parameter sufficiently.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool fetches and renders vector icons from Iconify, with specific verb 'Fetch and render' and resource 'vector icon / logo / symbol / favicon'. It distinguishes from sibling tools like generate_image and generate_chart by specifying the icon library scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions network dependency and caching, but does not explicitly compare with sibling tools or state when not to use. It implies usage for icon generation but lacks explicit alternatives or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_imageA
Generate or edit an AI image — text-to-image (文生图/AI画图) or image-to-image (图生图, pass images) — via free models (Agnes AI default, or Zhipu). Use this for photographic or illustrated subjects (写实图/插画/概念图/Logo 设计图). Output downloads locally and the path is returned. No local rendering libs needed; this calls the AI model for you. Multilingual triggers: 画像 · imagen · image · Bild · изображение · imagem (ja/es/fr/de/ru/pt).
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | ||
| size | No | e.g. 1024x1024 (provider may snap to nearest preset). | |
| model | No | Optional; omit to use the provider default. Call list_models to see options. | |
| images | No | Image-to-image inputs (public URL or data URI). Omit for text-to-image. | |
| outDir | No | 产物落盘目录,省略用默认(会话目录/output)。 | |
| prompt | Yes | Image description. | |
| download | No | ||
| provider | No | agnes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations are absent, so description carries full burden. It mentions local download, no rendering libs needed, and that it calls an AI model. However, it lacks details on destructive behavior, authentication, rate limits, or error handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is concise (~100 words) with front-loaded purpose. Includes multilingual triggers which may be extraneous but do not hinder clarity. No redundant sentences.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 8 parameters and no output schema, the description explains the return value (path) and basic behavior. However, it omits details like cost, rate limits, error responses, and parameter constraints like size formats. Adequate but with gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 63%, and description adds context for 'model' (free models, defaults) and 'images' (image-to-image). But it does not explain 'n', 'size', 'outDir', 'download', or 'provider' beyond what schema already provides. Some added value but not comprehensive.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool generates or edits AI images via text-to-image or image-to-image. It specifies the resource ('AI image') and actions. Sibling tools like generate_icon or generate_chart are for different output types, so this is well distinguished.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides explicit use cases ('photographic or illustrated subjects, logo design') and lists multilingual triggers. It implies this is for free models but does not explicitly contrast with alternatives like generate_icon or describe when not to use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_qrcodeA
Generate a QR code (二维码) as SVG or PNG from text/URL. Pure local rendering — no qrencode/zbar/system install, no AI, no network. Just call with the text/URL to encode. Multilingual triggers: QRコード · código QR · code QR · QR-Code · QR-код · código QR (ja/es/fr/de/ru/pt).
| Name | Required | Description | Default |
|---|---|---|---|
| dark | No | Foreground color, default #000000 | |
| name | No | Output filename (without extension) | |
| text | Yes | Content to encode (URL or text) | |
| light | No | Background color, default #ffffff | |
| format | No | svg | |
| margin | No | Margin in modules (default 2) | |
| outDir | No | Output directory, default session-dir/output | |
| errorCorrectionLevel | No | M |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Discloses local rendering, no system installs, no network. With no annotations, description carries transparency burden but omits details on limits, errors, or performance. Adequate but not comprehensive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Concise, well-structured description with front-loaded purpose. All sentences add value. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequate for a 8-param tool with no output schema. Explains core functionality, self-contained nature, and multilingual triggers. Could mention output details but is largely complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 75%, so baseline is 3. Description adds minimal parameter info beyond schema; the main text mentions text/URL but doesn't elaborate on colors, margin, etc.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states verb (Generate), resource (QR code), output formats (SVG/PNG), and source (text/URL). Distinguishes from sibling generate_* tools by specifying QR code specifically.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Highlights pure local rendering with no dependencies, implying use when simplicity and offline capability are needed. Lacks explicit exclusion of alternatives but provides clear context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_videoA
Poll and optionally download a video task created by create_video (by videoId or taskId). Companion to create_video — use it after an async video returns a handle, or to check/retrieve any video task.
| Name | Required | Description | Default |
|---|---|---|---|
| taskId | No | legacy fallback endpoint | |
| videoId | No | ||
| download | No | ||
| provider | No | agnes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full responsibility for behavioral disclosure. It mentions polling and downloading, implying a read operation with optional file retrieval, but does not disclose potential behaviors like rate limits, authorization needs, or what happens when downloading large files.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with no superfluous content. It front-loads the action and follows with usage context, which is efficient. However, it could be slightly more structured (e.g., separate parameter notes).
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Without an output schema, the description should clarify what the tool returns (e.g., video URL, binary data). It adequately covers the polling/companion use case but omits output details. Given 4 parameters and no schema, more completeness is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 25% (only 'taskId' has a description). The description adds context for 'videoId' and 'taskId' by stating they are identifiers, but it does not explain the 'download' or 'provider' parameters, leaving critical gaps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action (poll and optionally download) and resource (video task created by create_video). It specifies identifiers (videoId or taskId) and positions itself as a companion to create_video, distinguishing it from sibling tools like generate_image or list_models.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage context: 'use it after an async video returns a handle, or to check/retrieve any video task.' This guides when to use the tool, though it does not explicitly state when not to use it or list alternatives beyond the companion relationship.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_modelsA
List available AI image/video models and video constraints per provider (Agnes / Zhipu). Use to discover model names (e.g. cogview-4, agnes-video-v2.0) and allowed video frame counts before calling generate_image / create_video.
| Name | Required | Description | Default |
|---|---|---|---|
| provider | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It transparently describes a read-only listing operation with no destructive behavior. Could mention idempotency or rate limits, but not critical for a simple list tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences: first states core purpose, second provides usage guidance. No wasted words, highly efficient and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given low complexity (1 optional param, no output schema), description covers what the tool returns (models and video constraints) and when to use it. Could mention that the list is filtered by provider, which is implied. Almost complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and parameter 'provider' has no description in schema. Description adds meaning by stating 'per provider (Agnes / Zhipu)', giving concrete examples. However, it does not specify exact allowed values or format, leaving some ambiguity.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states 'List available AI image/video models and video constraints per provider', specifying the action (list) and resource (models and constraints). It also distinguishes from sibling generation tools like generate_image and create_video by noting it is used to discover model names before calling them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says 'Use to discover model names... before calling generate_image / create_video', providing clear when-to-use context. Does not explicitly state when not to use, but the purpose is sufficiently clear and functional.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
render_svgA
Render SVG source to high-quality PNG or SVG. Dual backend: resvg (92% filter fidelity, in-process, lightweight) or Chrome (100% filter fidelity, needs system Chrome/Edge). AUTO-selects: if SVG contains // AND Chrome is available → Chrome; else resvg. Use this for '酷炫/霓虹/科技感' graphics with glow/blur/depth that D2 cannot produce — write the SVG (with feGaussianBlur, radial gradients, etc.) and this tool renders it. No AI.
| Name | Required | Description | Default |
|---|---|---|---|
| svg | Yes | SVG source code (XML string starting with <svg). Can include feGaussianBlur, feMerge, gradients, patterns — all SVG filter primitives supported. | |
| name | No | Output filename (without extension) | |
| scale | No | Retina scale factor for Chrome backend (default 2; only affects Chrome renders) | |
| width | No | Target pixel width for PNG (default: auto-detect from SVG viewBox/width) | |
| format | No | Output format (png = rasterized; svg = pass-through) | png |
| outDir | No | Output directory, default session-dir/output | |
| backend | No | Rendering backend: 'auto' = detect filters + Chrome availability; 'resvg' = force lightweight (92%); 'chrome' = force Chrome (100%, needs Chrome installed) | auto |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, description fully covers backend behavior, filter fidelity percentages, auto-selection logic, and non-AI nature. Lacks info on side effects or rate limits, but for a render tool this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Concise with purposeful front-loading (purpose, backends, use case). A few Chinese phrases add color but do not harm clarity. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Covers all 7 parameters with schema and description. No output schema, but description does not explain return value (likely file path). Otherwise complete for complexity level.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but description adds valuable context: explains backend options, auto-selection triggers, scale relevance only to Chrome, and format behavior. Exceeds baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it renders SVG to PNG or SVG, explains dual backend, and distinguishes from siblings by targeting effect-heavy graphics that D2 cannot produce. Verb and resource are specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly tells when to use (for glowing/blur effects beyond D2's capabilities) and mentions 'No AI'. Does not provide explicit when-not-to-use or direct comparison to sibling tools, but context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.4.7- Changed
generate_card1 field changed- changed
Input schema / properties / glow / descriptionPrevious value: -"Title glow (text-shadow). Pass true (as the string 'true') to derive from accent, or a full text-shadow value like '0 0 40px rgba(245,158,11,.6)'."New value: +"Title glow (text-shadow). Pass 'true' to auto-derive from accent color, or a full text-shadow CSS value like '0 0 40px rgba(245,158,11,.6)'. Pass 'false' to disable. Does NOT combine with titleGradient (shadow is clipped when text is gradient-filled)."
- Changed
generate_chart1 field changed- changed
Input schema / properties / spec / descriptionPrevious value: -"Vega-Lite specification (JSON object). Claude generates this."New value: +"Vega-Lite v5 spec (JSON object). Docs: https://vega.github.io/vega-lite/docs/.\nSkeleton: { data: {...}, mark: '...', encoding: {...} }.\nMARK TYPES: 'bar'(bar chart), 'line'(line), 'area', 'circle'/'point'(scatter), 'arc'(pie/donut, needs theta channel), 'tick', 'text'.\nDATA: { values: [{a:'A',b:28},{a:'B',b:55}] }.\nENCODING channels: x, y, color, size, shape, opacity, text, theta. Field types: 'quantitative'(numbers), 'nominal'(categories), 'temporal'(dates), 'ordinal'(ordered).\nPIE/DONUT: mark='arc' + encoding.theta (NOT 'angle' — v5 changed). Donut: add mark.innerRadius.\nAGGREGATION: { aggregate:'sum', field:'v', type:'quantitative' }.\nEXAMPLE bar: { data:{values:[{cat:'A',v:28}]}, mark:'bar', encoding:{x:{field:'cat',type:'nominal'},y:{field:'v',type:'quantitative'}} }\nMISTAKES: (1) pie uses 'theta' not 'angle'; mark is 'arc' not 'pie'. (2) Always set type on x/y. (3) mark object needs type key.\nNOTE: image marks with external URLs NOT embedded; use data URIs."
- Changed
generate_diagram1 field changed- changed
Input schema / properties / code / descriptionPrevious value: -"DSL source code (D2 or DOT/Graphviz syntax). Generated by Claude."New value: +"D2 or DOT source code. D2 SYNTAX (full docs: https://d2lang.com):\nRULE 1: in { } blocks, each property on its OWN LINE (newline-separated). WRONG: `x: { fill: red; shape: oval }`. RIGHT:\nx: {\n shape: oval\n style.fill: red\n}\nRULE 2 (CRITICAL): `#` starts a COMMENT. Hex colors MUST be quoted: `style.fill: \"#f0ff3a\"` (WRONG: `style.fill: #f0ff3a`). Named colors don't need quotes: `style.fill: red`. Gradients: `style.fill: \"linear-gradient(#hex, #hex)\"` (quoted) or `style.fill: linear-gradient(red, blue)` (named).\nRULE 3 (CRITICAL): numeric properties accept INTEGERS ONLY (NOT floats). `style.stroke-width: 2` ✅, `style.stroke-width: 1.5` ❌ ERROR.\nSHAPES: rectangle(default), oval, circle, diamond, hexagon, cylinder, cloud, person, page, step, stored_data, package.\nLAYOUT: `direction: right` (or left/up/down) at top level only.\nCONNECTIONS: `a -> b: label`, `a <-> b`, chain `a -> b -> c`.\nSTYLE (value types matter!):\n style.fill / style.stroke / style.font-color → color: named (red) or hex QUOTED (\"#ff0000\") or gradient QUOTED.\n style.stroke-width → INTEGER 0-15 (NOT float!)\n style.stroke-dash → INTEGER 0-10\n style.font-size → INTEGER 8-100\n style.border-radius → INTEGER 0-20\n style.opacity → FLOAT 0-1\n style.shadow / style.3d / style.double-border / style.bold / style.italic → true or false\n style.text-transform → uppercase / lowercase / title / none\n width / height → INTEGER (pixels)\nCONTAINERS: nested { }; cross-ref `parent.child`.\nICONS: `icon: lucide:server` (Iconify set:name, auto-resolved by this tool).\nEXAMPLE (styled):\ndirection: right\ndb: {\n shape: cylinder\n style.fill: \"#1a1a2e\"\n style.stroke: \"#f0ff3a\"\n style.stroke-width: 2\n style.shadow: true\n}\napi: {\n shape: hexagon\n style.fill: \"#16213e\"\n style.border-radius: 14\n}\napi -> db: query\nMISTAKES: (1) space-separating properties on one line = ERROR. (2) Unquoted hex (# starts comment) = ERROR. (3) Float for integer property (1.5 for stroke-width) = ERROR. (4) Referencing by label not key. (5) `direction:` is top-level only.\nGraphviz DOT (semicolons OK): digraph G { rankdir=LR; A -> B; C }"
- Changed
generate_icon3 fields changed- added
Input schema / properties / iconAdded value: +{ + "description": "Iconify icon ID, format: SET:NAME. Common sets: mdi (Material Design), lucide (Lucide), logos (brand logos), fa-solid / fa-brands (Font Awesome). Examples: mdi:home, lucide:gem, logos:github, fa-brands:twitter. Browse all at https://icon-sets.iconify.design", + "type": "string" +} - changed
Input schema / properties / name / descriptionPrevious value: -"Icon name as prefix:name, e.g. mdi:home, logos:github, lucide:check. Also used (sanitized) as the output filename."New value: +"Output filename (without extension); defaults to sanitized icon ID" - changed
Input schema / requiredPrevious value: -[ - "name" -]New value: +[ + "icon" +]
- Added
render_svg
10 tool updates
v0.3.7- First observed
create_video - First observed
generate_card - First observed
generate_chart - First observed
generate_diagram - First observed
generate_formula - First observed
generate_icon - First observed
generate_image - First observed
generate_qrcode - First observed
get_video - First observed
list_models
TDQS
Scored across 11 tools
Each tool targets a distinct media type or supporting function (video, card, chart, diagram, formula, icon, image, QR code, polling, model listing, SVG rendering). There is no ambiguity or overlap between tools.
Most tools follow a consistent 'generate_<type>' pattern (8 out of 11). The three outliers (get_video, list_models, render_svg) are still descriptive and follow verb_noun pattern, but deviate from the predominant generate prefix.
With 11 tools, the server covers a wide range of media generation tasks without being excessive. Each tool serves a clear purpose, and the count feels well-scoped for the server's stated purpose of media generation.
The tool set covers major media types (video, image, chart, diagram, formula, icon, QR code, cards) and includes necessary supporting tools (polling, model listing, SVG rendering). It lacks audio generation or file management, but these are minor gaps relative to the server's focus.
Maintenance
Related MCP Connectors
MCP server for Qwen Image 3 AI image generation
MCP server for Hailuo (MiniMax) AI video generation
MCP server for Luma Dream Machine AI video generation
MCP server for Wan AI video generation
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server for generating images and videos using Volcengine's Jimeng APIs, supporting text-to-image, image-to-image, multi-image fusion, text-to-video, and image-to-video.31MIT
- AlicenseAqualityDmaintenanceAn MCP server for AI-powered image generation, editing, and video generation using Google Gemini and Veo models.10512MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server for image generation and editing using Cloudflare Workers AI, providing OpenAI-compatible APIs and support for multiple models.16MIT
- AlicenseAqualityBmaintenanceMCP server for generating images via Google Flow's API without daily quota limits, supporting text-to-image and image-to-image generation.11MIT