About 图表生成mcp
A Python chart-generation tool that creates line, bar, and pie charts with matplotlib. It is for MCP clients that need chart output as a URL or Base64 data, with optional object-storage upload.
Key features
- 01Line, bar, and pie charts
- 02matplotlib rendering
- 03Object-storage upload
- 04Base64 output fallback
- 05Streamable transport
Use cases
- 01Generating charts from data for an MCP client
- 02Returning chart images as URLs or Base64 data
MCP support
Provides a standard MCP interface for external clients to request chart generation. It uses Streamable transport by default.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project README图表生成工具 (Chart Generator Tool)
简介
这是一个基于 Python 的图表生成工具,支持生成折线图、柱状图和饼状图。 该工具使用 matplotlib 作为图表渲染引擎,并集成了对象存储功能,可以将生成的图表上传到云端,返回给AI一个URL或Base64格式的数据。
默认使用 Streamable 传输。
功能特性
- 多种图表类型:支持折线图、柱状图和饼状图
- MCP 接口:提供标准 MCP 接口供外部调用
- 存储选项:支持上传到MinIo(同时支持七牛云OSS和阿里云OSS)或返回 Base64 编码
安装与配置
环境要求
- Python 3.7+
- matplotlib
- pandas
- numpy
- python-dotenv
- fastmcp
- minio (MinIO SDK)
- alibabacloud_oss_v2 ( 阿里云 SDK)
- qiniu (七牛云 SDK )
安装依赖:
pip install -r requirements.txt
配置OSS(可选)
如果未配置OSS或不可用,会自动输出Base64数据,以确保兼容性。
.env 文件并配置OSS相关信息:
OSS_TYPE=aliyun minio qiniu
# MinIo 或 七牛云
DOMAIN=域名
BUCKET_NAME=桶名称
ACCESS_KEY=公钥
SECRET_KEY=私钥
# 阿里云
REGION=阿里云服务器地域ID([从这里查看服务器区域对应的地域ID](https://help.aliyun.com/zh/oss/user-guide/regions-and-endpoints))
OSS_ACCESS_KEY_ID=阿里云公钥
OSS_ACCESS_KEY_SECRET=阿里云私钥
#文件路径
PREFIX=
使用方法
启动服务
python main.py --host 0.0.0.0 --port 8000
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.