Skip to main content
Glama

dataviz-mcp

A Model Context Protocol server that gives AI assistants charts: 120+ chart types — statistics, machine learning, finance, genomics, maps, 3D surfaces and molecules — drawn in milliseconds by dataviz and returned as PNG images (plus a text summary), so the assistant can look at a chart, refine it and show it.

One small binary, stdio transport, no Python or browser.

Claude Code

Install the plugin (it installs this server on first use):

/plugin marketplace add dataviz-rs/dataviz
/plugin install dataviz@dataviz

Related MCP server: MCP ECharts

Any MCP client

cargo install dataviz-mcp
{ "mcpServers": { "dataviz": { "command": "dataviz-mcp" } } }

Docker

docker build -t dataviz-mcp mcp/
docker run -i --rm -v "$PWD:/data" dataviz-mcp   # stdio; saved charts land in the mounted folder

Tools

Tool

What it does

plot

A figure from a JSON spec: panels, each with a type (44 types: line, scatter, area, bar, barh, hist, kde, box, violin, swarm, raincloud, ridgeline, regression, heatmap, contour, pie, radar, funnel, waffle, sankey, chord, streamgraph, bullet, dumbbell, slope, pareto, control_chart, candlestick, roc, calibration, confusion, upset, volcano, phylo_tree, choropleth, surface, scatter3d, line3d, dna_helix, molecule) and options (titles, labels, limits, log axes, legend, 3D camera and rotation)

plot_file

A chart of a CSV/TSV/JSON file: auto, line, scatter, bar, hist, box, violin or correlation matrix

molecule

A PDB structure (pdb_id downloaded from RCSB, pdb_path or pdb text) as cartoon, ball-and-stick, sticks, space-filling or backbone, optionally with its Ramachandran plot

chart_types

The panel types and their fields

Every tool takes title, width, height, theme and output (also save as .png, .svg, .pdf, or .html for an interactive page).

{"title": "Latency", "panels": [
  {"type": "line", "series": [{"name": "p50", "x": [1, 2, 3], "y": [12, 11, 13]}]},
  {"type": "box", "groups": {"eu": [12, 14, 13, 30], "us": [18, 17, 21, 25]}}
]}

License

MIT

Available Tools

4 tools
chart_typesChart typesA
Read-onlyIdempotent

List every panel type that plot accepts (44 types plus the grammar-of-graphics mark), each with its data fields and a one-line description, followed by a complete example call. Call it before plot when unsure which type fits the data or which fields a type needs. Takes no arguments, reads and writes nothing, and always returns the same text.

Inputs: no named parameters.

moleculeDraw a moleculeA
DestructiveIdempotent

Draw a protein, DNA or small molecule in 3D and return a PNG image plus a text summary.

When to use: to show one structure. To put a structure next to other charts, use a molecule panel in plot instead.

How: give exactly one source: pdb_id (a 4-character Protein Data Bank id such as 1UBQ), pdb_path (a local .pdb file) or pdb (the PDB text itself). The style defaults to cartoon for proteins and ball_and_stick otherwise; coloring defaults to element. rotate {x, y, z} turns the model by degrees; ramachandran adds a Ramachandran plot of the backbone angles.

Behavior: pdb_id downloads the structure from files.rcsb.org (the only network access); pdb_path only reads the file; nothing is written unless output is given. An unknown id, an unreadable file or PDB data without ATOM/HETATM records returns an error result whose text says which.

Inputs: pdb, image, style, theme, +9 more.

plotPlot dataA
DestructiveIdempotent

Draw one or more charts from data passed inline in the call and return them as a PNG image plus a short text description of what was drawn.

When to use: you already have the numbers (from the conversation, a computation or another tool). To chart a CSV/TSV/JSON file on disk use plot_file instead; for a 3D protein or DNA structure on its own, molecule is simpler (a molecule panel here is only needed to combine it with other charts).

How: panels is a list of charts laid out in a grid. Each panel has a type (line, scatter, bar, hist, box, violin, heatmap, pie, sankey, candlestick, roc, surface, scatter3d, … 44 in all) plus that type's data fields, for example {"type": "line", "x": [1, 2, 3], "y": [2, 4, 3]}. Call chart_types first if unsure of a type's fields. Options every panel takes: title, x_label, y_label, z_label, x_limits [min, max], y_limits, x_log, y_log, legend, camera [azimuth, elevation] and rotate {x, y, z} in degrees (3D), drawings [{type: trend|ray|fib, from [x, y], to [x, y]} or {type: level, y}].

Behavior: draws in memory and writes nothing unless output is given. Molecule panels with a pdb_id download the structure from files.rcsb.org; nothing else uses the network. Width and height are clamped to 100-6000 px. An invalid spec (unknown type, missing or mismatched data fields) returns an error result whose text names the problem, and nothing is drawn or saved.

Inputs: panels (required), cols, rows, image, +5 more.

plot_filePlot a data fileA
DestructiveIdempotent

Chart the columns of a CSV, TSV or JSON file on disk and return a PNG image plus a text summary (columns found, what was drawn).

When to use: the data is in a file the server can read, especially a large one you should not paste into a call. For data you already have in the conversation use plot, which also offers all 44 chart types; plot_file covers the common kinds below.

How: give path; JSON may be an array of objects or {column: [values]}. kind=auto (default) picks a line chart for a numeric x column, bars for a text x column and a histogram for a single numeric column; correlation draws the correlation matrix of all numeric columns. x, y and group choose columns by name.

Behavior: only reads the file; writes nothing unless output is given, and uses no network. A missing file, an unknown column or a file with no rows returns an error result whose text says which.

Inputs: path (required), x, y, kind, +7 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has an explicit, non-overlapping entry condition: plot for inline data, plot_file for data on disk, molecule for a single structure, chart_types as a pure reference. The descriptions actively cross-reference each other (e.g. 'to combine a molecule with other charts, use a molecule panel in plot'), leaving little room for misselection.

    Naming Consistency3/5

    All names are snake_case and readable, but the set mixes verb-first names (plot, plot_file) with bare nouns (molecule, chart_types) rather than following a single verb_noun pattern. The plot/plot_file pair is consistent, but the overall convention is only partially applied.

    Tool Count5/5

    Four tools is well within the ideal 3-15 range, and each one covers a distinct data source or a reference lookup. Nothing feels padded or missing at this scope.

    Completeness4/5

    The surface covers inline data, file-based data, molecular structures, all 44 chart types with a discovery tool, and optional output saving, so core charting workflows are closed. Minor gaps remain, such as modifying or re-reading a previously rendered image, but an agent can work around these by re-plotting.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers