Skip to content

Commit 68c6899

Browse files
Add docs for MCP Server and VSCode Extension (#3475) (#3477)
* add mcp docs * Add vscode extension docs * Update TOC * Optimised images with calibre/image-actions * Fix broken URL --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> (cherry picked from commit 4f406c1)
1 parent a0340c2 commit 68c6899

File tree

14 files changed

+205
-1
lines changed

14 files changed

+205
-1
lines changed
48 KB
Loading
74.3 KB
Loading
35.6 KB
Loading
88.5 KB
Loading
2.08 MB
Loading
5.58 MB
Loading

docs/book/how-to/debug-and-solve-issues.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Walk us through how to reproduce the same error you had step-by-step, whenever p
8686
As a general rule of thumb, always attach relevant log outputs and the full
8787
error traceback to help us understand what happened under the hood. If the full
8888
error traceback does not fit into a text message, attach a file or use a service
89-
like [Pastebin](https://pastebin.com/) or [Github's Gist](https://gist.github.com/).
89+
like Pastebin or [Github's Gist](https://gist.github.com/).
9090

9191
Along with the error traceback, we recommend to always share the output of the following commands:
9292

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
description: Chat with your ZenML server
3+
---
4+
5+
# Chat with your ZenML server
6+
7+
ZenML server supports a chat interface that allows you to interact with the server using natural language through the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/). This feature enables you to query your ML pipelines, analyze performance metrics, and generate reports using conversational language instead of traditional CLI commands or dashboard interfaces.
8+
9+
![ZenML MCP Server Overview](../../.gitbook/assets/mcp-zenml.png)
10+
11+
## What is MCP?
12+
13+
The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models (LLMs). Think of it as a "USB-C port for AI applications" - providing a standardized way to connect AI models to different data sources and tools.
14+
15+
MCP follows a client-server architecture where:
16+
- **MCP Clients**: Programs like Claude Desktop or IDEs (Cursor, Windsurf, etc.) that want to access data through MCP
17+
- **MCP Servers**: Lightweight programs that expose specific capabilities
18+
through the standardized protocol. Our implementation is of an MCP server that connects to your ZenML server.
19+
20+
## Why use MCP with ZenML?
21+
22+
The ZenML MCP Server offers several advantages for developers and teams:
23+
24+
1. **Natural Language Interaction**: Query your ZenML metadata, code and logs using conversational language instead of memorizing CLI commands or navigating dashboard interfaces.
25+
2. **Contextual Development**: Get insights about failing pipelines or performance metrics without switching away from your development environment.
26+
3. **Accessible Analytics**: Generate custom reports and visualizations about your pipelines directly through conversation.
27+
4. **Streamlined Workflows**: Trigger pipeline runs via natural language requests when you're ready to execute.
28+
29+
You can get a sense of how it works in the following video:
30+
31+
[![ZenML MCP Server Features](../../.gitbook/assets/mcp-video.png)](https://www.loom.com/share/4cac0c90bd424df287ed5700e7680b14?sid=200acd11-2f1b-4953-8577-6fe0c65cad3c)
32+
33+
## Features
34+
35+
The ZenML MCP server provides access to core read functionality from your ZenML server, allowing you to get live information about:
36+
37+
- Users
38+
- Stacks
39+
- Pipelines
40+
- Pipeline runs
41+
- Pipeline steps
42+
- Services
43+
- Stack components
44+
- Flavors
45+
- Pipeline run templates
46+
- Schedules
47+
- Artifacts (metadata about data artifacts, not the data itself)
48+
- Service Connectors
49+
- Step code
50+
- Step logs (if the step was run on a cloud-based stack)
51+
52+
It also allows you to trigger new pipeline runs through existing run templates.
53+
54+
## Getting Started
55+
56+
For the most up-to-date setup instructions and code, please refer to the [ZenML
57+
MCP Server GitHub repository](https://github.com/zenml-io/mcp-zenml). We
58+
recommend using the `uv` package manager to install the dependencies since it's
59+
the most reliable and fastest setup experience.
60+
61+
The setup process for the ZenML MCP Server is straightforward:‍
62+
63+
### Prerequisites:
64+
- Access to a ZenML Cloud server
65+
- [`uv`](https://docs.astral.sh/uv/) installed locally
66+
- A local clone of the repository
67+
68+
### Configuration:
69+
70+
- Create an MCP config file with your ZenML server details
71+
- Configure your preferred MCP client (Claude Desktop or Cursor)
72+
73+
For detailed setup instructions, please refer to the [GitHub repository](https://github.com/zenml-io/mcp-zenml).
74+
75+
## Example Usage
76+
77+
Once set up, you can interact with your ZenML infrastructure through natural language. Here are some example prompts you can try:
78+
79+
1. **Pipeline Analysis Report**:
80+
```
81+
Can you write me a report (as a markdown artifact) about the 'simple_pipeline' and tell the story of the history of its runs, which were successful etc., and what stacks worked, which didn't, as well as some performance metrics + recommendations?
82+
```
83+
84+
![Pipeline Analysis Report](../../.gitbook/assets/mcp-pipeline-analysis.png)
85+
86+
2. **Comparative Pipeline Analysis**:
87+
```
88+
Could you analyze all our ZenML pipelines and create a comparison report (as a markdown artifact) that highlights differences in success rates, average run times, and resource usage? Please include a section on which stacks perform best for each pipeline type.
89+
```
90+
91+
![Comparative Pipeline Analysis](../../.gitbook/assets/mcp-comparative-analysis.png)
92+
93+
3. **Stack Component Analysis**:
94+
```
95+
Please generate a comprehensive report or dashboard on our ZenML stack components, showing which ones are most frequently used across our pipelines. Include information about version compatibility issues and performance variations.
96+
```
97+
98+
![Stack Component Analysis](../../.gitbook/assets/mcp_stack_component_analysis.gif)
99+
100+
## Get Involved
101+
102+
We invite you to try the [ZenML MCP Server](https://github.com/zenml-io/mcp-zenml) and share your experiences with us through our [Slack community](https://zenml.io/slack). We're particularly interested in:
103+
104+
- Whether you need additional write actions (creating stacks, registering components, etc.)
105+
- Examples of how you're using the server in your workflows
106+
- Suggestions for additional features or improvements
107+
108+
Contributions and pull requests to [the core repository](https://github.com/zenml-io/mcp-zenml) are always welcome!
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
---
2+
description: Use the ZenML VSCode extension to manage your ZenML server
3+
---
4+
5+
# Use the ZenML VSCode extension to manage your ZenML server
6+
7+
The ZenML VSCode extension is a tool that allows you to manage your ZenML server
8+
from within VSCode. It provides features for stack management, pipeline
9+
visualization, and project management capabilities. You can use it in any IDE
10+
which allows the installation of extensions from the VSCode Marketplace, which
11+
means that Cursor also supports this extension.
12+
13+
![ZenML VSCode Extension](../../.gitbook/assets/vscode-extension.gif)
14+
15+
## How to install the ZenML VSCode extension
16+
17+
You can install the ZenML VSCode extension in several ways:
18+
19+
### From the VSCode Marketplace
20+
21+
1. Open VSCode
22+
2. Navigate to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X on macOS)
23+
3. Search for "ZenML"
24+
4. Click "Install"
25+
26+
### From the Command Line
27+
28+
```bash
29+
code --install-extension zenml.zenml-vscode
30+
```
31+
32+
## Features
33+
34+
The ZenML VSCode extension offers several powerful features:
35+
36+
- **Project Management**: Create, manage, and navigate ZenML projects
37+
- **Stack Visualization**: View and manage your ZenML stacks and components
38+
- **DAG Visualization**: Visualize your pipeline DAGs for better understanding
39+
- **Pipeline Run Management**: Monitor and manage your pipeline runs
40+
- **Stack Registration**: Register new stacks directly from VSCode
41+
42+
## Version Compatibility
43+
44+
The ZenML VSCode extension has different versions that are compatible with specific ZenML library versions. For the best experience, use an extension version that matches your ZenML library.
45+
46+
For a detailed compatibility table, refer to the [ZenML VSCode extension repository](https://github.com/zenml-io/vscode-zenml/blob/develop/VERSIONS.md).
47+
48+
### Installing a Specific Version
49+
50+
If you need to work with an older ZenML version:
51+
52+
#### Using VS Code UI:
53+
1. Go to the Extensions view (Ctrl+Shift+X)
54+
2. Search for "ZenML"
55+
3. Click the dropdown next to the Install button
56+
4. Select "Install Another Version..."
57+
5. Choose the version that matches your ZenML library version
58+
59+
#### Using Command Line:
60+
```bash
61+
# Example for installing version 0.0.11
62+
code --install-extension [email protected]
63+
```
64+
65+
For the best experience, we recommend using the latest version of both the ZenML library and the extension:
66+
67+
```bash
68+
pip install -U zenml
69+
```
70+
71+
## Using the Extension
72+
73+
After installation:
74+
75+
1. **Connect to your ZenML server**: Use the ZenML sidebar in VSCode to connect to your ZenML server
76+
2. **Explore your projects**: Browse through your existing projects or create new ones
77+
3. **Visualize pipelines**: View DAGs of your pipelines to understand their structure
78+
4. **Manage stack components**: Visualize and configure stack components
79+
5. **Monitor runs**: Track the status and details of your pipeline runs
80+
81+
## Troubleshooting
82+
83+
If you encounter issues with the extension:
84+
85+
- Ensure your ZenML library and extension versions are compatible
86+
- Check your server connection settings
87+
- Verify that your authentication credentials are correct
88+
- Try restarting VSCode
89+
90+
For more help, visit the [ZenML GitHub
91+
repository](https://github.com/zenml-io/vscode-zenml) or send us a message on
92+
our [Slack community](https://zenml.io/slack).
93+
94+

docs/book/toc.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
* [Upgrade your ZenML server](how-to/manage-zenml-server/upgrade-zenml-server.md)
2828
* [Best practices for upgrading ZenML](how-to/manage-zenml-server/best-practices-upgrading-zenml.md)
2929
* [Using ZenML server in production](how-to/manage-zenml-server/using-zenml-server-in-prod.md)
30+
* [Use the ZenML VSCode extension](how-to/manage-zenml-server/vscode-extension.md)
31+
* [Chat with your ZenML server](how-to/manage-zenml-server/mcp-chat-with-server.md)
3032
* [Troubleshoot your ZenML server](how-to/manage-zenml-server/troubleshoot-your-deployed-server.md)
3133
* [Migration guide](how-to/manage-zenml-server/migration-guide/migration-guide.md)
3234
* [Migration guide 0.13.2 → 0.20.0](how-to/manage-zenml-server/migration-guide/migration-zero-twenty.md)

0 commit comments

Comments
 (0)