Skip to main content
Glama

MCP Chart Server

by wubbyweb
190
  • Apple

MCP Chart Server

A Model Context Protocol (MCP) server that integrates with Chart-IMG API to generate TradingView chart visualizations using Server-Sent Events (SSE) for real-time updates.

Features

  • Real-time Chart Generation: Generate TradingView charts with live progress updates
  • MCP Protocol Support: Works with Claude Desktop, Cline, and other MCP clients
  • SSE Integration: Real-time event streaming for chart generation progress
  • Professional Web Interface: Built-in API testing interface with live preview
  • Comprehensive API: Full REST API with status tracking and event history

Quick Start

1. Get API Key

Register at chart-img.com to get your free API key.

2. Setup Environment

# Clone and setup git clone <your-repo> cd mcp-chart-server npm install # Set API key echo "CHART_IMG_API_KEY=your_api_key_here" > .env

3. Run the Server

# Web interface (development) npm run dev # Access: http://localhost:5000 # MCP server (for clients) npx tsx mcp-server.ts

MCP Client Configuration

Claude Desktop

Add to claude_desktop_config.json:

{ "mcpServers": { "chart-server": { "command": "npx", "args": ["tsx", "mcp-server.ts"], "cwd": "/path/to/mcp-chart-server", "env": { "CHART_IMG_API_KEY": "your_api_key" } } } }

Config File Locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Cline/Continue

Similar configuration in your MCP settings.

Available Tools

generate_chart

Generate TradingView charts with customizable parameters.

Example:

{ "symbol": "NASDAQ:AAPL", "interval": "1D", "chartType": "candlestick", "width": 800, "height": 600, "indicators": [ {"type": "sma", "period": 20}, {"type": "rsi", "period": 14} ] }

get_chart_status

Check generation progress and retrieve completed charts.

get_available_symbols

List available trading symbols from Chart-IMG API.

get_recent_requests

View recent chart generation history.

health_check

Verify API configuration and service status.

Supported Chart Types

  • Candlestick - Traditional OHLC candles
  • Line - Simple price line
  • Area - Filled area chart
  • Bar - OHLC bars
  • Heikin Ashi - Modified candlesticks

Technical Indicators

  • Moving Averages: SMA, EMA, WMA
  • Oscillators: RSI, MACD, Stochastic
  • Bollinger Bands
  • Volume indicators
  • And many more from TradingView

Symbol Format

Use TradingView symbol format: EXCHANGE:SYMBOL

Examples:

  • NASDAQ:AAPL - Apple Inc.
  • NYSE:TSLA - Tesla Inc.
  • BINANCE:BTCUSDT - Bitcoin/USDT
  • FOREX:EURUSD - EUR/USD pair

Rate Limits

Depends on your Chart-IMG subscription:

  • Basic: 1 req/sec, 50/day
  • Pro: 10 req/sec, 500/day
  • Mega: 15 req/sec, 1000/day
  • Ultra: 35 req/sec, 3000/day

Web Interface

Access the built-in interface at http://localhost:5000 for:

  • Interactive API testing
  • Real-time SSE event monitoring
  • Chart preview and download
  • Request/response inspection

API Endpoints

  • POST /api/v2/chart/generate - Generate chart
  • GET /api/v2/chart/status/:id - Check status
  • GET /api/v2/symbols - Available symbols
  • GET /api/v2/events - SSE connection
  • GET /api/health - Health check

Troubleshooting

Missing API Key

Error: CHART_IMG_API_KEY not found Solution: Set environment variable or .env file

Invalid Symbol

Error: Symbol not found Solution: Use EXCHANGE:SYMBOL format (e.g., NASDAQ:AAPL)

Rate Limited

Error: Too many requests Solution: Check your Chart-IMG plan limits

Development

# Start web server npm run dev # Run MCP server npx tsx mcp-server.ts # Type checking npm run check

License

MIT License - see LICENSE file for details.

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

A Model Context Protocol server that generates TradingView chart visualizations with real-time updates, enabling AI assistants to create and display financial charts through an integration with Chart-IMG API.

  1. Features
    1. Quick Start
      1. Get API Key
      2. Setup Environment
      3. Run the Server
    2. MCP Client Configuration
      1. Claude Desktop
      2. Cline/Continue
    3. Available Tools
      1. generate_chart
      2. get_chart_status
      3. get_available_symbols
      4. get_recent_requests
      5. health_check
    4. Supported Chart Types
      1. Technical Indicators
        1. Symbol Format
          1. Rate Limits
            1. Web Interface
              1. API Endpoints
                1. Troubleshooting
                  1. Development
                    1. License

                      Related MCP Servers

                      • A
                        security
                        F
                        license
                        A
                        quality
                        A Model Context Protocol server that enables AI assistants to interact with the Deriv trading API, providing access to active trading symbols and account balance information.
                        Last updated -
                        2
                        Python
                        • Apple
                      • -
                        security
                        A
                        license
                        -
                        quality
                        A Model Context Protocol server that enables interaction with the Tradovate API for managing trading contracts, positions, orders, and accounts.
                        Last updated -
                        JavaScript
                        MIT License
                      • -
                        security
                        F
                        license
                        -
                        quality
                        A Model Context Protocol server that enables AI models to create and manipulate PowerPoint presentations with advanced features like financial charts, formatting, and template management.
                        Last updated -
                        1
                        Python
                      • A
                        security
                        A
                        license
                        A
                        quality
                        mcp-server-chart
                        Last updated -
                        4
                        2,183
                        988
                        TypeScript
                        MIT License
                        • Apple

                      View all related MCP servers

                      MCP directory API

                      We provide all the information about MCP servers via our MCP API.

                      curl -X GET 'https://glama.ai/api/mcp/v1/servers/wubbyweb/MCPChartServer'

                      If you have feedback or need assistance with the MCP directory API, please join our Discord server