chartsplat-mcp
v1.0.0
Published
Model Context Protocol (MCP) server for Chart Splat
Downloads
95
Maintainers
Readme
chartsplat-mcp
Model Context Protocol (MCP) server for Chart Splat. Generate charts directly from AI agents like Claude Desktop, OpenClaw, and other MCP clients.
Installation
npm install chartsplat-mcpUsage
With Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"chartsplat": {
"command": "npx",
"args": ["-y", "chartsplat-mcp"],
"env": {
"CHARTSPLAT_API_KEY": "your-api-key-here"
}
}
}
}With OpenClaw
Add to your OpenClaw agent config:
{
"mcpServers": {
"chartsplat": {
"command": "npx",
"args": ["-y", "chartsplat-mcp"],
"env": {
"CHARTSPLAT_API_KEY": "your-api-key-here"
}
}
}
}Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| CHARTSPLAT_API_KEY | Yes | Your Chart Splat API key |
| CHARTSPLAT_API_URL | No | API base URL (default: https://api.chartsplat.com) |
Available Tools
generate_chart
Generate any type of chart with full configuration.
Parameters:
- type: "line" | "bar" | "pie" | "doughnut" | "radar" | "polarArea"
- labels: string[] - Labels for X-axis or segments
- datasets: Array of { label?, data: number[], backgroundColor?, borderColor? }
- title?: string - Chart title
- width?: number - Image width (default: 800)
- height?: number - Image height (default: 600)
Returns: base64-encoded PNG imageConvenience Tools
Each chart type has a dedicated tool for easier use:
line_chart- Generate a line chartbar_chart- Generate a bar chartpie_chart- Generate a pie chartdoughnut_chart- Generate a doughnut chartradar_chart- Generate a radar chart
Example
In Claude Desktop or any MCP client:
You: Create a bar chart showing Q1-Q4 revenue: 50, 75, 60, 90
Claude: [Uses bar_chart tool and displays the generated chart]Development
# Install dependencies
npm install
# Build
npm run build
# Run locally
CHARTSPLAT_API_KEY=your-key npm run devLicense
MIT
