Skip to main content

MCP server for generating vendor performance comparison charts

Project description

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.).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

plot_vendor_mcp-0.1.0.tar.gz (138.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

plot_vendor_mcp-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file plot_vendor_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: plot_vendor_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 138.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for plot_vendor_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 028b211ad0cc686375b8cdbfca27b233f7b2ecdf9cac5c6d9ca1d64ab682ab5d
MD5 83261b45c00c021af4c61d05d2318206
BLAKE2b-256 c9cfd8ce0717ce82e90a5d99fbb5499ebe92a71662ffade485748f826a007c42

See more details on using hashes here.

File details

Details for the file plot_vendor_mcp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for plot_vendor_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 722d0a0b272d3b4716ff7bfd973a42cf1f7ffc0ad9e63ff47fe992a821b6a1fc
MD5 6045bf4ebb6721ee76f0e8655256d5da
BLAKE2b-256 ca0ab7545533fce542765d02bed2301823073f7ff432de53f6249062901de6ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page