Skip to content

Commit 114c44b

Browse files
copilot3
1 parent 1230fd8 commit 114c44b

5 files changed

Lines changed: 50 additions & 28 deletions

File tree

7.97 KB
Loading
17.1 KB
Loading

docs/tutorials/copilot.md

Lines changed: 45 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11

2-
# Using GitHub Copilot with HoloViz MCP
2+
# Using HoloViz MCP with Github Copilot
33

4-
5-
In this tutorial, you'll learn how to use the HoloViz MCP server with GitHub Copilot in VS Code to build an interactive stock dashboard. By the end, you'll have a working Panel application and understand how to leverage AI assistance for HoloViz development.
4+
In this tutorial, you'll learn how to use the HoloViz MCP server with GitHub Copilot in VS Code.
65

76
!!! tip "What you'll learn"
8-
- How to integrate HoloViz MCP with GitHub Copilot
9-
- How to use MCP resources to enhance Copilot's responses
10-
- How to work with custom Copilot agents for HoloViz
11-
- How to build a data visualization dashboard with AI assistance
7+
- How to use HoloViz MCP resources to enhance Copilot's responses
8+
- How to add custom Copilot agents optimized for HoloViz MCP
9+
- How to create a plot using Copilot + HoloViz MCP
10+
- How to build a dashboard using Copilot + HoloViz MCP
1211

1312
!!! note "Prerequisites"
1413
- VS Code installed
@@ -17,20 +16,33 @@ In this tutorial, you'll learn how to use the HoloViz MCP server with GitHub Cop
1716

1817
---
1918

19+
## Starting the MCP Server
2020

21-
## Using HoloViz Resources
21+
Start the Holoviz MCP Server:
2222

