Chart Canvas

io.github.gluip由 GitHub 帳號 gluip 發布v0.3.2更新於 Oct 25, 2026

Create interactive visualizations and query data sources (SQLite, CSV, Parquet, JSON)

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓助理在瀏覽器儀表板上建立互動式圖表、表格和 Mermaid 圖,並查詢本機資料檔案。

可以做什麼
在即時儀表板上建立、移除和清空視覺化內容:折線圖、長條圖、散佈圖、圓餅圖、表格,以及 Mermaid 流程圖和示意圖,並可開啟瀏覽器中的儀表板。查詢 SQLite 資料庫結構,了解資料表和欄位後再寫查詢。對 SQLite 執行唯讀 SQL SELECT 查詢,並把結果轉成圖表或表格。透過 DuckDB 查詢本機 CSV、Parquet、JSON 和 NDJSON 檔案。
適用情境
適合在與助理協作時希望把圖表、示意圖或表格以視覺化方式呈現,或想探索本機 SQLite 資料庫和資料檔案、直接以圖表查看結果而不必把資料匯出到其他地方。
執行需求
透過 npm 套件 @gluip/chart-canvas-mcp 在桌面本機執行(可用 npx 或全域安裝),需要 Node.js。伺服器會在 3000 埠啟動本機 Web 服務並開啟瀏覽器儀表板。未宣告需要帳號、API 金鑰或環境變數。
安裝前請注意
伺服器會依路徑讀取本機檔案,包括 SQLite 資料庫以及 CSV、Parquet、JSON 和 NDJSON 檔案,因此只應指向你願意在助理工作階段中暴露的資料。查詢僅限唯讀的 SELECT 和 WITH 語句,最多 10,000 列,但 README 所稱資料不離開本機的說法需依你的環境自行確認。它會開放本機埠並開啟瀏覽器視窗。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Chart Canvas,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Chart Canvas MCP Server

Interactive visualization dashboard for AI assistants via Model Context Protocol

Create beautiful charts, diagrams, and tables directly from your AI conversations. Chart Canvas provides a real-time dashboard that displays visualizations as you work with LLMs like Claude.

Demo

[Chart Canvas Demo]

Watch the full demo on YouTube to see Chart Canvas in action!

Features

✨ Multiple Chart Types: Line, bar, scatter, pie charts, tables, and Mermaid diagrams
🎨 Interactive Dashboard: Drag-and-drop grid layout with real-time updates
🔄 Live Synchronization: Changes appear instantly in your browser
📊 Rich Visualizations: Powered by ECharts and Mermaid
💾 Universal Data Sources: Query SQLite, CSV, Parquet, JSON, and NDJSON files directly
⚡ Smart Data Flow: Execute queries server-side - data stays local, never sent to LLM
🔒 Privacy First: Your data never leaves your machine
🚀 Easy Setup: One command to get started
🌐 Production Ready: Built-in production mode with optimized builds

Supported Data Sources

Chart Canvas can query and visualize data from multiple file formats:

  • SQLite (.db, .sqlite, .sqlite3) - Relational databases
  • CSV (.csv) - Comma-separated values
  • Parquet (.parquet) - Columnar storage format
  • JSON (.json) - JSON arrays of objects
  • NDJSON (.jsonl, .ndjson) - Newline-delimited JSON

Privacy & Performance: All queries execute locally on your machine using DuckDB. Query results are transformed into visualizations server-side - only metadata (chart configuration) is sent to the LLM, never your actual data. This makes it fast, scalable, and private.

Quick Start

Installation

bash
npm install -g @gluip/chart-canvas-mcp

Or use directly with npx (no installation needed):

bash
npx @gluip/chart-canvas-mcp

Configuration

Add to your MCP client configuration (e.g., Claude Desktop):

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json

json
{  "mcpServers": {    "chart-canvas": {      "command": "npx",      "args": ["-y", "@gluip/chart-canvas-mcp"]    }  }}

