v5-render
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
V5 - Weiwu Render Service
Powerful server-side rendering service for charts, tables, KPI metrics, and combined reports — TypeScript OOP version with MCP AI integration
Features
Core Capabilities
Chart Rendering — Based on G2-SSR, supporting 12 chart types
bar/column— horizontal/vertical bar charts, multi-metric supportline/area— trend charts, multi-series supportpie— proportion/donut chartscatter— correlation plot with group dimensionradar— multi-dimension comparisonwaterfall— cumulative change (finance / P&L bridge)funnel— conversion funnel, auto-sorted descendingheatmap— density matrix over two categorical axesdualaxis— bar + line combo with two y-axesgauge— KPI progress ring vs target
Table Rendering — Office-style HTML tables
Simple mode / Excel-like mode
Cell merging (auto / manual)
KPI Metric Cards — HTML dashboard cards
Single or multi-card layout
Auto colour-coded change indicator (↑ green / ↓ red / — grey)
Period comparison with percentage change
Combined Reports — One-stop generation of tables + charts + text
Technical Highlights
Feature | Description |
TypeScript | Complete type definitions, intelligent autocompletion |
Object-Oriented | Factory pattern, inheritance, encapsulation |
Type Safety | Compile-time error checking |
Modular Design | Clear responsibilities, easy to extend |
MCP Integration | AI-callable tools via Model Context Protocol |
Zero Frontend Dependencies | Server-side rendering, outputs complete HTML/PNG |
Related MCP server: Viz MCP Server
Quick Start
1. Install dependencies
npm install
check:envruns automatically after install. It detects your platform, Node version, and Canvas status, then prints specific installation guidance.
2. Install Canvas (chart rendering)
Canvas is required for chart output. Tables and metric cards work without it.
Platform | Command |
Windows | Install GTK3 Runtime, then |
macOS |
|
Linux (Debian/Ubuntu) |
|
Linux (CentOS/RHEL) |
|
Tables/metrics only |
|
npm run install:canvas auto-detects your Node ABI and downloads the matching
prebuilt binary from the node-canvas releases page. See scripts/README.md
for full details and troubleshooting.
3. Set up font for CJK support (optional)
Chart labels are rendered by Canvas using the font registered at startup. Without a Unicode font, CJK characters (Chinese/Japanese/Korean) appear as empty boxes.
Place any .ttf file in the fonts/ directory — the filename does not matter,
V5 picks the first one it finds:
mkdir -p fonts
cp /path/to/your/font.ttf fonts/Recommended free fonts with full CJK coverage:
Font | License | Download |
Noto Sans CJK | SIL Open Font License | |
Source Han Sans | SIL Open Font License |
Note:
fonts/is excluded from version control (.gitignore). Each deployment must supply its own font file. Iffonts/is empty, V5 falls back to system fonts — Latin text renders correctly, CJK characters may appear as boxes on servers without CJK system fonts.
4. Build & run
npm run build # compile TypeScript (output: dist/)
npm start # HTTP server on port 3001
npm test # run testsAPI Documentation
1. Health Check
GET /healthResponse:
{
"status": "ok",
"service": "v5",
"version": "1.0.0",
"description": "Weiwu Render Service (TypeScript)",
"supportedCharts": ["bar", "column", "line", "pie", "area", "scatter", "radar",
"waterfall", "funnel", "heatmap", "dualaxis", "gauge"]
}2. Chart Rendering
POST /
Content-Type: application/json
{
"type": "chart",
"data": {
"chartType": "column",
"axis": [
{ "type": "x", "value": "month", "name": "Month" },
{ "type": "y", "value": "amount", "name": "Amount" }
],
"data": [
{ "month": "Jan", "amount": 1000 },
{ "month": "Feb", "amount": 1500 }
],
"width": 640,
"height": 480
},
"output": "base64"
}Response:
{
"success": true,
"base64": "iVBORw0KGgo...",
"format": "png",
"width": 640,
"height": 480
}3. Table Rendering
POST /
Content-Type: application/json
{
"type": "table",
"data": {
"title": "Sales Data",
"columns": [
{ "field": "product", "name": "Product" },
{ "field": "sales", "name": "Sales" }
],
"rows": [
{ "product": "Product A", "sales": 10000 },
{ "product": "Product B", "sales": 8500 }
]
},
"template": "excel-like"
}Cell Merging
{ "mergeConfig": { "type": "auto", "fields": ["region"] } }
{ "mergeConfig": { "type": "manual", "cells": [{ "row": 0, "col": 0, "rowSpan": 2, "colSpan": 1 }] } }4. KPI Metric Cards
POST /
Content-Type: application/json
{
"type": "metric",
"data": {
"title": "Q1 Summary",
"items": [
{
"title": "Total Sales",
"value": 128500,
"unit": "USD",
"previousValue": 112000,
"compareLabel": "vs last quarter"
},
{ "title": "Orders", "value": 3420, "previousValue": 3100 }
],
"columns": 2
}
}Response:
{ "success": true, "html": "<!DOCTYPE html>...", "format": "html", "itemCount": 2 }5. Combined Report
POST /
Content-Type: application/json
{
"type": "report",
"data": {
"title": "Sales Report",
"tables": [...],
"charts": [...]
}
}TypeScript Usage
import { V5Service } from 'v5';
const service = new V5Service();
// Chart
const result = await service.render({
type: 'chart',
data: {
chartType: 'column',
axis: [
{ type: 'x', value: 'month', name: 'Month' },
{ type: 'y', value: 'amount', name: 'Amount' }
],
data: [{ month: 'Jan', amount: 1000 }, { month: 'Feb', amount: 1500 }]
},
output: 'base64'
});
// KPI metrics
const metricResult = await service.render({
type: 'metric',
data: {
items: [{ title: 'Revenue', value: 128500, unit: 'USD', previousValue: 112000 }]
}
});AI Integration
V5 provides two complementary AI integration mechanisms:
Agent Skill (Behavioral Guidance)
The skills/SKILL.md file provides comprehensive instructions for AI agents:
When to use V5 capabilities
How to configure each chart type and axis mapping
What quality standards to meet
MCP Server (Tool Interface)
The MCP server (mcp/server.ts) exposes V5 as callable tools via the Model Context Protocol.
All render tools save output to a file and return the file path.
Tool | Output | Description |
| PNG file | Render any of the 12 chart types |
| HTML file | Render table with optional cell merging |
| HTML file | Render KPI metric cards |
| HTML file | Generate combined table + chart report |
| JSON text | List all supported chart types |
outputPath parameter (all render tools): absolute path to save the output file.
If omitted, the file is saved to the system temp directory and the path is returned.
MCP Configuration
Build first, then add to your .mcp.json (project-level) or Claude Code settings:
npm run build{
"mcpServers": {
"v5-render": {
"command": "node",
"args": ["/absolute/path/to/v5/dist/mcp/server.js"]
}
}
}Architecture
V5Service
├── ChartRendererFactory
│ └── ChartRenderer (abstract)
│ ├── Bar / Column / Line / Area / Pie
│ ├── Scatter / Radar
│ └── Waterfall / Funnel / Heatmap / DualAxis / Gauge
├── TableRenderer
├── MetricRenderer
└── ReportRendererLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Clean messy tabular data and render publication-ready PNG charts from your AI assistant.
Renders interactive Chart.js charts and dashboards inline in AI conversations.
Render branded chart images (PNG, SVG, WebP, PDF) and KPI cards from a JSON spec or plain data.
Create, inspect, manage, and render charts and data visualizations as SVG/PNG or interactive embeds.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI agents to generate and render charts as PNG, SVG, or WebP images directly in chat interfaces. Supports Chart.js specifications and natural language descriptions for creating visualizations from data.31MIT
- AlicenseAqualityCmaintenanceEnables AI agents to create data visualizations like bar charts, line charts, pie charts, scatter plots, and histograms, returning inline SVG or PNG files.5MIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI agents to generate beautiful, presentation-ready charts (SVG + PNG) with zero setup, supporting various chart types and styling options.25 npmMIT
- AlicenseBqualityDmaintenanceEnables AI agents to render branded charts as inline images and persistent hosted URLs, supporting explicit chart types and automatic chart suggestion from data.268 npmMIT