Skip to content

MarcSkovMadsen/holoviz-mcp

Repository files navigation

✨ HoloViz MCP

CI conda-forge pypi-version python-version

A comprehensive Model Context Protocol (MCP) server that provides intelligent access to the HoloViz ecosystem, enabling AI assistants to help you build interactive dashboards and data visualizations with Panel, hvPlot, datashader and your favorite Python libraries.

HoloViz Logo

✨ What This Provides

Documentation Access: Search through comprehensive HoloViz documentation including tutorials, reference guides, how-to guides, and API references.

Component Intelligence: Discover and understand 100+ Panel components with detailed parameter information, usage examples, and best practices.

Extension Support: Automatic detection and information about Panel extensions like Material UI, Graphic Walker, and community packages.

Smart Context: Get contextual code assistance that understands your development environment and available packages.

🎯 Why Use This?

  • ⚡ Faster Development: No more hunting through docs - get instant, accurate component information
  • 🎨 Better Design: AI suggests appropriate components and layout patterns for your use case
  • 🧠 Smart Context: The assistant understands your environment and available Panel extensions
  • 📖 Always Updated: Documentation stays current with the latest HoloViz ecosystem changes
  • 🔧 Zero Setup: Works immediately with any MCP-compatible AI assistant

Need more?

Check out the HoloViz MCP Introduction on youtube.

HoloViz MCP Introduction

🚀 Quick Start

Requirements

  • Python 3.11+ and uv
  • VS Code with GitHub Copilot, Claude Desktop, Cursor, or other MCP-compatible client

One-Click Install

Install in VS Code Install in Cursor Claude Desktop

Manual Installation

VS Code + GitHub Copilot

Add this configuration to your VS Code settings.json:

{
    "mcp": {
        "servers": {
           "holoviz": {
                "type": "stdio",
                "command": "uvx",
                "args": [
                    "--from",
                    "git+https://github.com/MarcSkovMadsen/holoviz-mcp[panel-extensions]",
                    "holoviz-mcp"
                ]
            }
        }
    }
}

Restart VS Code and start chatting with GitHub Copilot about Panel components!

Claude Desktop

Add to your Claude Desktop configuration file:

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

{
    "mcpServers": {
        "holoviz": {
            "command": "uvx",
            "args": [
                "--from",
                "git+https://github.com/MarcSkovMadsen/holoviz-mcp[panel-extensions]",
                "holoviz-mcp"
            ]
        }
    }
}

Restart Claude Desktop and start asking about Panel components!

Cursor

Go to Cursor SettingsFeaturesModel Context ProtocolAdd Server:

{
    "name": "holoviz",
    "command": "uvx",
    "args": [
        "--from",
        "git+https://github.com/MarcSkovMadsen/holoviz-mcp[panel-extensions]",
        "holoviz-mcp"
    ]
}

Restart Cursor and start building Panel dashboards with AI assistance!

Windsurf

Add to your Windsurf MCP configuration:

{
    "mcpServers": {
        "holoviz": {
            "command": "uvx",
            "args": [
                "--from",
                "git+https://github.com/MarcSkovMadsen/holoviz-mcp[panel-extensions]",
                "holoviz-mcp"
            ]
        }
    }
}
Other MCP Clients

For other MCP-compatible clients, use the standard MCP configuration:

{
    "name": "holoviz",
    "command": "uvx",
    "args": [
        "--from",
        "git+https://github.com/MarcSkovMadsen/holoviz-mcp[panel-extensions]",
        "holoviz-mcp"
    ]
}

That's it! Start asking questions about Panel components, and your AI assistant will have access to comprehensive documentation and component details.

⏱️ First-Time Setup

Installation: The first installation may take 1-2 minutes as dependencies are downloaded and configured.

Documentation Indexing: The first time you search documentation, the system will automatically download and index HoloViz documentation from GitHub. This process takes 5-10 minutes but only happens once. Subsequent searches will be instant.

Progress Monitoring: In VS Code, you can monitor progress in OUTPUT → MCP: holoviz to see indexing status and any potential issues.