Usage

  1. Start your MCP client (e.g., Claude Desktop)
  2. The server will automatically start on port 3000
  3. Use the showCanvas tool to open the dashboard in your browser
  4. Ask the AI to create visualizations!

Example Prompts

"Show me a line chart comparing sales data for 2023 and 2024"
"Create a pie chart showing market share by region"
"Draw a flowchart for the user authentication process"
"Make a table with team member information"
"Show me the database schema for my SQLite database"
"Query the athletes table and show the top 10 with most personal records"
"Create a chart showing sales trends from the database grouped by region"

MCP Tools

addVisualization

Create charts, diagrams, and tables on the canvas.

Supported Types:

  • line - Line charts with multiple series
  • bar - Bar charts for comparisons
  • scatter - Scatter plots for data distribution
  • pie - Pie charts with labels
  • table - Data tables with headers
  • flowchart - Mermaid diagrams (flowcharts, sequence diagrams, Gantt charts, etc.)

Example:

typescript
{  type: "line",  title: "Monthly Sales",  series: [    { name: "2023", data: [[1, 120], [2, 132], [3, 101]] },    { name: "2024", data: [[1, 220], [2, 182], [3, 191]] }  ],  xLabels: ["Jan", "Feb", "Mar"]}

removeVisualization

Remove a specific visualization by ID.

clearCanvas

Remove all visualizations from the canvas.

showCanvas

Open the dashboard in your default browser.

getDatabaseSchema

Inspect the structure of a SQLite database to understand available tables and columns before writing queries.

Parameters:

  • databasePath - Path to SQLite database file (e.g., ./data/mydb.sqlite or absolute path)

Example:

typescript
{  databasePath: "/path/to/database.db";}

Returns: Formatted schema showing all tables, columns, data types, and constraints.

queryAndVisualize

Execute a SQL query on a SQLite database and create a visualization from the results. Queries are executed server-side and must be read-only (SELECT only). Maximum 10,000 rows.

Parameters:

  • databasePath - Path to SQLite database file
  • query - SQL SELECT query (read-only)
  • visualizationType - Type of chart: line, bar, scatter, pie, or table
  • columnMapping (optional for table) - Mapping of columns to chart axes:
    • xColumn - Column for X-axis (required for charts)
    • yColumns - Array of columns for Y-axis (required for charts)
    • seriesColumn - Column to group data into separate series (optional)
    • groupByColumn - Alternative grouping column (optional)
  • title - Optional title for visualization
  • description - Optional description
  • useColumnAsXLabel - If true, use X column values as labels instead of numbers

Example:

typescript
{  databasePath: "./data/sales.db",  query: "SELECT region, SUM(revenue) as total FROM sales GROUP BY region",  visualizationType: "bar",  columnMapping: {    xColumn: "region",    yColumns: ["total"]  },  title: "Revenue by Region",  useColumnAsXLabel: true}

Security: Only SELECT and WITH (CTE) queries are allowed. INSERT, UPDATE, DELETE, DROP, and other modifying operations are blocked.

Architecture

  • Backend: Node.js + TypeScript + Express + MCP SDK
  • Frontend: Vue 3 + ECharts + Mermaid + Grid Layout
  • Communication: Real-time polling for instant updates

Development

Local Development

bash
# Clone repositorygit clone https://github.com/gluip/chart-canvas.gitcd chart-canvas
# Install backend dependenciescd backendnpm install
# Install frontend dependenciescd ../frontendnpm install
# Development mode (backend + frontend separate)# Terminal 1 - Backendcd backendnpm run dev
# Terminal 2 - Frontendcd frontendnpm run dev
# Production mode (single server)cd backendnpm run build:allnpm run start:prod

MCP Configuration for Local Development

json
{  "mcpServers": {    "chart-canvas": {      "command": "/path/to/node",      "args": [        "/path/to/chart-canvas/backend/node_modules/.bin/tsx",        "/path/to/chart-canvas/backend/src/index.ts"      ]    }  }}

License

MIT © 2026 Martijn

Links

來源:backend/README.md,提交 a403c18

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.3.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分