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, optionaloutput_path, and optionaltitle. - Renders normalized horizontal bar charts (per-vendor color palettes, spec-size shading, baseline 1.0× reference line).
- Self-contained: only depends on
fastmcpandmatplotlib. - 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>"whenoutput_pathis 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
028b211ad0cc686375b8cdbfca27b233f7b2ecdf9cac5c6d9ca1d64ab682ab5d
|
|
| MD5 |
83261b45c00c021af4c61d05d2318206
|
|
| BLAKE2b-256 |
c9cfd8ce0717ce82e90a5d99fbb5499ebe92a71662ffade485748f826a007c42
|
File details
Details for the file plot_vendor_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: plot_vendor_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
722d0a0b272d3b4716ff7bfd973a42cf1f7ffc0ad9e63ff47fe992a821b6a1fc
|
|
| MD5 |
6045bf4ebb6721ee76f0e8655256d5da
|
|
| BLAKE2b-256 |
ca0ab7545533fce542765d02bed2301823073f7ff432de53f6249062901de6ad
|