23+
1. In VS Code, open the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P`)
24+
2. Type "MCP: List Servers" and press Enter
25+
3. Choose the "holoviz" server
26+
4. Select "Start Server"
2327

24-
MCP resources contain curated knowledge that enhances Copilot's understanding of specific frameworks. Let's load the hvPlot best practice skills and use them to create a basic data visualization.
28+
Repeat 1.+2. and verify that the `holoviz` mcp server is now running.
2529

30+
![HoloViz MCP Running](../assets/images/holoviz-mcp-vscode-running.png)
31+
32+
## Using HoloViz Resources
33+
34+
MCP resources contain curated knowledge that enhances Copilot's understanding of specific frameworks. Let's load the hvPlot best practice skills and use them to create a basic data visualization.
2635

2736
1. In the Copilot Chat Interface, click "Add Context" (`CTRL + '`)
2837
2. Select "MCP Resources".
2938
3. You'll see a list of available resources. Select **`holoviz_hvplot`**.
3039
![HoloViz MCP Resources](../assets/images/holoviz-mcp-resources.png)
31-
4. Notice in the chat interface that the resource is now added to the context (you'll see a small `hvplot.md` indicator).
32-
**What's happening:** You've just loaded hvPlot's best practices and conventions into Copilot's context. This means Copilot now "knows" how to write better hvPlot code following recommended patterns.
33-
5. Ask it to "Please create a basic hvplot visualization in script.py file."
40+
4. Notice in the chat interface that the resource is now added to the context.
41+
![HvPlot Resource Added](../assets/images/holoviz-mcp-vscode-resource-added.png)
42+
5. Ask the agent:
43+
```bash
44+
Please create a basic hvplot visualization in a script.py file.
45+
```
3446

3547
!!! tip
3648
You can add multiple resources to the context. Try browsing and adding `holoviz_panel` as well to get Panel-specific guidance.
@@ -49,12 +61,13 @@ MCP resources contain curated knowledge that enhances Copilot's understanding of
4961
1. Open a terminal in VS Code (`` Ctrl+` `` or `Terminal > New Terminal`).
5062
2. Run the following command:
5163
```bash
52-
holoviz-mcp update copilot
64+
uvx holoviz-mcp update copilot
5365
```
5466
You should see output confirming that agents were installed to `.github/agents/`.
5567
3. Wait for the command to complete successfully.
5668

57-
**What's happening:** This command installs custom Copilot agents specifically designed for HoloViz development. These agents understand the holoviz-mcp server and can use it to understand the architecture patterns and best practices for Panel, hvPlot, and other HoloViz libraries.
69+
!!! note "What's happening"
70+
This command installs custom Copilot agents specifically designed for HoloViz development. These agents understand the holoviz-mcp server and can use it to understand the architecture patterns and best practices for Panel, hvPlot, and other HoloViz libraries.
5871

5972
!!! tip
6073
Run `holoviz-mcp update copilot --skills` to populate the `.github/skills` folder too. See [Use Agent Skills in VS Code](https://code.visualstudio.com/docs/copilot/customization/agent-skills) for more info.
@@ -77,13 +90,16 @@ Instead of diving straight into code, let's use the specialized agent to plan ou
7790
![HoloViz MCP Planner](../assets/images/holoviz-mcp-planner.png)
7891
4. Press Enter and wait for the agent to respond.
7992

80-
**What you'll see:** The agent will provide a structured plan including:
81-
- Component breakdown (widgets, plots, layouts)
82-
- Data requirements
83-
- Recommended HoloViz libraries to use
84-
- Step-by-step implementation approach
93+
!!! note "What you'll see"
94+
The agent will provide a structured plan including:
8595

86-
**What's happening:** The HoloViz Planner agent analyzes your requirements and creates an architecture plan following HoloViz best practices. This ensures your application is well-structured before you write any code.
96+
- Component breakdown (widgets, plots, layouts)
97+
- Data requirements
98+
- Recommended HoloViz libraries to use
99+
- Step-by-step implementation approach
100+
101+
!!! note "What's happening"
102+
The HoloViz Planner agent analyzes your requirements and creates an architecture plan following HoloViz best practices. This ensures your application is well-structured before you write any code.
87103

88104
---
89105

@@ -96,16 +112,18 @@ Now that you have a plan, let's ask Copilot to help implement it.
96112

97113
1. In the Copilot Chat, respond to the plan with:
98114
```
99-
Please implement this plan in dashboard.py using Panel and hvPlot
115+
Implement the plan outlined above.
100116
```
101117
2. Copilot will generate the code for your dashboard. Review the suggestions.
102118

103-
**What you'll see:** A complete Python script that includes:
104-
- Imports for Panel, hvPlot, and data handling libraries
105-
- Data loading logic (likely using pandas)
106-
- Interactive widgets for user controls
107-
- Plots created with hvPlot
108-
- Panel layout to organize everything
119+
!!! note "What you'll see"
120+
A complete Python script that includes:
121+
122+
- Imports for Panel, hvPlot, and data handling libraries
123+
- Data loading logic (likely using pandas)
124+
- Interactive widgets for user controls
125+
- Plots created with hvPlot
126+
- Panel layout to organize everything
109127

110128
---
111129

docs/tutorials/getting-started.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
This tutorial will guide you through installing and using HoloViz MCP for the first time. By the end, you'll have HoloViz MCP running and be able to ask your AI assistant questions about Panel components!
44

5+
<iframe src="https://www.youtube.com/embed/nB6cI26GNzM?si=XGyPwCMvBWYOrHop" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen style="display:block;height:300px;width:500px;margin-left:auto;margin-right:auto"></iframe>
6+
57
!!! tip "What you'll learn"
68
- How to install HoloViz MCP
79
- How to configure it with your AI assistant (VS Code, Claude Desktop, or Cursor)
@@ -40,6 +42,8 @@ Install [Chromium](https://playwright.dev/docs/browsers) to enable the holoviz-m
4042
uvx holoviz-mcp install chromium
4143
```
4244

45+
**📦 This downloads 300MB** as it downloads the Chromium and FFMPEG engines.
46+
4347
## Step 3: Create the Documentation Index
4448

4549
HoloViz MCP needs to index the HoloViz documentation to provide intelligent answers. Run:

src/holoviz_mcp/config/resources/skills/panel.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ metadata:
1212

1313
This document provides best practices for developing dashboards and data apps with HoloViz Panel in Python .py files.
1414

15-
Please develop as an **Expert Python Developer** developing advanced data-driven, analytics and testable dashboards and applications would do. Keep the code short, concise, documented, testable and professional.
15+
Please develop as an **Expert Python and Panel Developer** developing advanced data-driven, analytics and testable dashboards and analytics apps would do. Keep the code short, concise, documented, testable and professional.
1616

1717
## Dependencies
1818

0 commit comments

Comments
 (0)