Data Visualization MCP server

Provides eight specialized data visualization tools including relationship graphs, scatter plots, 3D visualizations, classification plots, histograms, line charts, and heatmaps that automatically generate and save matplotlib-based charts for data analysis workflows.
Back to servers
Setup instructions
Provider
Steve Chan
Release date
Aug 02, 2025
Language
Go
Stats
4 stars

The Visualization MCP Server is a powerful tool for creating interactive data visualizations using matplotlib. It offers various visualization types including relationship graphs, scatter plots, 3D visualizations, and statistical charts with features like auto-saving and customizable styling options.

Installation

Prerequisites

python3 -m venv .venv --upgrade-deps 
source .venv/bin/activate
pip install "mcp[cli]" httpx
pip install matplotlib numpy pandas networkx

Clone and Run

git clone https://github.com/xlisp/visualization-mcp-server.git
cd visualization-mcp-server
python visualization_server.py

Usage

Claude Desktop Client Configuration

"visualization": {
  "command": "/Users/clojure/Desktop/visualization-mcp-server/.venv/bin/python",
  "args": [
    "/Users/clojure/Desktop/visualization-mcp-server/visualization_server.py"
  ]
}

Visualization Tools

Relationship Graph

Create network diagrams to show relationships between entities:

# Example: Show relationships between people
nodes = ["Alice", "Bob", "Charlie", "Diana"]
edges = [["Alice", "Bob"], ["Bob", "Charlie"], ["Alice", "Charlie"], ["Charlie", "Diana"]]

# Call: create_relationship_graph(nodes, edges, "Social Network")

Parameters:

  • nodes: List of node names
  • edges: List of connections (pairs of node names)
  • title: Graph title (optional)
  • node_size: Size of nodes (default: 1000)
  • font_size: Label font size (default: 12)

Scatter Plot

Create basic scatter plots with optional labels and colors:

# Example: Basic scatter plot
x_data = [1, 2, 3, 4, 5]
y_data = [2, 5, 3, 8, 7]
labels = ["Point A", "Point B", "Point C", "Point D", "Point E"]

# Call: create_scatter_plot(x_data, y_data, labels, title="My Scatter Plot")

Parameters:

  • x_data: X-axis values
  • y_data: Y-axis values
  • labels: Point labels (optional)
  • colors: Point colors (optional)
  • title, x_label, y_label: Chart labels
  • size: Point size (default: 50)

Classification Scatter Plot

Visualize data points grouped by categories:

# Example: Classification visualization
x_data = [1, 2, 3, 4, 5, 6]
y_data = [2, 3, 1, 5, 4, 6]
categories = ["Type A", "Type A", "Type B", "Type B", "Type C", "Type C"]

# Call: create_classification_plot(x_data, y_data, categories)

Parameters:

  • x_data: X-axis values
  • y_data: Y-axis values
  • categories: Category labels for each point
  • title, x_label, y_label: Chart labels

3D Visualization

Create 3D plots with multiple visualization types:

# Example: 3D scatter plot
x_data = [1, 2, 3, 4, 5]
y_data = [2, 4, 1, 5, 3]
z_data = [3, 1, 4, 2, 5]

# Call: create_3d_plot(x_data, y_data, z_data, plot_type="scatter")

Parameters:

  • x_data, y_data, z_data: 3D coordinates
  • plot_type: "scatter", "surface", or "wireframe"
  • title, x_label, y_label, z_label: Chart labels

Additional Charts

Histogram

# create_histogram(data, bins=30, title="Distribution")

Line Plot

# create_line_plot(x_data, y_data, line_style="-", color="blue")

Heatmap

# create_heatmap(data_matrix, x_labels, y_labels, colormap="viridis")

Output

Each visualization function:

  1. Displays the plot in an interactive matplotlib window
  2. Saves a high-resolution PNG file to the system temporary directory
  3. Returns the file path where the image was saved

Example output:

"Graph saved to: /tmp/relationship_graph_20250802_143022.png and displayed"

File Management

  • Images are saved with timestamps to avoid conflicts
  • Files are stored in the system temporary directory:
    • Windows: C:\Users\username\AppData\Local\Temp\
    • macOS/Linux: /tmp/
  • High resolution (300 DPI) PNG format

Example Use Cases

Social Network Analysis

# Visualize social connections
nodes = ["Alice", "Bob", "Charlie", "Diana", "Eve"]
relationships = [
    ["Alice", "Bob"], 
    ["Bob", "Charlie"], 
    ["Charlie", "Diana"],
    ["Alice", "Eve"], 
    ["Eve", "Diana"]
]
# Creates a network graph showing social connections

Data Classification

# Visualize machine learning results
features_x = [1.2, 2.3, 1.8, 3.1, 2.9, 1.5]
features_y = [2.1, 3.2, 1.9, 4.1, 3.8, 2.2]
predictions = ["Class A", "Class B", "Class A", "Class B", "Class B", "Class A"]
# Creates a classification scatter plot

Scientific Data

# 3D scientific visualization
x_coords = [0, 1, 2, 3, 4]
y_coords = [0, 1, 4, 9, 16]
z_coords = [0, 1, 8, 27, 64]
# Creates a 3D surface or scatter plot

Error Handling

The server includes comprehensive error handling:

  • Invalid data format detection
  • Missing parameter validation
  • Matplotlib rendering error recovery
  • File system permission checks

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "visualization" '{"command":"python","args":["visualization_server.py"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "visualization": {
            "command": "python",
            "args": [
                "visualization_server.py"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "visualization": {
            "command": "python",
            "args": [
                "visualization_server.py"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later