PlotMCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PlotMCP Server create a bar chart showing our monthly revenue: Jan $5k, Feb $8k, Mar $12k"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PlotMCP Server
PlotMCP is a powerful Model Context Protocol (MCP) server designed to enable LLMs to generate high-quality SVG charts from structured data. It leverages fastmcp for the server infrastructure and matplotlib for consistent, precise chart rendering.
Key Features
Pure SVG Rendering: Generates static SVG format with no external JavaScript dependencies. Safe, portable, and easy to embed.
Multiple Plot Types: Supports Line, Scatter, Bar, Area, Histogram, Box, Heatmap, Contour, and Pie charts.
Flexible Configuration: Full control over titles, dimensions, margins, and axis properties (linear, log, and symlog scales).
Output Management: When
--output-diris configured, automatically saves generated charts and returns a specially formatted response that clients can parse to display the image:```local_image /path/to/chart.svg ```This format allows clients to easily detect and render the generated images.
Deterministic Output: Ensures identical inputs produce bit-identical SVG outputs.
Related MCP server: mcp-plots
Installation
Requires Python >= 3.11 and uv installed.
Local Installation (Development)
git clone <repository-url>
cd plot-mcp
uv syncInstall as a Global Tool
uv tool install .Running the Server
Running from Source
uv run plot-mcp --output-dir ./plotsRunning Remotely via GitHub (using uvx)
You can run the server directly from the GitHub repository without manual cloning:
uvx --from git+https://github.com/Nexo-Agent/plot-mcp plot-mcp --output-dir ./plotsNote: Replace the URL with the actual repository location.
CLI Configuration
The server supports the following command-line options:
--output-dir PATH: Directory where generated SVG files will be saved. When set, tools return the file path instead of the raw SVG content.--transport [stdio|sse|streamable-http]: The communication protocol (default:stdio).--port INTEGER: The port for SSE or HTTP transport (default: 8000).
Output Format
The server supports two output modes depending on whether --output-dir is configured:
Without --output-dir (Default)
Tools return a PlotOutput object containing the raw SVG content:
{
"svg": "<svg>...</svg>",
"width": 800,
"height": 400,
"viewBox": "0 0 800 400"
}With --output-dir (Recommended)
Tools save the SVG to a file and return a specially formatted string:
```local_image
/absolute/path/to/chart.svg
```This format is designed to be easily parsed by clients. When your client receives a response containing this pattern, it should:
Detect the
```local_imagemarkerExtract the file path
Load and display the image from that path
This approach keeps the response lightweight and allows clients to handle image rendering efficiently.
See examples/local_image_format.py for a complete demonstration of how this format works.
Available Tools
The LLM can invoke the following tools:
plot_line: Render continuous 2D lines.plot_scatter: Render discrete 2D points.plot_bar: Render categorical bar charts.plot_area: Render filled area under a curve.plot_histogram: Render 1D histograms.plot_box: Render box plots from raw values.plot_heatmap: Render 2D matrix as a color grid.plot_contour: Render 2D contour lines.plot_pie: Render circular pie and donut charts.
Chart Configuration
All tools accept a shared config object to customize the visual output:
{
"title": "My Chart",
"width": 800,
"height": 400,
"margin": { "top": 40, "right": 20, "bottom": 40, "left": 50 },
"x_axis": { "label": "X Axis", "scale": "linear" },
"y_axis": { "label": "Y Axis", "scale": "log" }
}License
MIT
Available Tools
9 toolsplot_areaC
Render filled area under a curve. Simple flat parameters - no nested objects!
Example: { "x": [1, 2, 3, 4], "y": [1, 4, 9, 16], "title": "Area Plot", "fill_color": "steelblue" }
Inputs: params (required). Returns: result
plot_barC
Render categorical bar chart. Simple flat parameters - no nested objects!
Example: { "categories": ["A", "B", "C"], "values": [10, 20, 15], "title": "Bar Chart", "orientation": "vertical" }
Inputs: params (required). Returns: result
plot_boxC
Render box plot from raw values. Simple flat parameters - no nested objects!
Example: { "groups": [ {"name": "Group A", "values": [1, 2, 3, 4, 5]}, {"name": "Group B", "values": [2, 3, 4, 5, 6]} ], "title": "Box Plot" }
Inputs: params (required). Returns: result
plot_contourB
Render 2D contour lines from grid data. Simple flat parameters - no nested objects!
Example: { "x": [1, 2, 3], "y": [1, 2, 3], "z": [[1, 2, 3], [4, 5, 6], [7, 8, 9]], "title": "Contour Plot" }
Inputs: params (required). Returns: result
plot_heatmapB
Render 2D matrix as color grid. Simple flat parameters - no nested objects!
Example: { "matrix": [[1, 2, 3], [4, 5, 6], [7, 8, 9]], "x_labels": ["X1", "X2", "X3"], "y_labels": ["Y1", "Y2", "Y3"], "title": "Heatmap" }
Inputs: params (required). Returns: result
plot_histogramC
Render 1D histogram. Simple flat parameters - no nested objects!
Example: { "values": [1, 2, 2, 3, 3, 3, 4, 4, 5], "bins": 5, "title": "Histogram" }
Inputs: params (required). Returns: result
plot_lineC
Render one or more continuous 2D lines. Simple flat parameters - no nested objects!
Example: { "series": [{"name": "Line 1", "x": [1, 2, 3], "y": [1, 4, 9]}], "title": "My Plot", "width": 800, "height": 400 }
Inputs: params (required). Returns: result
plot_pieC
Render circular pie chart. Simple flat parameters - no nested objects!
Example: { "labels": ["A", "B", "C"], "values": [30, 50, 20], "title": "Pie Chart" }
Inputs: params (required). Returns: result
plot_scatterC
Render discrete 2D points. Simple flat parameters - no nested objects!
Example: { "x": [1, 2, 3, 4], "y": [1, 4, 9, 16], "title": "Scatter Plot", "color": "steelblue" }
Inputs: params (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose corresponding to a specific plot type (area, bar, box, contour, heatmap, histogram, line, pie, scatter). The names directly indicate the visualization type, making it impossible to confuse one tool for another. There is no functional overlap between tools as each creates a fundamentally different chart format.
All tools follow the exact same 'plot_' prefix + chart_type naming pattern (plot_area, plot_bar, plot_box, etc.). This consistent verb_noun structure (where 'plot' is the verb and the chart type is the noun) creates perfect predictability. Every tool name uses the same snake_case convention without any deviations.
Nine tools is ideal for a plotting server, covering the most common visualization types without being overwhelming. Each tool represents a distinct, essential chart type that earns its place in the set. The count aligns perfectly with the domain scope of providing core plotting functionality.
The tool set provides comprehensive coverage of standard plot types including area, bar, box, contour, heatmap, histogram, line, pie, and scatter plots. This covers the fundamental visualization needs for data analysis and presentation. There are no obvious gaps in the plotting domain - agents can create any common chart type needed for data visualization tasks.
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
ChartAnt is a remote MCP server that gives your AI assistant 51 tools to draw charts, diagrams and maps as real PNG images with their own link, ready for email, Slack, slides or a README. - 40+ chart and diagram types: line, bar, column, pie, area, scatter, funnel, sankey, treemap, waterfall, gantt, heatmap, KPI cards, dashboards, flowcharts, mind maps, org charts and more. - Maps of every country: world maps, the states, provinces or regions of any country, and pin maps from coordinates. Region names in 20+ languages, with "did you mean" hints for names that don't match. - Charts that stay updated: sign in once and your assistant can save a chart at a fixed link. Later, say "add 10% to this month's sales" and the image at the same link updates. Copies can go to Slack, Teams, Discord or email on every change or on a schedule. - Nothing to install and no API key: paste the URL into Claude, ChatGPT, Cursor, VS Code, Windsurf or n8n. - EU-hosted. Chart data is used only to draw the image and is never logged.
MCP server for Qwen Image 3 AI image generation
Bar-first MCP server for Tabula chart authoring, PNG rendering, and editor handoff.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAn MCP (Model Context Protocol) server that enables LLMs to generate ECharts visualizations by accepting chart type, data and parameters and returning cloud image URLs of the generated charts.12 npm87Apache 2.0
- AlicenseAqualityDmaintenanceA MCP server for data visualization. It exposes tools to render charts (line, bar, pie, scatter, heatmap, etc.) from data and returns plots as either image/text/mermaid diagram.24MIT
- FlicenseBqualityDmaintenanceAn MCP server that provides data visualization and machine learning tools, featuring automated intent-based pipeline routing for data cleaning and model training. It enables LLMs to process CSV or JSON data to generate visual charts, perform regressions, or execute clustering analysis.16-
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to create, update, and publish Datawrapper charts through natural language. It provides tools for data synchronization, visual configuration, and retrieving chart images or editor links.8MIT