HoloViz MCP Server

HoloViz MCP Server

Let AI agents create interactive visualizations that render live inside your chat — no code required.

Category
访问服务器

README

<div align="center">

<img src="https://raw.githubusercontent.com/SuMayaBee/HoloViz-MCP-Server/main/assets/panel.png" height="60" alt="Panel" />     <img src="https://raw.githubusercontent.com/SuMayaBee/HoloViz-MCP-Server/main/assets/holoviews.png" height="60" alt="HoloViews" />     <img src="https://raw.githubusercontent.com/SuMayaBee/HoloViz-MCP-Server/main/assets/hvplot.png" height="60" alt="hvPlot" />

HoloViz MCP Server

Let AI agents create interactive visualizations that render live inside your chat — no code required.

Built with FastMCP · Panel · HoloViews · hvPlot · Bokeh

PyPI Python License

27 MCP tools · 4 interactive UI templates · live streaming · bidirectional interaction

</div>


Demo

1. Inline Chart

"Create a bar chart comparing programming language popularity: Python=32%, JavaScript=28%, Java=18%, TypeScript=12%, Others=10%"

111


2. Panel Widgets & Interactivity

"Build a Panel dashboard with a slider controlling sigma in a normal distribution, updating the histogram in real time"

222


3. Streaming / Live Data

"Create a live dashboard showing a real-time sine wave that updates every 500ms"

333


4. Remote Data Loading

"Load this dataset and profile it, then show a correlation heatmap: https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv"

444


5. Maps

"Plot the top 10 most populous cities in the world on an interactive tile map with population shown as point size"

555


6. Multi-Panel Dashboard

"Build a dashboard with 3 panels: a bar chart of fruit sales (Apple=50, Banana=30, Mango=45), a pie chart of the same data, and a summary stats table"

666


7. Bidirectional Interaction

"Create an interactive scatter plot of the tips dataset where selecting points in the chart updates a summary statistics table below it"

777


Architecture

This project is designed as an MCP-native visualization platform: LLMs call tools, the server validates and executes visualization code safely, and users get live, interactive UIs inline in chat.

Architecture at a glance

<img src="https://raw.githubusercontent.com/SuMayaBee/HoloViz-MCP-Server/main/mcp_architecture.png" alt="Architecture" />

Layer responsibilities

Layer Responsibility Key implementation modules
LLM Client Layer Hosts the chat UX and invokes MCP tools VS Code Copilot, Claude Desktop, Cursor
MCP Orchestration Defines tool surface and namespaces server/main.py, server/compose.py
Validation and Safety Enforces secure code execution before rendering validation.py, utils.py, display/database.py
Display Runtime Runs Panel as managed subprocess, serves rendered apps display/manager.py, display/app.py, display/endpoints.py
Persistence Stores every snippet and execution metadata for replay/debug/search display/database.py
MCP App UI Renders interactive outputs inline in chat sandboxes templates/show.html, templates/stream.html
HoloViz Stack Visualization abstraction and rendering backend Panel, HoloViews, hvPlot, Bokeh, Param
Data Layer Ingestion and profiling for local and remote datasets load_data() tool in server/main.py

End-to-end flow

  1. An agent calls a tool such as show or stream.
  2. The server runs a 5-layer validation pipeline (syntax, security, packages, extensions, runtime).
  3. Validated code/config is sent to the Panel display subprocess via REST.
  4. The display server executes and persists the snippet in SQLite.
  5. The tool returns either:
    • a Bokeh JSON spec for direct in-chat embedding, or
    • a Panel URL rendered in an iframe.
  6. MCP App templates provide rich UX (filters, theme toggle, exports, click-to-insight).

Development Setup

For contributing or running from source:

1. Install Pixi

curl -fsSL https://pixi.sh/install.sh | bash
source ~/.bashrc

2. Clone and install

git clone https://github.com/SuMayaBee/HoloViz-MCP-Server
cd HoloViz-MCP-Server

pixi install
pixi run postinstall

3. Verify

.pixi/envs/default/bin/hvmcp --version

Example Prompts

Simple chart:

Create a bar chart showing: Jan=120, Feb=95, Mar=140, Apr=110

Scatter plot:

Show a scatter plot of 50 random points using hvplot

Full dashboard:

Create a dashboard with this sales data:
products=[Apples, Bananas, Oranges, Grapes],
revenue=[500, 300, 450, 200],
units=[50, 30, 45, 20]

Load a dataset:

Load /path/to/data.csv and create a visualization

Live streaming chart:

Create a live streaming chart that updates every second with random values

Explore available tools:

What hvplot chart types are available?
What Panel widgets are available?
Show me the hvplot skill guide

Features

Core Visualization

  • Ask your AI assistant to create a chart — renders inline in the chat via MCP Apps
  • Interactive charts (zoom, pan, hover) powered by Bokeh
  • Every visualization persisted and accessible via URL
  • Works in VS Code Insiders, Claude Desktop, and Cursor

View Code Button

Every chart rendered inline has a View Code button in the toolbar — click it to see the exact Python that generated the visualization, with a one-click copy. Great for learning HoloViz.

Kaggle Integration

Paste any Kaggle dataset or competition URL directly into the chat:

Load https://www.kaggle.com/datasets/uciml/iris and show a scatter plot colored by species

Requires KAGGLE_USERNAME and KAGGLE_KEY in your MCP config env (free Kaggle account).

HuggingFace Datasets

Paste any HuggingFace dataset URL and get instant EDA:

Load https://huggingface.co/datasets/scikit-learn/iris and show a correlation heatmap

HF_TOKEN is optional — only needed for private datasets.

Automatic Chart Recommendations

After load_data(), the server analyses column types and returns up to 3 ready-to-render chart recommendations with working hvplot code — no manual chart selection needed.

Datashader for Big Data

Datasets with >100k rows automatically use datashade=True in all recommended chart code — rendering stays fast regardless of dataset size.

Live Streaming Dashboards

Real-time dashboards with periodic callbacks — sine waves, counters, live feeds — all rendered inline.

Maps

Interactive tile maps using hvPlot + GeoViews:

Plot the top 10 most populous cities on an interactive map with population as point size

Tools

Tool Description
show(code) Execute Python viz code, render as live UI with View Code button
stream(code) Execute streaming Panel code with periodic callbacks
load_data(source) Profile a dataset + auto chart recommendations. Supports CSV, Parquet, Kaggle, HuggingFace, S3
validate(code) Run 5-layer validation before show()
viz.create High-level: describe a chart in plain config, no Python needed
viz.dashboard Create a multi-panel dashboard from structured config
viz.stream Create a live streaming visualization
viz.multi Create a multi-chart grid with linked selections
pn.list / pn.get / pn.params / pn.search Panel component introspection
hvplot.list / hvplot.get hvPlot chart type discovery
hv.list / hv.get HoloViews element discovery
skill_list / skill_get Access best-practice guides for Panel, hvPlot, HoloViews
list_packages List installed packages in the server environment

Project Structure

src/holoviz_mcp_server/
├── cli.py               # CLI entry point (hvmcp serve / mcp / status)
├── config.py            # Pydantic config + env var loading
├── validation.py        # 5-layer code validation pipeline
├── utils.py             # Code execution, extension detection utilities
│
├── server/              # MCP server layer (FastMCP)
│   ├── main.py          # Main server + core tools (show, stream, load_data, ...)
│   ├── compose.py       # Mounts all sub-servers with namespaces
│   ├── panel_mcp.py     # pn.* tools
│   ├── hvplot_mcp.py    # hvplot.* tools
│   └── holoviews_mcp.py # hv.* tools
│
├── introspection/       # Pure Python discovery functions
│   ├── panel.py         # Panel component discovery
│   ├── holoviews.py     # HoloViews element discovery
│   ├── hvplot.py        # hvPlot chart type discovery
│   └── skills.py        # Skill file loading
│
├── display/             # Panel display server (runs as subprocess)
│   ├── app.py           # Panel server entry point
│   ├── manager.py       # Subprocess lifecycle management
│   ├── client.py        # HTTP client (MCP → Panel)
│   ├── database.py      # SQLite + FTS5 persistence
│   ├── endpoints.py     # REST handlers (/api/snippet, /api/health)
│   └── pages/           # Web UI pages (feed, view, add, admin)
│
├── templates/           # MCP App HTML (inline rendering in chat)
│   ├── show.html        # Chart viewer + click-to-insight
│   └── stream.html      # Live streaming viewer
│
└── skills/              # Best-practice guides (SKILL.md files)
    ├── panel/
    ├── hvplot/
    ├── holoviews/
    ├── param/
    └── data/

Installation

Prerequisite: Install uv first:

# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.sh | iex"
# Or via pip
pip install uv

<details> <summary><b>VS Code / Copilot Chat (Recommended)</b></summary>

Add to your global ~/.config/Code - Insiders/User/mcp.json or workspace .vscode/mcp.json:

{
  "servers": {
    "holoviz": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--from", "hvmcp", "hvmcp", "mcp"]
    }
  }
}

Open Copilot Chat (Ctrl+Alt+I) → switch to Agent mode → start chatting.

</details>

<details> <summary><b>Claude Desktop</b></summary>

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "holoviz": {
      "command": "uvx",
      "args": ["--from", "hvmcp", "hvmcp", "mcp"]
    }
  }
}

Restart Claude Desktop.

</details>

<details> <summary><b>Cursor</b></summary>

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "holoviz": {
      "command": "uvx",
      "args": ["--from", "hvmcp", "hvmcp", "mcp"]
    }
  }
}

</details>

<details> <summary><b>Claude Code / Other stdio clients</b></summary>

{
  "mcpServers": {
    "holoviz": {
      "command": "uvx",
      "args": ["--from", "hvmcp", "hvmcp", "mcp"]
    }
  }
}

</details>

Optional extras

The base install is lightweight. Add only what you need:

Extra What it adds Install
geo Maps via GeoViews + Cartopy uvx --from "hvmcp[geo]" hvmcp mcp
bigdata Datashader for >100k row datasets uvx --from "hvmcp[bigdata]" hvmcp mcp
kaggle Kaggle dataset loading uvx --from "hvmcp[kaggle]" hvmcp mcp
huggingface HuggingFace dataset loading uvx --from "hvmcp[huggingface]" hvmcp mcp
all Everything above uvx --from "hvmcp[all]" hvmcp mcp

Optional: Kaggle & HuggingFace Integration

To load datasets directly from Kaggle or HuggingFace URLs, add credentials to the env section of your config:

{
  "env": {
    "KAGGLE_USERNAME": "your_kaggle_username",
    "KAGGLE_KEY": "your_kaggle_api_key",
    "HF_TOKEN": "your_huggingface_token"
  }
}
  • Kaggle token: kaggle.com → Account → Settings → Create New Token
  • HuggingFace token: huggingface.co → Settings → Access Tokens → New token (Read role)

HF_TOKEN is optional — only needed for private HuggingFace datasets. If credentials are not provided, Kaggle/HuggingFace URLs will return a friendly message instead of failing silently.

Example prompts once configured:

Load https://www.kaggle.com/datasets/uciml/iris and show a scatter plot colored by species
Load https://huggingface.co/datasets/scikit-learn/iris and show a correlation heatmap

License

BSD 3-Clause

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选