vvk-charts-mcp

vvk-charts-mcp

A modern Python MCP server for rendering customizable charts (line, bar, pie, scatter, area, combined dashboards) with Plotly, supporting export to PNG, SVG, and base64, and terminal charts with ANSI output.

Category
访问服务器

README

vvk-charts-mcp

<p> <a href="https://github.com/valderan/vvk-charts-mcp/blob/main/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-0ea5e9" /></a> <img alt="Python 3.10+" src="https://img.shields.io/badge/python-3.10%2B-2563eb" /> <img alt="MCP" src="https://img.shields.io/badge/MCP-enabled-10b981" /> <img alt="Plotly" src="https://img.shields.io/badge/Plotly-modern%20charts-7c3aed" /> </p>

Documentation language:

Modern Python MCP server for rendering charts and diagrams (line, bar, pie, scatter, area, and combined dashboard) with customizable themes and export to PNG/SVG/base64.

<p align="center"> <img src="demo/demo_combined_dark_corporate.png" alt="Dark corporate combined dashboard example" width="560" /> <br /> <em>Example output: dark corporate combined dashboard generated by the MCP tool.</em> </p>

Table of contents

Features

  • MCP tools for single charts and mixed dashboards.
  • Terminal chart tools with ANSI rendering and monochrome fallback.
  • Modern Plotly styling with full theme customization.
  • Works with multi-series and larger datasets.
  • Export formats: png, svg, base64.
  • Interactive CLI test client with predefined templates.

Quick start

Install from GitHub with uvx:

uvx install git+https://github.com/valderan/vvk-charts-mcp.git

Run MCP server:

uvx run vvk-charts-mcp

Run interactive test client:

uvx run vvk-charts-cli

The CLI asks what to draw, where to save, output format, and image size.

Tip: set output mode to terminal in vvk-charts-cli to preview console dashboards.

MCP tools

Tool Purpose
list_theme_presets Lists available image/terminal themes
create_line_chart Trends over time
create_bar_chart Category comparison
create_pie_chart Part-to-whole split
create_scatter_chart Correlation and bubble plots
create_area_chart Stacked/cumulative composition
create_combined_dashboard Multiple chart types in one image
create_terminal_chart ANSI/mono chart output for terminal clients
create_terminal_dashboard Multi-panel terminal dashboard as plain text

Common options supported by all tools:

  • theme_preset, theme, title, width, height
  • format (png, svg, base64)
  • filename, save_to_disk

Image tools always return chat preview (ImageContent). To save files, set save_to_disk: true and configure OUTPUT_DIR in MCP env.

Theme presets

Use list_theme_presets to get all available theme names at runtime.

Image theme presets:

  • clean_light (default)
  • dark_corporate
  • pastel_startup
  • medical_monitor

Terminal theme presets:

  • dark_corporate_cli (default)
  • pastel_startup_cli

Example request:

{
  "tool": "list_theme_presets",
  "arguments": {}
}

Combined dashboard payload example

{
  "title": "Marketing Dashboard",
  "rows": 1,
  "cols": 2,
  "theme_preset": "dark_corporate",
  "format": "png",
  "save_to_disk": true,
  "filename": "combined_dashboard",
  "panels": [
    {
      "type": "line",
      "row": 1,
      "col": 1,
      "title": "Revenue Trend",
      "x_label": "Month",
      "y_label": "k USD",
      "data": [
        {
          "name": "Revenue",
          "x": ["Jan", "Feb", "Mar", "Apr"],
          "y": [120, 132, 148, 160]
        }
      ],
      "options": {
        "line_shape": "spline"
      }
    },
    {
      "type": "pie",
      "row": 1,
      "col": 2,
      "title": "Budget Split",
      "data": [
        {
          "labels": ["Search", "Social", "Email"],
          "values": [45, 35, 20]
        }
      ],
      "options": {
        "hole": 0.45
      }
    }
  ]
}

Terminal chart payload example

{
  "tool": "create_terminal_chart",
  "arguments": {
    "type": "line",
    "title": "Revenue Trend (CLI)",
    "x_label": "Month",
    "y_label": "k USD",
    "theme": "dark_corporate_cli",
    "use_color": true,
    "force_mono": false,
    "raw_output": true,
    "data": [
      {
        "name": "Revenue",
        "x": ["Jan", "Feb", "Mar", "Apr", "May"],
        "y": [120, 132, 148, 160, 178]
      }
    ]
  }
}

raw_output: true is recommended for terminal clients: tool returns only chart text (no JSON wrapper).

Image save behavior (OUTPUT_DIR)

  • save_to_disk: false (default): no file is written, preview is returned to chat.
  • save_to_disk: true and OUTPUT_DIR is set: file is saved only into OUTPUT_DIR.
  • save_to_disk: true and OUTPUT_DIR is not set: no error, preview only (saved=false in metadata).
  • output_path is not supported.

Example MCP config fragment:

{
  "mcp": {
    "vvkcharts": {
      "type": "local",
      "enabled": true,
      "command": ["uvx", "--from", "git+https://github.com/valderan/vvk-charts-mcp.git", "vvk-charts-mcp"],
      "env": {
        "OUTPUT_DIR": "./output"
      }
    }
  }
}

Demo gallery

<p> <img src="demo/demo_combined_showcase.png" alt="Combined dashboard showcase" width="420" /> <img src="demo/demo_combined_dark_corporate.png" alt="Dark corporate dashboard" width="420" /> <img src="demo/demo_combined_pastel_startup.png" alt="Pastel startup dashboard" width="420" /> </p>

<p> <img src="demo/demo_line_chart.png" alt="Line chart demo" width="270" /> <img src="demo/demo_bar_chart.png" alt="Bar chart demo" width="270" /> <img src="demo/demo_pie_chart.png" alt="Pie chart demo" width="270" /> <img src="demo/demo_scatter_chart.png" alt="Scatter chart demo" width="270" /> <img src="demo/demo_area_chart.png" alt="Area chart demo" width="270" /> </p>

AI presets (skill and agent)

Repository includes reusable AI presets in ai/:

  • ai/vvk-charts-skill.md - skill instructions for chart payload building.
  • ai/vvk-charts-agent.md - chart-specialized subagent profile.

Use whichever workflow is more convenient.

OpenCode setup (detailed)

1) Add this MCP server

Create or edit opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "vvkcharts": {
      "type": "local",
      "enabled": true,
      "command": [
        "uvx",
        "--from",
        "git+https://github.com/valderan/vvk-charts-mcp.git",
        "vvk-charts-mcp"
      ]
    }
  }
}

2) Install as an OpenCode skill

mkdir -p .opencode/skills/vvk-charts-mcp
cp ai/vvk-charts-skill.md .opencode/skills/vvk-charts-mcp/SKILL.md

3) Install as an OpenCode agent

mkdir -p .opencode/agents
cp ai/vvk-charts-agent.md .opencode/agents/vvk-charts.md

4) Verify

  • Start opencode in this repository.
  • Ensure vvkcharts_* tools are visible.
  • Test prompt: Build a monthly revenue line chart and save as png in ./output using vvkcharts.

References:

  • https://opencode.ai/docs/mcp-servers/
  • https://opencode.ai/docs/skills/
  • https://opencode.ai/docs/agents/

Codex setup (detailed)

Codex-compatible clients may vary, but this flow works in MCP-enabled environments.

1) Register MCP server

uvx --from git+https://github.com/valderan/vvk-charts-mcp.git vvk-charts-mcp

Typical JSON shape used by many clients:

{
  "mcpServers": {
    "vvkcharts": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/valderan/vvk-charts-mcp.git",
        "vvk-charts-mcp"
      ]
    }
  }
}

2) Reuse skill and agent presets

  • Use ai/vvk-charts-skill.md as a reusable prompt template.
  • Use ai/vvk-charts-agent.md as a dedicated chart profile/system prompt.

3) Verify

Run a request like:

Use vvkcharts tools to generate a bar chart and save it to ./output/sales-q1.png.

Local development

uv sync
uv run ruff check .
uv run mypy src

Repository

  • https://github.com/valderan/vvk-charts-mcp

Русская версия документации: README_ru.md

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选