<a href="https://glama.ai/mcp/servers/y17zluizso">
<img width="380" height="200" src="https://gips3.baidu.com/it/u=1203846417,4030730949&fm=3081&app=3081&f=PNG?w=760&h=400" alt="Quickchart-MCP-Server MCP server" />
</a>
<a href="https://smithery.ai/server/@GongRzhe/Quickchart-MCP-Server"><img alt="Smithery Badge" src="https://smithery.ai/badge/@GongRzhe/Quickchart-MCP-Server"></a>
这是一个使用 QuickChart.io 生成图表的 Model Context Protocol 服务器。
这是一个基于 TypeScript 的 MCP 服务器,提供图表生成功能。它允许您通过 MCP 工具创建各种类型的图表。
该服务器与 QuickChart.io 的基于 URL 的图表生成服务集成,使用 Chart.js 配置生成图表图像。用户可以通过提供数据和样式参数来生成各种类型的图表,服务器将这些参数转换为图表 URL 或可下载的图像。
generate_chart - 使用 QuickChart.io 生成图表 URL
download_chart - 将图表图像下载到本地文件
服务器使用 Chart.js 配置格式。这里是一个基本示例:
{
"type": "bar",
"data": {
"labels": ["一月", "二月", "三月"],
"datasets": [{
"label": "销售额",
"data": [65, 59, 80],
"backgroundColor": "rgb(75, 192, 192)"
}]
},
"options": {
"title": {
"display": true,
"text": "每月销售额"
}
}
}
服务器将您的配置转换为 QuickChart URL:
https://quickchart.io/chart?c={...编码后的配置...}
安装依赖项:
npm install
构建服务器:
npm run build
npm install @gongrzhe/quickchart-mcp-server
要通过 Smithery 自动安装 QuickChart Server for Claude Desktop:
npx -y @smithery/cli install @gongrzhe/quickchart-mcp-server --client claude
要在 Claude Desktop 中使用,请添加服务器配置:
在 MacOS 上:~/Library/Application Support/Claude/claude_desktop_config.json
在 Windows 上:%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"quickchart-server": {
"command": "node",
"args": ["/path/to/quickchart-server/build/index.js"]
}
}
}
或
{
"mcpServers": {
"quickchart-server": {
"command": "npx",
"args": [
"-y",
"@gongrzhe/quickchart-mcp-server"
]
}
}
}
本项目采用 MIT 许可证。