Skip to content

Commit 0095dbf

Browse files
Merge pull request #3098 from telerik/stennlyy/d-mcp-as-nuget
Add an article for the MCP Server as a NuGet
2 parents 92af08d + 964340f commit 0095dbf

File tree

1 file changed

+133
-0
lines changed

1 file changed

+133
-0
lines changed
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
title: MCP Server as a NuGet Package
3+
page_title: Telerik WPF MCP (Model Context Protocol) Server as a NuGet Package
4+
description: Learn how to add and use the Telerik WPF MCP Server via a NuGet package with the dnx command as a WPF AI coding assistant and code generator for better developer productivity. The Telerik WPF MCP server provides proprietary context about Telerik UI for WPF to AI-powered software.
5+
slug: ai-mcp-server-as-a-nuget
6+
tags: telerik,WPF,ai,ai server,dotnetWPF,coding assistant,nuget
7+
position: 25
8+
---
9+
10+
# Telerik WPF MCP Server (NuGet)
11+
12+
The Telerik WPF [MCP (Model Context Protocol) Server](https://modelcontextprotocol.io/introduction) is also available as a NuGet package. This NuGet distribution exposes the same AI Coding Assistant functionality as the npm package, but is executed through the `dnx` command introduced with the .NET 10 SDK. It supplies specialized context about Telerik UI for WPF components so AI-powered IDEs and tools can generate more accurate, tailored XAML and C# code.
13+
14+
## Prerequisites
15+
16+
To use the Telerik WPF MCP server via NuGet, you need:
17+
18+
* .NET 10 SDK (Preview 6 or newer) installed. The SDK is required for the `dnx` command.
19+
* An [MCP-compatible client](https://modelcontextprotocol.io/clients) that supports MCP tools (latest version recommended).
20+
* A WPF project targeting `net10.0-windows` if you want local project context to be part of AI responses.
21+
* A valid [Telerik license key]({%slug installing-license-key%}).
22+
23+
## Server Installation
24+
25+
The NuGet-based server does not require a manual `dotnet add package` step. The `dnx` command will download and execute the NuGet package on demand.
26+
27+
## Server Configuration
28+
29+
Use these settings when configuring the server in your MCP client:
30+
31+
| Setting | Value |
32+
|---------|-------|
33+
| Package Name | `Telerik.WPF.MCP` |
34+
| Type | `stdio` |
35+
| Command | `dnx` |
36+
| Arguments | `Telerik.WPF.MCP`, `--yes` |
37+
| Server Name | `telerik-wpf-assistant` (customizable) |
38+
39+
### Workspace-Specific Setup
40+
41+
Add a `.mcp.json` file to your solution (root) folder:
42+
43+
```json
44+
{
45+
"inputs": [],
46+
"servers": {
47+
"telerik-wpf-assistant": {
48+
"type": "stdio",
49+
"command": "dnx",
50+
"args": ["Telerik.WPF.MCP", "--yes"],
51+
"env": {
52+
"TELERIK_LICENSE_PATH": "THE_PATH_TO_YOUR_LICENSE_FILE",
53+
// or
54+
"TELERIK_LICENSE": "YOUR_LICENSE_KEY"
55+
}
56+
}
57+
}
58+
}
59+
```
60+
61+
Restart Visual Studio and enable the `telerik-wpf-assistant` tool in the [Copilot Chat window's tool selection dropdown](https://learn.microsoft.com/en-us/visualstudio/ide/mcp-servers?view=vs-2022#configuration-example-with-github-mcp-server).
62+
63+
![](images/ai-mcp-server-0.png)
64+
65+
### Global Setup
66+
67+
To enable the server globally for all projects, add the `.mcp.json` file to your user directory (`%USERPROFILE%`, e.g., `C:\Users\YourName\.mcp.json`).
68+
69+
## License Configuration
70+
71+
Add your [Telerik license key]({%slug installing-license-key%}) using one of these options in the `env` section.
72+
73+
__Option 1: License File Path (Recommended)__
74+
75+
```json
76+
"env": {
77+
"TELERIK_LICENSE_PATH": "THE_PATH_TO_YOUR_LICENSE_FILE"
78+
}
79+
```
80+
81+
The `THE_PATH_TO_YOUR_LICENSE_FILE` should point to the `telerik-license.txt` file, usually in the AppData folder. Often it will look like:
82+
83+
`"TELERIK_LICENSE_PATH": "%appdata%/Telerik/telerik-license.txt"`
84+
85+
__Option 2: Direct License Key__
86+
87+
```json
88+
"env": {
89+
"TELERIK_LICENSE": "YOUR_LICENSE_KEY_HERE"
90+
}
91+
```
92+
93+
> Option 1 is recommended unless you're sharing settings across different systems. Remember to [update your license key]({%slug installing-license-key%}#updating-your-license-key) when necessary.
94+
95+
## Visual Studio Usage
96+
97+
After configuration and restart:
98+
99+
1. Open Copilot Chat.
100+
2. Enable the `telerik-wpf-assistant` tool.
101+
3. Grant permissions when prompted (per session, workspace, or always).
102+
103+
![](images/ai-mcp-server-1.png)
104+
105+
Start fresh sessions for unrelated prompts to avoid context pollution. You can check the Output pane of Visual Studio for diagnostics (select output from GitHub Copilot).
106+
107+
![](images/ai-mcp-server-2.png)
108+
109+
## Usage
110+
111+
Begin prompts with any of these triggers to explicitly invoke the server:
112+
113+
- `/telerik` / `@telerik` / `#telerik`
114+
- `/telerikwpf` / `@telerikwpf` / `#telerikwpf`
115+
- `#telerik-wpf-assistant`
116+
117+
## Sample Prompts
118+
119+
Examples you can try:
120+
121+
* `/telerik Give me an example of binding an ObservableCollection<Customer> to a RadGridView, including sorting and grouping.`
122+
* `/telerikWPF Create a RadComboBox bound to a list of countries in MVVM, displaying country names but binding the SelectedValue to a CountryCode property.`
123+
* `/telerik Show XAML and ViewModel code for a RadTreeView bound to a hierarchical ObservableCollection<Category> where each category contains products. Expand all categories by default.`
124+
125+
## Number of Requests
126+
127+
@[template](/_contentTemplates/ai-coding-assistant.md#number-of-requests)
128+
129+
## See Also
130+
131+
* [Telerik WPF GitHub Copilot Extension]({%slug ai-copilot-extension%})
132+
* [AI Coding Assistant Overview]({%slug ai-overview%})
133+
* [npm-based Telerik WPF MCP Server]({%slug ai-mcp-server%})

0 commit comments

Comments
 (0)