Quickchart MCP Server
An MCP server for generating customizable data visualizations using QuickChart.io, supporting multiple chart types and Chart.js configuration.
An MCP server for generating customizable data visualizations using QuickChart.io, supporting multiple chart types and Chart.js configuration.
A Model Context Protocol server for generating charts using QuickChart.io
This is a TypeScript-based MCP server that provides chart generation capabilities. It allows you to create various types of charts through MCP tools.
This server integrates with QuickChart.io's URL-based chart generation service to create chart images using Chart.js configurations. Users can generate various types of charts by providing data and styling parameters, which the server converts into chart URLs or downloadable images.
generate_chart
- Generate a chart URL using QuickChart.ioReturns a URL to the generated chart
download_chart
- Download a chart image to a local file
The server uses Chart.js configuration format. Here's a basic example:
{
"type": "bar",
"data": {
"labels": ["January", "February", "March"],
"datasets": [{
"label": "Sales",
"data": [65, 59, 80],
"backgroundColor": "rgb(75, 192, 192)"
}]
},
"options": {
"title": {
"display": true,
"text": "Monthly Sales"
}
}
}
The server converts your configuration into a QuickChart URL:
https://quickchart.io/chart?c={...encoded configuration...}
Install dependencies:
npm install
Build the server:
npm run build
npm install @gongrzhe/quickchart-mcp-server
To install QuickChart Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @gongrzhe/quickchart-mcp-server --client claude
To use with Claude Desktop, add the server config:
On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"quickchart-server": {
"command": "node",
"args": ["/path/to/quickchart-server/build/index.js"]
}
}
}
or
{
"mcpServers": {
"quickchart-server": {
"command": "npx",
"args": [
"-y",
"@gongrzhe/quickchart-mcp-server"
]
}
}
}
This project is licensed under the MIT License.
[
{
"description": "Generate a chart using QuickChart",
"inputSchema": {
"properties": {
"datasets": {
"items": {
"properties": {
"additionalConfig": {
"type": "object"
},
"backgroundColor": {
"oneOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
]
},
"borderColor": {
"oneOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
]
},
"data": {
"type": "array"
},
"label": {
"type": "string"
}
},
"required": [
"data"
],
"type": "object"
},
"type": "array"
},
"labels": {
"description": "Labels for data points",
"items": {
"type": "string"
},
"type": "array"
},
"options": {
"type": "object"
},
"title": {
"type": "string"
},
"type": {
"description": "Chart type (bar, line, pie, doughnut, radar, polarArea, scatter, bubble, radialGauge, speedometer)",
"type": "string"
}
},
"required": [
"type",
"datasets"
],
"type": "object"
},
"name": "generate_chart"
},
{
"description": "Download a chart image to a local file",
"inputSchema": {
"properties": {
"config": {
"description": "Chart configuration object",
"type": "object"
},
"outputPath": {
"description": "Path where the chart image should be saved",
"type": "string"
}
},
"required": [
"config",
"outputPath"
],
"type": "object"
},
"name": "download_chart"
}
]