qnnpnet/chart-mcp-server
If you are the rightful owner of chart-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This is a MCP Server for generating chart images from Python code.
MCP Server for Generating Chart Image (FastMCP + FastAPI)
This is a MCP Server for generating chart images from Python code
Requirements
- Python 3.11+
- FastMCP
- FastAPI
- uvicorn
- python-dotenv
- requests
- matplotlib
Usage
$ git clone https://github.com/qnnpnet/chart-mcp-server.git
$ cd chart-mcp-server
$ uv sync
$ uv run main.py
Generate Chart Image
$ curl -X POST http://localhost:8107/generate_chart \
-H "Content-Type: application/json" \
-d '{"code": "import matplotlib.pyplot as plt\nplt.plot([1,2,3],[4,5,6])\nplt.title(\"My Chart\")"}'
Response
{ "image_url": "http://localhost:8107/static/images/20250419160332_d8b758e9.png" }