{
  "markdown": "# x402-dataviz-mcp\n\nA free MCP (Model Context Protocol) server that renders bar, line, and area\ncharts from structured data and returns clean, hand-designed SVG. No API\nkey, no payment, no rate limit games — just an MCP tool any MCP client can\ncall.\n\nThis is the **open funnel twin** of a paid, x402-gated HTTP API:\n\n**[x402-dataviz-poc.theliminalguy.workers.dev](https://x402-dataviz-poc.theliminalguy.workers.dev)**\n— `POST /chart`, $0.01 USDC on Base per call via the\n[x402 payment protocol](https://x402.org), for production/high-volume or\nnon-MCP (plain HTTP) use. Same renderer, same output, just billed per call\ninstead of free-via-MCP.\n\n## Why this exists\n\nThe [x402 Bazaar](https://x402.org) (~14,800 agent-payable APIs at time of\nwriting) has zero coverage in \"structured data → clean chart image.\" This\nMCP server is the free/local half of filling that gap — try it for nothing\nvia MCP; reach for the paid HTTP endpoint when you need it at volume or\noutside an MCP client.\n\n## What it does\n\nOne tool, `render_chart`, takes a chart type + structured data points and\nreturns a rendered SVG string. Rendering is hand-rolled (no headless\nbrowser, no native binaries, no heavy charting framework) — just\nstring-built SVG, so it's fast with zero runtime dependency risk.\n\nThe design bar is the actual differentiator: a real categorical color\npalette (validated for colorblind-safety, not eyeballed), considered\nspacing, thin marks with rounded bar ends, 2px surface gaps between bars,\nringed line markers, direct end-labels, and full light/dark theme support —\nnot the default-blue/red/green look of a generic charting library.\n\n## Install & run\n\n```bash\nnpx x402-dataviz-mcp\n```\n\nOr add it to an MCP client config (e.g. Claude Desktop's\n`claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"dataviz\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"x402-dataviz-mcp\"]\n    }\n  }\n}\n```\n\n## Tool: `render_chart`\n\nInput:\n\n```jsonc\n{\n  \"type\": \"bar\" | \"line\" | \"area\",\n  \"title\": \"optional string\",\n  \"theme\": \"light\" | \"dark\",       // defaults to \"light\"\n  \"data\": [\n    { \"x\": \"Q1\", \"values\": { \"Revenue\": 128000, \"Cost\": 84000 } },\n    { \"x\": \"Q2\", \"values\": { \"Revenue\": 146500, \"Cost\": 91200 } }\n  ]\n}\n```\n\n`values` can hold one or more named series; series colors are assigned from\na fixed, colorblind-validated order (never generated/cycled). A legend\nrenders automatically for 2+ series; a single series needs no legend (the\ntitle already names it).\n\nOutput: an SVG string (as MCP tool text content) rendering the requested\nchart.\n\n## Local development\n\n```bash\nnpm install\nnpm run dev      # runs src/index.ts directly on stdio via tsx\nnpm run build    # compiles to dist/ for the published npm package\n```\n\n## When to use the paid HTTP twin instead\n\nUse [`POST /chart`](https://x402-dataviz-poc.theliminalguy.workers.dev/chart)\non the paid Worker instead of this MCP server when:\n\n- You're calling from outside an MCP client (plain HTTP, any language).\n- You need production/high-volume use and want to pay per call rather than\n  rely on a free tool being available indefinitely.\n- Your agent already speaks x402 (e.g. via `x402-fetch` / `x402-axios`) and\n  can pay $0.01 USDC on Base per request.\n\nBoth routes call the exact same `renderChart()` function — output is\nbyte-for-byte identical.\n\n## License\n\nMIT\n",
  "bytes": 3333,
  "sha": "433812ad1a690b5f9fcf29fbf2017b443a6b91a9b646e8dd708b050771cbfc2b",
  "repo_slug": "liminalpepe/x402-dataviz-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_liminalpepe_x402_dataviz_mcp_7d09485c/readme"
}