image-charts-mcp
An MCP server that turns chart requests into permanent, hosted Image-Charts URLs, enabling agents to generate charts that render anywhere without client-side libraries.
README
image-charts-mcp
A Model Context Protocol server that turns an agent's chart request into a permanent, hosted Image-Charts image URL.
The URL renders server-side and embeds anywhere an image does — Markdown, HTML <img>, email, Slack, PDF, no-code and low-code tools — with no chart library and no runtime on the client. The agent gets back a string; the picture appears wherever that string is dropped.
Why a URL
Most chart tooling hands an agent raw bytes or an ephemeral in-memory preview that lives and dies inside the session. A hosted URL is different:
- Persistent — the same link keeps rendering long after the conversation ends.
- Portable — paste it into an email, a Notion page, a Slack message, a PDF, a Jira ticket. It just shows up.
- Zero-runtime — the receiving surface needs nothing but the ability to display an image. No JavaScript, no build step, no dependency.
- Deterministic — the chart is fully described by the URL, so it is cacheable and reproducible.
Install
No install step — run it straight from npm:
npx -y image-charts-mcp
Client configuration
Add the server to your MCP client (Claude Desktop, Claude Code, Cursor, or any MCP-capable host):
{
"mcpServers": {
"image-charts": {
"command": "npx",
"args": ["-y", "image-charts-mcp"],
"env": {
"IMAGE_CHARTS_SECRET": "",
"IMAGE_CHARTS_HOST": ""
}
}
}
}
Both env vars are optional:
| Variable | Purpose |
|---|---|
IMAGE_CHARTS_SECRET |
Image-Charts Enterprise HMAC signing key. When set together with an account id (icac), every URL is signed. Never logged. |
IMAGE_CHARTS_HOST |
Image-Charts Dedicated Cloud host (e.g. charts.acme.com). URLs point at this host and are never signed. |
Leave them empty for the free, watermarked tier.
Transports
- stdio (default) — what MCP clients use.
- StreamableHTTP (stateless) —
npx -y image-charts-mcp --transport http --port 3000, served athttp://127.0.0.1:3000/mcp.
Tools
create_chart — describe a chart, get a URL
High-level, Image-Charts-native description. You pick a semantic type and supply data; the server maps it to the correct Image-Charts parameters.
type is one of: bar, bar_grouped, bar_stacked, bar_horizontal, line, area, pie, doughnut, radar, scatter, qr, graph, gauge.
Common fields: title, series ({ name?, data: number[] }, or { name?, points: {x,y}[] } for scatter), labels, colors (hex without #), legend (true / "top" / "bottom" / "left" / "right"), size ({ width, height }), plus qr / graph / gauge option objects, icac, and format (url / png / both).
Bar chart
{
"type": "bar",
"title": "Quarterly revenue",
"series": [
{ "name": "EU", "data": [120, 90, 140] },
{ "name": "US", "data": [80, 130, 100] }
],
"labels": ["Q1", "Q2", "Q3"],
"colors": ["4285F4", "DB4437"],
"legend": "bottom"
}
→ https://image-charts.com/chart?cht=bvg&chd=a:120,90,140|80,130,100&chs=700x400&chxt=x,y&chxl=0:|Q1|Q2|Q3&chco=4285F4,DB4437&chdl=EU|US&chdlp=b&chtt=Quarterly+revenue
Pie chart
{
"type": "pie",
"title": "Traffic sources",
"series": [{ "data": [40, 35, 25] }],
"labels": ["Search", "Direct", "Social"],
"colors": ["4285F4", "0F9D58", "F4B400"]
}
→ https://image-charts.com/chart?cht=p&chd=a:40,35,25&chs=500x400&chl=Search|Direct|Social&chco=4285F4,0F9D58,F4B400&chtt=Traffic+sources
QR code
{
"type": "qr",
"qr": { "data": "https://www.image-charts.com", "errorCorrection": "M", "margin": 4 },
"size": { "width": 300, "height": 300 }
}
→ https://image-charts.com/chart?cht=qr&chl=https://www.image-charts.com&choe=UTF-8&chld=M|4&chs=300x300
URLs above are shown decoded for readability; the tool returns them percent-encoded.
image_charts_url — raw parameter passthrough
The escape hatch. Pass raw Image-Charts parameters (cht, chd, chs, chco, chxt, chxl, chm, chbh, …) and get the hosted URL, signed automatically when applicable. Use it for anything create_chart does not cover.
{ "cht": "lc", "chd": "a:10,40,25,60", "chs": "600x300", "chco": "4285F4", "chm": "B,4285F433,0,0,0" }
list_chart_types — discovery
Returns every semantic type, the Image-Charts cht it maps to, a description, the inputs it reads, and the concepts Image-Charts cannot render (funnel, treemap, sankey, heatmap, and so on). Call it first if you are unsure which type to use.
Enterprise signing
Image-Charts Enterprise requires each URL to carry an HMAC-SHA256 signature. This server handles it for you:
- Set
IMAGE_CHARTS_SECRETin the server's environment (it stays server-side and is never logged). - Pass your account id as
icaconcreate_chartorimage_charts_url.
When both are present the returned URL includes &ichm=…:
https://image-charts.com/chart?icac=ic_demo_account&cht=bvg&chd=a:1,2,3&chs=700x400&…&ichm=26d6d5b3…
If the secret is not configured, a bare icac cannot be signed, so it is dropped and you get a valid free-tier URL instead of a broken one. On Dedicated Cloud (IMAGE_CHARTS_HOST) signing is not used at all — the dedicated host handles authorization at the edge.
Development
npm install
npm run build # tsup → dist/cli.js
npm run typecheck # tsc --noEmit
npm test # vitest (black-box, real Image-Charts URL builder, no mocks)
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。