Get the FREE Ultimate OpenClaw Setup Guide →

visualization

Visualization MCP Server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio xlisp-visualization-mcp-server python visualization_server.py \
  --env PYTHONUNBUFFERED="1"

How to use

The Visualization MCP Server exposes a set of matplotlib-based visualization tools that can be driven through the MCP protocol. It supports creating relationship graphs, scatter plots (including classification-style plots), and 3D visualizations, along with histograms, line plots, and heatmaps. The server runs via a standard MCP transport (stdio in many setups) and returns paths to generated image files while also displaying interactive plots when possible. To use it, run the server as a normal Python process and connect an MCP client that can send the provided function calls (e.g., create_relationship_graph, create_scatter_plot, create_classification_plot, create_3d_plot, create_histogram, create_line_plot, create_heatmap). The client can request the image path and trigger display in the host environment.

Typical workflow:

  • Start the server (for example, via the MCP client configuration): the server listens to MCP messages and renders plots accordingly.
  • Use the supplied visualization functions to generate plots by passing data (nodes/edges for graphs, x/y data for plots, 3D coordinates for 3D visualizations).
  • Retrieve the image file path returned by the server and display or store the generated PNG image. The server also saves high-resolution images to the system temporary directory and shows the plot in an interactive window when supported.

How to install

Prerequisites

  • Python 3.8+ and a virtual environment tool (venv).
  • Basic Git and Python tooling installed on your system.

Step 1: Create and activate a virtual environment

python3 -m venv .venv --upgrade-deps
source .venv/bin/activate

Step 2: Install the MCP CLI and runtime dependencies, plus visualization packages

pip install "mcp[cli]" httpx
pip install matplotlib numpy pandas networkx

Step 3: Install the server repository (clone or run from your workspace)

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

Step 4: Run the server

python visualization_server.py

Notes:

  • Ensure your MCP client is configured to connect to the server using STDIO or the transport supported by your setup.
  • If you prefer a different entry point, adjust the command accordingly in your deployment configuration.

Additional notes

Tips and notes:

  • The server relies on matplotlib and related visualization libraries (numpy, pandas, networkx). Ensure they are installed in your environment.
  • Output images are saved with timestamps to the system temporary directory to avoid collisions; typical paths are shown in the runtime output or returned by the MCP API.
  • If plots do not display, check that your environment supports GUI backends for matplotlib or configure a non-interactive backend for headless usage.
  • The MCP integration follows the standard pattern: each visualization function returns the file path of the saved image and may display the plot in an interactive window.
  • You can customize plot styling via the provided parameters in each visualization call (titles, labels, colors, sizes, etc.).

Related MCP Servers

Sponsor this space

Reach thousands of developers