🚀 EC2 Hosting Guide

Deploy ChartSmith MCP on AWS EC2 for production hosting.

🎯 Overview

Host ChartSmith MCP on your own AWS EC2 infrastructure to provide chart generation services to multiple users while maintaining full control over performance, security, and costs.

📋 Prerequisites

🖥️ EC2 Instance Setup

Development/Testing

Production

High-Performance

Launch EC2 Instance

  1. Choose AMI: Ubuntu 22.04 LTS
  2. Instance Type: Based on your needs above
  3. Security Group:
    • SSH (22) from your IP
    • HTTP (80) from anywhere
    • HTTPS (443) from anywhere
  4. Storage: SSD with enough space for logs and outputs

🔧 Server Configuration

Initial Setup

# Connect to your instance
ssh -i your-key.pem ubuntu@your-ec2-ip

# Update system
sudo apt update && sudo apt upgrade -y

# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker ubuntu

# Install Docker Compose
# Install Docker Compose plugin (if not present)
sudo apt-get update
sudo apt-get install -y docker-compose-plugin

Install ChartSmith MCP

# Clone the repository
git clone https://github.com/inwookie/chart-mcp.git
cd chart-mcp

# Configure environment
cp env.template .env
nano .env

Configure environment:

CHART_AI_FEATURES=true
CHART_AI_PROVIDER=openai
OPENAI_API_KEY=your-openai-key-here
CHART_MAX_CONCURRENCY=16
HTTP_PORT=8000
HOST=0.0.0.0

Deploy

./deploy.sh production

Your ChartSmith MCP is now ready for production use! 🚀