Skip to main content
MCP server CX Codex

matplotlibnet — Claude Code MCP server: what it does, how to install

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

Open on GitHub

What matplotlibnet 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.

What it helps with

  • 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 for the agent

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

How to install matplotlibnet

Install

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

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about matplotlibnet

How do I install matplotlibnet for Claude Code?

Add the package to your project with dotnet add package MatPlotLibNet; the MCP server ships with the library.

What does matplotlibnet do?

It takes a JSON figure spec from your agent and draws the matching chart, one of 83 types, then returns the rendered image.

Which chart types make it through the JSON round trip?

Sankey, treemap, sunburst, dendrogram, clustermap, tree grid, polar, streaming and the planar 3-D bar all come back intact. GeoPolygonSeries from MatPlotLibNet.Geo does not yet.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor