Skip to main content

plot-vendor-mcp

A FastMCP server that wraps the plot_vendor.py rendering script as a standard MCP tool. Agents can call generate_vendor_chart over the MCP protocol with a JSON payload from virttest ktf vendor_analysis and receive a rendered PNG (file path or base64 data URL).

Features

  • Single tool generate_vendor_chart — accepts the vendor_analysis JSON string, optional output_path, and optional title.
  • Renders normalized horizontal bar charts (per-vendor color palettes, spec-size shading, baseline 1.0× reference line).
  • Self-contained: only depends on fastmcp and matplotlib.
  • Compatible with single-instance, single-spec NvN, and multi-spec NvN payloads.

Install / run locally

# from source
pip install -e .

# verify the server module loads
python -c "from plot_vendor_mcp.server import mcp; print(mcp.name)"

# run the MCP server (stdio transport)
plot-vendor-mcp
# or
python -m plot_vendor_mcp.server

Run via uvx (no install)

uvx plot-vendor-mcp

MCP client configuration

{
  "mcpServers": {
    "plot-vendor": {
      "command": "uvx",
      "args": ["plot-vendor-mcp"]
    }
  }
}

Tool: generate_vendor_chart

Argument Type Description
data string JSON string from virttest ktf vendor_analysis (case_type / instances / baseline_idx / results).
output_path string Optional. PNG output path. When empty the tool returns a base64 data URL.
title string Optional. Custom chart title. When empty the title is auto-generated.

Returns:

  • "Chart saved to: <output_path>" when output_path is set.
  • "data:image/png;base64,<...>" otherwise.

Example payload

{
  "case_type": "cpu",
  "image_version": "CentOS 9 64bit",
  "baseline_idx": 0,
  "instances": [
    {"provider": "aliyun", "instance_type": "ecs.g9i.2xlarge", "label": "阿里云 ecs.g9i.2xlarge"},
    {"provider": "aws", "instance_type": "m8i.2xlarge", "label": "aws m8i.2xlarge"}
  ],
  "results": [
    {"scenario": "unixbench_single_2026", "result_key": "ProcessScore", "desc": "UnixBench单核", "direction": "higher", "values": [1682.5, 1500.0]},
    {"scenario": "crypto_256", "result_key": "Score", "desc": "AES-256加密", "direction": "higher", "values": [4500.0, 4200.0]}
  ]
}

Pipe usage (CLI to MCP client wrapper) is not provided here — the server is intended to be invoked through MCP-aware clients (Claude Desktop, Codex CLI, Aliyun Bailian, etc.).

Metadata

Release files for plot-vendor-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plot-vendor-mcp 0.1.0
File Size Uploaded
plot_vendor_mcp-0.1.0.tar.gz 138.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for plot-vendor-mcp 0.1.0
File Interpreter ABI Platform
plot_vendor_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 148.7 kB

Release files / plot_vendor_mcp-0.1.0.tar.gz

Download URL plot_vendor_mcp-0.1.0.tar.gz
Size 138.1 kB
Tags Source
SHA-256 checksum
How to use checksums
028b211ad0cc686375b8cdbfca27b233f7b2ecdf9cac5c6d9ca1d64ab682ab5d
BLAKE2b-256 checksum
How to use checksums
c9cfd8ce0717ce82e90a5d99fbb5499ebe92a71662ffade485748f826a007c42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / plot_vendor_mcp-0.1.0-py3-none-any.whl

Download URL plot_vendor_mcp-0.1.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
722d0a0b272d3b4716ff7bfd973a42cf1f7ffc0ad9e63ff47fe992a821b6a1fc
BLAKE2b-256 checksum
How to use checksums
ca0ab7545533fce542765d02bed2301823073f7ff432de53f6249062901de6ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page