Back to MCP Catalog

Vega-Lite Data Visualization MCP Server

Data Science ToolsPython
Create interactive data visualizations using Vega-Lite syntax
Available Tools

save_data

Save a table of data aggregations to the server for later visualization

namedata

visualize_data

Visualize a table of data using Vega-Lite syntax

data_namevegalite_specification

The Vega-Lite Data Visualization MCP server provides a powerful interface for LLMs to create and display data visualizations. It allows models to save data tables and generate customized visualizations using the expressive Vega-Lite grammar, enabling rich data exploration and presentation capabilities. With this MCP, AI assistants can transform raw data into meaningful visual representations, supporting a wide range of chart types and customization options. The server can return either text-based specifications or rendered PNG images, making it versatile for different use cases and client applications.

Installation

To use the Vega-Lite Data Visualization MCP server, you'll need to add it to your Claude Desktop configuration or other compatible MCP client.

Prerequisites

  • Python environment with UV package manager
  • Clone the repository from GitHub: https://github.com/isaacwasserman/mcp-vegalite-server

Configuration for Claude Desktop

Add the following configuration to your claude_desktop_config.json file:

{
  "mcpServers": {
    "datavis": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/mcp-vegalite-server",
        "run",
        "mcp_server_vegalite",
        "--output_type",
        "png"  // or "text" if you prefer text output
      ]
    }
  }
}

Replace /absolute/path/to/mcp-vegalite-server with the actual path where you cloned the repository.

Output Types

The server supports two output types:

  • text: Returns the complete Vega-Lite specification with data as text
  • png: Returns a base64-encoded PNG image of the visualization using the MPC ImageContent container

Usage

The Vega-Lite Data Visualization MCP provides a two-step workflow for creating visualizations:

  1. First, save your data using the save_data tool
  2. Then, create visualizations from that data using the visualize_data tool

Example Workflow

// Step 1: Save your data
save_data(
  name: "sales_data",
  data: [
    {"month": "Jan", "sales": 100},
    {"month": "Feb", "sales": 120},
    {"month": "Mar", "sales": 90},
    {"month": "Apr", "sales": 150}
  ]
)

// Step 2: Create a visualization
visualize_data(
  data_name: "sales_data",
  vegalite_specification: {
    "mark": "bar",
    "encoding": {
      "x": {"field": "month", "type": "nominal"},
      "y": {"field": "sales", "type": "quantitative"}
    }
  }
)

Vega-Lite Specifications

The vegalite_specification parameter accepts standard Vega-Lite JSON specifications. You can create a wide variety of visualizations including:

  • Bar charts
  • Line charts
  • Scatter plots
  • Area charts
  • Pie charts
  • Heatmaps
  • And many more

For detailed information on Vega-Lite syntax and capabilities, refer to the Vega-Lite documentation.

Related MCPs

Open Data
Data Science ToolsPython

Connect any Open Data to any LLM with Model Context Protocol

Tinybird
Data Science ToolsPython

Query and interact with Tinybird workspaces from any MCP client

Opik
Data Science ToolsPython

Debug, evaluate, and monitor LLM applications, RAG systems, and agentic workflows

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.