# matplotlibnet

An MCP server that draws MatPlotLibNet charts from a JSON figure spec written by your agent and hands back the image.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 18
- Author: xkqg
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/xkqg/MatPlotLibNet
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/matplotlibnet

## What it does

The server comes with MatPlotLibNet, a charting library for C# built for .NET 8 and .NET 10 and modelled on matplotlib. Your agent writes a JSON description of a figure; the server renders it. The core package produces vector output, while raster and PDF export arrive with `MatPlotLibNet.Skia`, which pulls in SkiaSharp.

Figures are put together through a fluent API, so calls stay short. JSON carries the whole picture there and back, axis options included. A Sankey keeps its nodes and links, treemap and sunburst keep their trees, a polar or streaming chart keeps its points, and eight chart types the server used to turn down are accepted again.

One gap is named on the roadmap: `GeoPolygonSeries` in `MatPlotLibNet.Geo` does not come back through JSON. You need a .NET 8 or .NET 10 project with the `MatPlotLibNet` package, added through `dotnet add package MatPlotLibNet`. Leave out `MatPlotLibNet.Skia` and you are stuck with SVG — no PNG file, no PDF.

## Requirements
- Environment variables: `MATPLOTLIBNET_MCP_OUTPUT_ROOT`, `MATPLOTLIBNET_FONTS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Install**
- The MCP registry has no launch command for it: see the repository README

## When to use it
- plot a chart from data already sitting in C# code
- hand an agent a JSON figure spec and get an image back
- write one diagram as SVG for the page and PNG for a report
- round-trip a Sankey, treemap or polar chart through JSON with settings intact
- render server-side without a JavaScript framework or hosted service

## Example prompts
- Plot the rows in `sales.csv` as a bar chart and save it as PNG with MatPlotLibNet.
- Write a JSON spec for a Sankey diagram and render it through the MatPlotLibNet MCP server.
- Draw monthly totals as a polar chart and export the result to SVG.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
