Skip to main content
Glama
by sakshi1x

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

charts_visualization/ ├── requirements.txt # Python dependencies ├── README.md # Project documentation ├── src/ │ ├── server.py # FastAPI server and MCP integration │ ├── client.py # Example client for interacting with the server │ ├── charts/ │ │ ├── bar_chart.py # Bar chart generation logic │ │ ├── pie_chart.py # Pie chart generation logic │ │ └── __init__.py │ └── model/ │ └── main.py # Data models and shared logic ├── static/ │ └── charts/ # Generated chart images (PNG)

Setup

  1. Clone the repository:

    git clone <repo-url> cd charts_visualization
  2. Create a virtual environment and install dependencies:

    python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt

Running the Server

Start the FastAPI server (from the project root):

python src/server.py

Or with Uvicorn:

uvicorn src.server:app --host 0.0.0.0 --port 8000 uv run python server.py

for inspection :

uv run mcp dev server.py

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 like http://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

-
security - not tested
F
license - not found
-
quality - not tested

Related MCP Servers

  • A
    security
    A
    license
    A
    quality
    An MCP server for generating customizable data visualizations using QuickChart.io, supporting multiple chart types and Chart.js configuration.
    Last updated -
    2
    386
    153
    MIT License
    • Apple
  • -
    security
    -
    license
    -
    quality
    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.
  • -
    security
    F
    license
    -
    quality
    A Model Context Protocol server that generates beautiful chart images from ECharts configurations, supporting various chart types with customizable dimensions.
    Last updated -
    1
    5
  • A
    security
    A
    license
    A
    quality
    Generates Apache ECharts diagrams and charts with AI dynamically, supporting all ECharts features and exporting to png, svg, and option formats.
    Last updated -
    17
    148
    154
    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/sakshi1x/mcp_visualization'

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