Charts Visualization
This project provides a web-based service for generating and visualizing bar and pie charts from structured data using FastAPI and Altair. Charts are generated as PNG images and served via a REST API.
Features
- Generate bar and pie charts from input data
- Save charts as PNG images in a static directory
- Access generated charts via unique URLs
- Extensible with new chart types
Project Structure
Setup
- Clone the repository:
- Create a virtual environment and install dependencies:
Running the Server
Start the FastAPI server (from the project root):
Or with Uvicorn:
for inspection :
Usage
- Use the provided client (
src/client.py
) or send requests to the/mcp
endpoint to generate charts. - Generated charts are saved in
static/charts/
and accessible via URLs likehttp://localhost:8000/static/charts/<chart_id>.png
.
Requirements
- Python 3.9+
- FastAPI
- Uvicorn
- Altair
- (See
requirements.txt
for full list)
Extending
To add new chart types, implement a new function in src/charts/
, register it as an MCP tool in src/server.py
, and update the client as needed.
License
MIT License
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables generation and visualization of bar and pie charts from structured data using FastAPI and Altair. Charts are saved as PNG images and served via REST API endpoints with unique URLs.
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server for generating customizable data visualizations using QuickChart.io, supporting multiple chart types and Chart.js configuration.Last updated -2232144MIT License
- AsecurityFlicenseAqualityA 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.Last updated -513
- -securityFlicense-qualityA Model Context Protocol server that generates beautiful chart images from ECharts configurations, supporting various chart types with customizable dimensions.Last updated -45
- AsecurityAlicenseAqualityGenerates Apache ECharts diagrams and charts with AI dynamically, supporting all ECharts features and exporting to png, svg, and option formats.Last updated -1710578MIT License