OUTPUT

💡 What You Can Ask

🔍 Component Discovery

Ask: "What Panel components are available for user input?"

AI Response: The assistant will search through all available input components and provide a comprehensive list with descriptions, such as TextInput, Slider, Select, FileInput, etc.

Ask: "Show me Panel Material UI components"

AI Response: Lists all Material UI components if the package is installed, with their specific design system features.

📋 Component Details

Ask: "What parameters does the Button component accept?"

AI Response: Returns all 20+ parameters with their types, defaults, and descriptions:

  • name (str): The text displayed on the button
  • button_type (str): Button style ('default', 'primary', 'light')
  • clicks (int): Number of times button has been clicked
  • And many more...
📚 Best Practices

Ask: "What are the best practices for Panel layouts?"

AI Response: Provides comprehensive layout guidelines, performance tips, and architectural recommendations based on the official documentation.

Ask: "How should I structure a Panel application?"

AI Response: Offers detailed guidance on application architecture, state management, and component organization.

🚀 Building Tools, Dashboards and Applications

Ask: "How do I build a minimal, Hello World data dashboard with Panel?"

AI Response: Provides basic application architecture with layout components, data connections, and interactive widgets.

Ask: "How do I create a minimal, dashboard with Panel Material UI sliders and plots?"

AI Response: Provides complete code examples with proper Panel layout structure and Panel Material UI component integration.

Ask: "Build a sales dashboard for data analysis using Panel Material UI components. Follow the Panel and Panel Material UI best practices. Create tests and make sure issues are identified and fixed."

AI Response: Provides code for interactive tools with dynamic filtering, real-time updates, and responsive layouts that work across devices.

Ask: "How do I deploy a Panel application?"

AI Response: Offers deployment strategies for various platforms (Heroku, AWS, local server) with configuration examples and best practices for production environments.

The AI assistant provides accurate, contextual answers with:

  • Detailed component information including all parameters and types
  • Usage examples and copy-pasteable code snippets
  • Best practices for Panel development
  • Extension compatibility information

🛠️ Available Tools

Panel Components
  • panel_list_packages: List all installed packages that provide Panel UI components
  • panel_search: Search for Panel components by name, module path, or description
  • panel_list_components: Get a summary list of Panel components without detailed parameter information
  • panel_get_component: Get complete details about a single Panel component including docstring and parameters
  • panel_get_component_parameters: Get detailed parameter information for a single Panel component
Documentation
  • docs_get_best_practices: Get best practices for using a package with LLMs
  • docs_get_reference_guide: Find reference guides for specific HoloViz components
  • docs_get_page: Retrieve a specific documentation page by path and package
  • docs_search: Search HoloViz documentation using semantic similarity
  • docs_update_index: Update the documentation index by re-cloning repositories and re-indexing content
Utilities
  • panel_get_accessible_url: Convert localhost URLs to accessible URLs in remote environments
  • panel_open_in_browser: Open a URL in the user's web browser

📦 Installation

For AI Assistant Use

The recommended way is to configure your AI assistant (VS Code + GitHub Copilot) to use the server directly as shown above.

Manual Installation

pip install holoviz-mcp

With Panel Extensions

Install with automatic detection of Panel extension packages:

pip install holoviz-mcp[panel-extensions]

This includes packages like panel-material-ui, panel-graphic-walker, and other community extensions.

Running the Server

holoviz-mcp

For HTTP transport (useful for remote development):

HOLOVIZ_MCP_TRANSPORT=http holoviz-mcp

⚙️ Configuration Options

Transport Modes

The server supports different transport protocols:

Standard I/O (default):

holoviz-mcp

HTTP (for remote development):

HOLOVIZ_MCP_TRANSPORT=http holoviz-mcp

For VS Code remote development, add to settings.json:

"holoviz-dev": {
    "type": "http",
    "url": "http://127.0.0.1:8000/mcp/"
}
Environment Variables
  • HOLOVIZ_MCP_TRANSPORT: Set transport mode (stdio or http)
  • JUPYTER_SERVER_PROXY_URL: Configure Jupyter proxy for remote environments
