Sponsored by Deepsite.site

Mcp Chart Server

Created By
KamranBiglari6 months ago
A Model Context Protocol (MCP) server that provides comprehensive chart generation capabilities. This server offers a wide variety of chart types with comprehensive Zod schema validation for type-safe chart configuration.
Content

MCP Chart Server

A Model Context Protocol (MCP) server that provides comprehensive chart generation capabilities. This server offers a wide variety of chart types with comprehensive Zod schema validation for type-safe chart configuration.

Claude.AI Integration (Free Running Version)

For immediate use with Claude.AI without local setup, use these public endpoints:

  • Streamable HTTP: https://chart.mcp.cloudcertainty.com/mcp
  • Server-Sent Events: https://chart.mcp.cloudcertainty.com/sse

Simply add either endpoint to your Claude.AI MCP configuration to start generating charts immediately.

Claude AI

Features

  • 🎯 15+ Chart Types - Comprehensive chart library covering all major visualization needs
  • 🔒 Type Safety - Full Zod schema validation for all chart configurations
  • 🌐 Multiple Deployment Options - Local server, HTTP streaming, and SSE endpoints
  • 🚀 Claude.AI Integration - Ready-to-use endpoints for Claude.AI integration
  • 📊 Professional Charts - Support for financial, statistical, and business visualizations

Chart Types Supported

Basic Charts

  • Bar Chart - Traditional bar charts with multiple datasets
  • Line Chart - Line charts with customizable styling and fill options
  • Pie Chart - Pie charts with hover effects and custom colors
  • Radar Chart - Multi-axis radar charts for comparative analysis
  • Polar Area Chart - Radial area charts for cyclical data

Advanced Charts

  • Doughnut Chart - Enhanced pie charts with center labels and semi-circle support
  • Scatter Plot - X/Y coordinate plotting with optional trend lines
  • Bubble Chart - Three-dimensional data visualization with bubble sizes
  • OHLC Chart - Financial candlestick charts with volume and indicators

Specialized Charts

  • Violin Plot - Statistical distribution visualization
  • Gauge Chart - Customizable gauge meters with thresholds
  • Radial Gauge - Simple radial progress indicators
  • Progress Bar - Linear progress indicators
  • Sparkline - Minimal trend visualization
  • Sankey Diagram - Flow and process visualization

Quick Start

Local Development

  1. Clone the repository

    git clone https://github.com/KamranBiglari/mcp-server-chart.git
    cd mcp-server-chart
    
  2. Install dependencies

    npm install
    
  3. Build the project

    npm run build
    
  4. Run the server

    npm start
    

Usage Examples

Basic Bar Chart

{
  "type": "bar",
  "data": {
    "labels": ["January", "February", "March", "April", "May"],
    "datasets": [
      { "label": "Sales", "data": [50, 60, 70, 180, 190] },
      { "label": "Expenses", "data": [100, 200, 300, 400, 500] }
    ]
  }
}

Financial OHLC Chart

{
  "type": "ohlc",
  "data": {
    "datasets": [
      {
        "label": "MSFT",
        "data": [
          {"x": 1459468800000, "o": 18.23, "h": 19.36, "l": 18.18, "c": 19.31}
        ],
        "color": {"up": "#26a69a", "down": "#ef5350", "unchanged": "#999"}
      }
    ]
  }
}

Advanced Doughnut Chart

{
  "type": "doughnut",
  "data": {
    "labels": ["Complete", "Remaining"],
    "datasets": [{"data": [75, 25], "backgroundColor": ["#4CAF50", "#E0E0E0"]}]
  },
  "options": {
    "circumference": 3.14159,
    "rotation": 3.14159,
    "plugins": {
      "doughnutlabel": {
        "labels": [{"text": "75%", "font": {"size": 24}}]
      }
    }
  }
}

Scatter Plot

{
  "type": "scatter",
  "data": {
    "datasets": [
      {
        "label": "Dataset 1",
        "data": [
          {"x": 2, "y": 4},
          {"x": 3, "y": 3},
          {"x": 5, "y": 8}
        ]
      }
    ]
  }
}

Configuration

MCP Client Configuration

Add to your MCP client configuration:

{
  "mcpServers": {
    "chart-server": {
      "command": "node",
      "args": ["path/to/mcp-server-chart/dist/index.js"]
    }
  }
}

Claude.AI Configuration

For Claude.AI integration, add one of these endpoints:

{
  "mcpServers": {
    "chart-server": {
      "url": "https://chart.mcp.cloudcertainty.com/mcp"
    }
  }
}

Development

Project Structure

src/
├── charts/           # Chart type definitions
│   ├── bar.ts       # Bar chart schema
│   ├── line.ts      # Line chart schema
│   ├── ohlc.ts      # OHLC chart schema
│   └── ...          # Other chart types
├── utils/           # Utility functions
│   ├── index.ts     # Zod to JSON schema conversion
│   └── schema.ts    # Common schema definitions
└── index.ts         # Main MCP server

Building

npm run build      # Build TypeScript
npm run dev        # Development mode with watch
npm run lint       # Run linting

Testing

npm test           # Run test suite
npm run test:watch # Watch mode testing

Chart Type Reference

Chart TypeUse CaseData Format
barCategorical comparisons{labels: string[], datasets: {data: number[]}[]}
lineTrends over time{labels: string[], datasets: {data: number[]}[]}
piePart-to-whole relationships{labels: string[], datasets: {data: number[]}[]}
doughnutEnhanced pie charts{labels: string[], datasets: {data: number[]}[]}
radarMulti-variable comparison{labels: string[], datasets: {data: number[]}[]}
polarAreaCyclical data{labels: string[], datasets: {data: number[]}[]}
scatterCorrelation analysis{datasets: {data: {x: number, y: number}[]}[]}
bubbleThree-dimensional data{datasets: {data: {x: number, y: number, r: number}[]}[]}
ohlcFinancial data{datasets: {data: {x: number, o: number, h: number, l: number, c: number}[]}[]}
violinStatistical distributions{labels: string[], datasets: {data: number[][]}[]}
gaugeKPI dashboards{datasets: {value: number, data: number[]}[]}
sankeyProcess flows{datasets: {data: {from: string, to: string, flow: number}[]}[]}

API Reference

Tools Available

All chart types are available as MCP tools with the following pattern:

  • Tool name matches chart type (e.g., bar, line, ohlc)
  • Input schema validates chart configuration
  • Returns generated chart data

Schema Validation

Every chart type includes comprehensive Zod schemas that validate:

  • Chart type and structure
  • Data format and types
  • Styling options
  • Chart-specific configurations

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Add your chart type or improvement
  4. Include tests and documentation
  5. Submit a pull request

License

MIT License - see LICENSE file for details

Support

  • 📚 Documentation: Check the inline schema documentation
  • 🐛 Issues: Report bugs via GitHub Issues
  • 💬 Discussions: Use GitHub Discussions for questions
  • 🌐 Live Demo: Try the public endpoints with Claude.AI

Roadmap

  • Real-time data binding
  • Custom theme support
  • Export formats (PNG, SVG, PDF)
  • Animation and interaction options
  • Dashboard layout compositions

Server Config

{
  "mcpServers": {
    "chart-server": {
      "command": "node",
      "args": [
        "path/to/mcp-server-chart/dist/index.js"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
ChatWiseThe second fastest AI chatbot™
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Playwright McpPlaywright MCP server
Serper MCP ServerA Serper MCP Server
Amap Maps高德地图官方 MCP Server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
DeepChatYour AI Partner on Desktop
Tavily Mcp
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
WindsurfThe new purpose-built IDE to harness magic
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
CursorThe AI Code Editor
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code