mcpField
C
ChartMCP

ChartMCP

Local
github.com/doramartData & Analytics2Updated 82w ago

About ChartMCP

ChartMCP is an MCP server that generates chart configurations from data sources using a user prompt. It supports common file formats and several databases, and can analyze and process data automatically.

Key features

  1. 01Read CSV, XLSX, XLS, and JSON
  2. 02Connect to MySQL, SQLite, and MariaDB
  3. 03Generate chart configurations from prompts
  4. 04Support bar, line, and pie charts
  5. 05Analyze and process data

Use cases

  1. 01Create a chart configuration from a data resource
  2. 02Choose a chart type based on a prompt

MCP support

ChartMCP exposes the `generate_chart` tool to MCP clients. It accepts a `dataResource` URI and a prompt, then returns a chart configuration.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"chart": {
"command": "npx",
"args": [
"-y",
"build/index.js"
],
"env": {
"API_KEY": "<API_KEY>",
"BASE_URL": "<BASE_URL>",
"AI_MODEL": "<AI_MODEL>",
"MAX_FILE_SIZE": "<MAX_FILE_SIZE>",
"UPLOAD_DIR": "<UPLOAD_DIR>"
}
}
}
}
Run commandnpx -y build/index.js
Environment variables to set
API_KEYSecret
BASE_URL
AI_MODEL
MAX_FILE_SIZE
UPLOAD_DIR

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmbuild/index.js

Tools

No tool list yet

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 MCP Server

基于 MCP 协议的图表生成服务器,支持从各种数据源读取数据并生成图表配置。

功能特点

  • 支持多种数据源:
    • 文件格式:CSV、XLSX、XLS、JSON
    • 数据库:MySQL、SQLite、MariaDB
  • 智能图表生成:
    • 基于用户提示词生成合适的图表
    • 支持多种图表类型(柱状图、折线图、饼图等)
    • 自动进行数据分析和处理

发布到 mcp.so

  1. 确保已安装 Node.js (v18+)
  2. 安装依赖:
npm install
  1. 构建项目:
npm run build
  1. 按照 mcp.so 的发布向导上传项目

API 说明

服务器提供以下 MCP 工具:

  1. generate_chart
    • 参数:
      • dataResource: 数据资源 URI (格式: data://{filename})
      • prompt: 图表生成提示词
    • 功能:根据数据和提示词生成图表配置

环境变量配置

发布到 mcp.so 时,需要在平台配置以下环境变量:

  • UPLOAD_DIR: 文件上传目录
  • (其他数据库相关变量根据需要配置)

许可证

MIT

Comments

Markdown supported

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.