The following steps are required to configure mcp-echarts to use the MinIO object storage service:
- Start the MinIO service: Deploy MinIO locally or on a server (macOS is available via the
brew install minio/stable/minio
(Installation) - Creating an Environment Configuration: Create the following in the mcp-echarts project root directory
.env
file (available from.env.example
(Reproduction) - Refinement of configuration information: in
.env
Fill in the MinIO connection parameters in theMINIO_ENDPOINT=localhost MINIO_PORT=9000 MINIO_USE_SSL=false MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin MINIO_BUCKET_NAME=mcp-echarts
- Creating Storage Buckets: Ensure that the configured
MINIO_BUCKET_NAME
Already created in MinIO
Once configured, mcp-echarts uploads the generated charts to MinIO and returns image URLs instead of Base64 data. This solution significantly improves transfer efficiency:
- Image URLs more than 100 times smaller than Base64
- Support for direct sharing and embedding into various documents
- Automatically downgrades to Base64 mode on failure to ensure service robustness
This answer comes from the articleMCP ECharts: MCP tool for generating ECharts visualization chartsThe