Skip to content

Commit 60bffc7

Browse files
Merge pull request #3102 from telerik/stennlyy/m-MCP-as-NuGet-Net-8-9
Update mcp-server-as-a-nuget.md
2 parents b29d04b + 7a6b491 commit 60bffc7

File tree

1 file changed

+91
-12
lines changed

1 file changed

+91
-12
lines changed

ai-assistant/mcp-server-as-a-nuget.md

Lines changed: 91 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,85 @@ position: 25
99

1010
# Telerik WPF MCP Server (NuGet)
1111

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.
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. Beginning with .NET 10 it can be executed directly via the `dnx` command. For .NET 8 and .NET 9 (where `dnx` is not available) you can install it as a local dotnet tool and invoke its executable.
1313

1414
## Prerequisites
1515

16-
To use the Telerik WPF MCP server via NuGet, you need:
16+
| Target Runtime | Required SDK | Invocation Method | Notes |
17+
|----------------|--------------|-------------------|-------|
18+
| .NET 8 / .NET 9 | .NET 8 or .NET 9 SDK | Local dotnet tool (`telerik-wpf-mcp.exe`) | `dnx` not supported; install tool manually |
19+
| .NET 10 | .NET 10 SDK (Preview 6 or newer) | `dnx` dynamic execution | Simplest approach; no prior install step |
20+
21+
Common requirements:
1722

18-
* .NET 10 SDK (Preview 6 or newer) installed. The SDK is required for the `dnx` command.
1923
* 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.
24+
* A WPF project targeting `net8.0-windows`, `net9.0-windows`, or `net10.0-windows` if you want local project context to be part of AI responses.
2125
* A valid [Telerik license key]({%slug installing-license-key%}).
2226

27+
## Summary of Installation Approaches
28+
29+
| Aspect | .NET 8 / 9 | .NET 10 |
30+
|--------|------------|---------|
31+
| Availability of `dnx` | Not available | Available |
32+
| Install Command | `dotnet tool install --tool-path ./.tools Telerik.WPF.MCP` | None (resolved on demand) |
33+
| Executable Path | `./.tools/telerik-wpf-mcp.exe` | Handled by `dnx` |
34+
| .mcp.json Command | `.\\.tools\\telerik-wpf-mcp.exe` | `dnx` |
35+
| .mcp.json Args | _None_ | `Telerik.WPF.MCP`, `--yes` |
36+
| Update Version | Re-run tool install with `--version` or `tool update` | Handled by latest package resolved by `dnx` |
37+
| Offline Use | Requires prior tool install | Requires prior NuGet cache warm-up |
38+
2339
## Server Installation
2440

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.
41+
### .NET 8 / .NET 9
42+
43+
Install the MCP server as a local tool in your solution root (or another chosen path):
44+
45+
```powershell
46+
dotnet tool install --tool-path ./.tools Telerik.WPF.MCP
47+
```
48+
49+
If updating:
50+
51+
```powershell
52+
dotnet tool update --tool-path ./.tools Telerik.WPF.MCP
53+
```
54+
55+
This creates the executable at `./.tools/telerik-wpf-mcp.exe`.
56+
57+
### .NET 10
58+
59+
No manual install step is needed. The `dnx` command will download and execute the NuGet package on demand.
2660

2761
## Server Configuration
2862

63+
### .NET 8 / .NET 9 Configuration (`.mcp.json`)
64+
65+
Add a `.mcp.json` file to your solution root (or to `%USERPROFILE%` for global usage):
66+
67+
```json
68+
{
69+
"servers": {
70+
"telerik-wpf-assistant": {
71+
"type": "stdio",
72+
"command": ".\\.tools\\telerik-wpf-mcp.exe",
73+
"env": {
74+
"TELERIK_LICENSE_PATH": "THE_PATH_TO_YOUR_LICENSE_FILE"
75+
}
76+
}
77+
}
78+
}
79+
```
80+
81+
If you prefer embedding the license string directly:
82+
83+
```json
84+
"env": {
85+
"TELERIK_LICENSE": "YOUR_LICENSE_KEY"
86+
}
87+
```
88+
89+
### .NET 10 Configuration (`.mcp.json`)
90+
2991
Use these settings when configuring the server in your MCP client:
3092

3193
| Setting | Value |
@@ -38,33 +100,50 @@ Use these settings when configuring the server in your MCP client:
38100

39101
### Workspace-Specific Setup
40102

41-
Add a `.mcp.json` file to your solution (root) folder:
103+
Add a `.mcp.json` file to your solution (root) folder. Choose the variant that matches your target .NET runtime:
104+
105+
#### .NET 8 / .NET 9 Example
106+
107+
```json
108+
{
109+
"servers": {
110+
"telerik-wpf-assistant": {
111+
"type": "stdio",
112+
"command": ".\\.tools\\telerik-wpf-mcp.exe",
113+
"env": {
114+
"TELERIK_LICENSE_PATH": "THE_PATH_TO_YOUR_LICENSE_FILE"
115+
}
116+
}
117+
}
118+
}
119+
```
120+
121+
#### .NET 10 Example (using `dnx`)
42122

43123
```json
44124
{
45-
"inputs": [],
46125
"servers": {
47126
"telerik-wpf-assistant": {
48127
"type": "stdio",
49128
"command": "dnx",
50129
"args": ["Telerik.WPF.MCP", "--yes"],
51130
"env": {
52-
"TELERIK_LICENSE_PATH": "THE_PATH_TO_YOUR_LICENSE_FILE",
53-
// or
54-
"TELERIK_LICENSE": "YOUR_LICENSE_KEY"
131+
"TELERIK_LICENSE_PATH": "THE_PATH_TO_YOUR_LICENSE_FILE"
55132
}
56133
}
57134
}
58135
}
59136
```
60137

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).
138+
You may substitute `TELERIK_LICENSE` instead of `TELERIK_LICENSE_PATH` (see License Configuration section below for details and recommendations). The `inputs` array is optional and not required for current functionality.
139+
140+
After saving the file, 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).
62141

63142
![](images/ai-mcp-server-0.png)
64143

65144
### Global Setup
66145

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`).
146+
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`). The same distinction applies: use the executable path for .NET 8/9, or `dnx` for .NET 10.
68147

69148
## License Configuration
70149

0 commit comments

Comments
 (0)