Package Extensions

The server automatically detects Panel-related packages in your environment:

  • panel-material-ui: Material Design components
  • panel-graphic-walker: Interactive data visualization
  • awesome-panel-extensions: Community extensions
  • Any package that depends on Panel

Install additional packages and restart the server to include them.

⚙️ User Configuration

HoloViz MCP supports user configuration via a YAML file, allowing you to customize server behavior and documentation sources to fit your workflow.

Custom Configuration File

By default, configuration is loaded from ~/.holoviz-mcp/config.yaml. To use a different location, set the HOLOVIZ_MCP_USER_DIR environment variable:

export HOLOVIZ_MCP_USER_DIR=/path/to/your/config_dir

Adding Custom Documentation Repositories

You can add documentation from other libraries or your own projects by editing your configuration YAML and adding entries under docs.repositories.

Example: Adding Plotly and Altair Documentation

docs:
  repositories:
    plotly:
      url: "https://github.com/plotly/plotly.py.git"
      base_url: "https://plotly.com/python"
    altair:
      url: "https://github.com/altair-viz/altair.git"
      base_url: "https://altair-viz.github.io"

After updating your configuration:

  1. Update your documentation index:
    holoviz-mcp-update
  2. Restart the MCP server.

Your custom documentation repositories will now be available for search and reference within HoloViz MCP.

Schema Validation

A schema.json file is provided for configuration validation and editor autocompletion.

For VS Code with vscode-yaml:

Add this at the top of your YAML file:

# yaml-language-server: $schema=https://raw.githubusercontent.com/MarcSkovMadsen/holoviz-mcp/refs/heads/main/src/holoviz_mcp/config/schema.json

This enables real-time validation and autocompletion in VS Code.

🔧 Troubleshooting

Common Issues

Server won't start: Check that Python 3.11+ is installed and verify with pip show holoviz-mcp

VS Code integration not working: Ensure GitHub Copilot Chat extension is installed and restart VS Code after configuration

Missing Panel components: Install relevant Panel extension packages and restart the MCP server

Getting Help

🛠️ Development

Setup

git clone https://github.com/MarcSkovMadsen/holoviz-mcp
cd holoviz-mcp

Install pixi and run:

pixi run pre-commit-install
pixi run postinstall
pixi run test

Development Server

For remote development with VS Code:

HOLOVIZ_MCP_TRANSPORT=http holoviz-mcp

Add to VS Code settings.json:

"holoviz-dev": {
    "type": "http",
    "url": "http://127.0.0.1:8000/mcp/"
}

Template

This project uses copier-template-panel-extension.

Update to the latest template:

pixi exec --spec copier --spec ruamel.yaml -- copier update --defaults --trust

❤️ Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository and create a new branch
  2. Make your changes with tests and documentation
  3. Run pixi run test to ensure everything works
  4. Submit a pull request

Code Quality

  • pre-commit hooks ensure consistent formatting
  • pytest for comprehensive testing
  • GitHub Actions for CI/CD

Run pixi run pre-commit-install to set up code quality checks.

Roadmap

  • Provide Panel and Panel Material UI best practices for both "beginners" and "intermediate" users. Current ones are for "intermediate users".
  • Find that "magic" prompt that makes the LLM run a development server with hot reload (panel serve ... --dev) while developing. Would make things more engaging. I've tried a lot.
  • Get Panel #8018 fixed.
  • Make it configurable/ extensible enabling users to add other github repositories or their own best practice guides.
  • Try out Playwright MCP. Its probably worth recommending for taking screenshots and interacting with the app in the browser.
  • Provide reference guides for other HoloViz packages starting with hvPlot, param and HoloViews.
  • Base index on latest released versions instead of latest code (Head).
  • Migrate to HoloViz organisation.

About

✨A MCP server that provides intelligent access to the HoloViz ecosystem for humans and AIs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages