
Search2chart Mcp
io.github.iqingyoungPublished by GitHub account iqingyoungv0.4.1Updated Oct 24, 2026
跨客户端 ECharts 图表 MCP server:数据 -> 可交互 HTML 与内联图片
Overview
Local MCP server that turns tabular data or CSV/XLSX files into ECharts charts, returning interactive HTML files and inline images in the chat.
- What you can do
- Generate charts from structured data or from CSV/XLSX file paths, producing an interactive HTML file plus an inline image.
- List supported chart types, color schemes and field conventions, with automatic pie/bar selection when the type is set to auto.
- Choose how images are returned: data URI, localhost HTTP, file path, public CDN link, MCP image block, or plain text with the HTML path.
- Return the cleaned data as JSON alongside the chart so text-only models can keep analyzing proportions and trends.
- When to use it
- Useful when an assistant needs to visualize tabular results inside a conversation, for example turning query output or a spreadsheet into a bar or pie chart, or producing a standalone interactive HTML chart to open in a browser.
- Requirements
- Runs locally over stdio, typically launched with npx search2chart-mcp (Node.js) or a cloned server.js path. Optional ECHARTS_INLINE_MODE environment variable selects the image output mode; no accounts or API keys are declared.
Installation
In SourceWeft
- Open Search2chart Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
[DSH Market] [MCP] [Downloads]
search2chart-mcp
Turn any tabular data into inline charts directly inside agent conversations. Zero runtime dependencies, multi-client adaptive.
把「任意表格数据」变成直接内联在 agent 对话流里的图表。零运行时依赖,多端自适应。
[image]安装
两条路径
- 用 MCP 客户端 → 用
mcp/,对话框直接出图 - 用 DSH 且想要原生体验 → 用
dsh/;DSH 里也能用mcp/(走文件链接) - 两者可并存
快速开始
1. 在你的 MCP 配置里加入
如果 npx 拉不到,用 clone 后的绝对路径:
"command": "node", "args": ["<仓库>/mcp/server.js"]
2. 首次接入:测试你的 Agent 能渲染哪种图片
不同 Agent 渲染器对图片格式支持各异。先用 all 模式一次性测试:
临时配置(在 MCP 配置里加环境变量):
发给 Agent 的测试 prompt:
Agent 返回 3-4 行图,分别标记为:
- 【1·data URI】 — 自包含 base64,无需联网
- 【2·localhost http】 — 本地 HTTP 服务
- 【3·file://】 — 本地文件路径
- 【4·CDN 公网 https】 — GitHub + jsDelivr 公网地址
哪个在对话框里真正渲染成了图片,你的 Agent 就支持哪种。
3. 固定模式
Agent 自动检测
工具结果里已内置 Agent 指令,告诉模型如何根据用户反馈自动设置模式:
已知客户端实测:ZCode →
file,OpenCode →inline(data URI),WorkBuddy →cdn,DSH →inline(localhost http),Claude/Cursor →inline+returnImage:true。
核心能力
多客户端内联适配
通过 ECHARTS_INLINE_MODE 环境变量控制内联行为:
CDN 公网图床
- SVG → PNG 栅格化(@resvg/resvg-js,可选依赖)
- GitHub Contents API 上传 + jsDelivr CDN 加速
- GitHub Actions 定时清理(默认保留 3 天)
清洗数据留存
结果附带完整数据(JSON,代码块包裹),让纯文本模型在上下文里继续做占比/趋势/对比分析,无需看图。returnData: false 可关。
自包含可交互 HTML
图表同时写入 .html 文件,浏览器打开即支持 hover / 缩放 / 类型切换 / 配色调整。
工具
字段约定:第一列 = 类别轴;其余列 = 数值序列(多列即多序列);chartType: auto 按数据自动选 饼/柱。
接入各客户端
详见 mcp/README.md。
目录
License
MIT
Source: README.md at commit da37d08
Tools
0Version history
1- v0.4.1LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts