# Getting Started with the Telerik WPF Agentic UI Generator

The Telerik WPF [Model Context Protocol (MCP) Server](https://modelcontextprotocol.io/introduction) delivers the Agentic UI Generator to MCP-compatible AI clients, providing specialized context about Telerik UI for WPF components.

The Agentic UI Generator uses this MCP server to help AI-powered integrated development environments (IDEs) and tools generate more accurate, tailored code that uses [Telerik UI for WPF components](https://www.telerik.com/WPF-ui) and APIs. You can ask complex questions about Telerik components, request specific implementations, and generate comprehensive code solutions.

## How to Install the Telerik WPF MCP Server

The MCP Server is available as a NuGet 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.

## Install with Telerik CLI (Recommended)

The easiest way to install and configure the Telerik WPF MCP Server is through the [Telerik CLI](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/telerik-cli). A single command line sets up the MCP server for your IDE automatically:

```powershell
telerik mcp config wpf
```

This command automatically creates or updates the `.mcp.json` configuration file for all supported IDEs. You can also specify a target IDE with the `--ide` option (for example, `telerik mcp config wpf --ide vscode`). For more details, see [how to install the WPF MCP server with Telerik CLI](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/telerik-cli#install-wpf-mcp-server).

## Install with .NET CLI Commands

Another approach to install the Telerik WPF MCP Server is to use .NET10 or .NET8/9 commands.

## Prerequisites

| Target Runtime        | Required SDK                     | Invocation Method                               | Notes                                      |
| --------------------- | -------------------------------- | ----------------------------------------------- | ------------------------------------------ |
| .NET 10 (recommended) | .NET 10 SDK (Preview 6 or newer) | `dnx` dynamic execution                         | Simplest approach; no prior install step   |
| .NET 8 / .NET 9       | .NET 8 or .NET 9 SDK             | Local dotnet tool (`telerik-wpf-assistant.exe`) | `dnx` not supported; install tool manually |

Common requirements:

* An [MCP-compatible client](https://modelcontextprotocol.io/clients) that supports MCP tools (latest version recommended).
* A WPF project targeting `net10.0-windows` (recommended), `net8.0-windows` or `net9.0-windows`
* A valid [Telerik UI for WPF license key file](https://www.telerik.com/products/wpf/documentation/installation/licensing/installing-license-key).

## Summary of Installation Approaches

| Aspect                | .NET 10                                     | .NET 8 / 9                                                 |
| --------------------- | ------------------------------------------- | ---------------------------------------------------------- |
| Availability of `dnx` | Available                                   | Not available                                              |
| Install Command       | None (resolved on demand)                   | `dotnet tool install --tool-path ./.tools Telerik.WPF.MCP` |
| Executable Path       | Handled by `dnx`                            | `./.tools/telerik-wpf-assistant.exe`                       |
| .mcp.json Command     | `dnx`                                       | `.\\.tools\\telerik-wpf-assistant.exe`                     |
| .mcp.json Args        | `Telerik.WPF.MCP`, `--yes`                  | *None*                                                     |
| Update Version        | Handled by latest package resolved by `dnx` | Re-run tool install with `--version` or `tool update`      |
| Offline Use           | Requires prior NuGet cache warm-up          | Requires prior tool install                                |

### .NET 10

No manual install step is needed. The `dnx` command will download and execute the NuGet package on demand.

### .NET 8 / .NET 9

Install the MCP server as a local tool in your solution root (or another chosen path):

```powershell
dotnet tool install --tool-path ./.tools Telerik.WPF.MCP
```

If updating:

```powershell
dotnet tool update --tool-path ./.tools Telerik.WPF.MCP
```

This creates the executable at `./.tools/telerik-wpf-assistant.exe`.

## Server Configuration

### .NET 10 (recommended) Configuration (`.mcp.json`)

Use these settings when configuring the server in your MCP client:

| Setting      | Value                                  |
| ------------ | -------------------------------------- |
| Package Name | `Telerik.WPF.MCP`                      |
| Type         | `stdio`                                |
| Command      | `dnx`                                  |
| Arguments    | `Telerik.WPF.MCP`, `--yes`             |
| Server Name  | `telerik-wpf-assistant` (customizable) |

### .NET 8 / .NET 9 Configuration (`.mcp.json`)

Add a `.mcp.json` file to your solution root (or to `%USERPROFILE%` for global usage). In the examples below, replace `<license-file-path>` with the path to your `telerik-license.txt` file. Escape backslashes as `\\` in JSON strings. If you use `<license-key>` instead, replace it with the contents of your license key file.

```json
{
  "servers": {
    "telerik-wpf-assistant": {
      "type": "stdio",
      "command": ".\\.tools\\telerik-wpf-assistant.exe",
      "env": {
        "TELERIK_LICENSE_PATH": "<license-file-path>"
      }
    }
  }
}
```

If you prefer embedding the license string directly:

```json
"env": {
  "TELERIK_LICENSE": "<license-key>"
}
```

### Workspace-Specific Setup

Add a `.mcp.json` file to your solution (root) folder. Choose the variant that matches your target .NET runtime:

#### .NET 10 Example (using `dnx`)

```json
{
  "servers": {
    "telerik-wpf-assistant": {
      "type": "stdio",
      "command": "dnx",
      "args": ["Telerik.WPF.MCP", "--yes"],
      "env": {
        "TELERIK_LICENSE_PATH": "<license-file-path>"
      }
    }
  }
}
```

#### .NET 8 / .NET 9 Example

```json
{
  "servers": {
    "telerik-wpf-assistant": {
      "type": "stdio",
      "command": ".\\.tools\\telerik-wpf-assistant.exe",
      "env": {
        "TELERIK_LICENSE_PATH": "<license-file-path>"
      }
    }
  }
}
```

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.

After saving the file, restart Visual Studio and enable the `telerik-wpf-assistant` tool in the [Visual Studio Copilot Chat tool selection dropdown](https://learn.microsoft.com/en-us/visualstudio/ide/mcp-servers?view=vs-2022#configuration-example-with-github-mcp-server).

![Telerik UI for WPF Agentic UI Generator setup in Visual Studio Copilot Chat tool selection](https://www.telerik.com/products/wpf/documentation/assets/93bf3c24ba20e0438a3c01079a6e570c/ai-mcp-server-0.png)

### Global Setup

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.

### Telerik Visual Studio Extension Setup:

The `.mcp.json` file can be created and updated by using the [Telerik Visual Studio Extension](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/visual-studio-extensions/extensions-overview) menu in Visual Studio.

![Telerik UI for WPF Agentic UI Generator Telerik Visual Studio Extension menu with MCP server configuration options](https://www.telerik.com/products/wpf/documentation/assets/9dc2c92cab48fd56a33e5cadd573af3e/ai-mcp-server-1.png)

The `Configure MCP Server Globally` option creates (or updates if existing) the global `%USERPROFILE%\.mcp.json` file and adds  the Telerik server entry.

The `Configure MCP Server for Solution` option is visible only if you have a project opened in Visual Studio. The option creates (or updates if existing) the  `.mcp.json` file in the solution directory.

The `Add/Update GitHub Copilot Instructions` option is visible only if you have a project opened in Visual Studio. The option creates (or updates if existing) a [repository `copilot-instructions.md` file for Visual Studio](https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions?tool=visualstudio) in the `.github\` folder of the solution (`\SolutionDir\.github\copilot-instructions.md`), which includes extra context that is automatically used with the prompt given to the Copilot chat in Visual Studio.

## License Configuration

Add your [Telerik UI for WPF license key file](https://www.telerik.com/products/wpf/documentation/installation/licensing/installing-license-key) using one of these options in the `env` section.

### Option 1: License File Path (Recommended)

Replace `<license-file-path>` with the path to your `telerik-license.txt` file:

```json
"env": {
  "TELERIK_LICENSE_PATH": "<license-file-path>"
}
```

The `<license-file-path>` should point to the `telerik-license.txt` file, usually in the AppData folder. Often it will look like:

`"TELERIK_LICENSE_PATH": "%appdata%/Telerik/telerik-license.txt"`

### Option 2: Direct License Key

Replace `<license-key>` with the contents of your license key file:

```json
"env": {
  "TELERIK_LICENSE": "<license-key>"
}
```

> note Option 1 is recommended unless you're sharing settings across different systems. Remember to [update your Telerik UI for WPF license key](https://www.telerik.com/products/wpf/documentation/installation/licensing/installing-license-key#updating-your-license-key) when necessary.

## Visual Studio Usage

For complete setup instructions, see [Microsoft's guide to using MCP servers in Visual Studio](https://learn.microsoft.com/en-us/visualstudio/ide/mcp-servers).

After configuration and restart:

1. Open Copilot Chat.
2. Enable the `telerik-wpf-assistant` tool.
3. Grant permissions when prompted (per session, workspace, or always).

   ![Telerik UI for WPF Agentic UI Generator in Visual Studio Copilot Chat with the telerik-wpf-assistant tool enabled](https://www.telerik.com/products/wpf/documentation/assets/b46027d44d4d7366de371d4dec6a034c/ai-mcp-server-2.png)

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).

![Telerik UI for WPF Agentic UI Generator Visual Studio Output pane showing GitHub Copilot diagnostics](https://www.telerik.com/products/wpf/documentation/assets/a44c5dde730d6cbf3b91b71adbb1c6ad/ai-mcp-server-3.png)

## Troubleshooting

> warning **Known Issue: Hanging tool calls in Visual Studio**
>
> When using Telerik AI tools in Visual Studio, GitHub Copilot may:
>
> * **hang** during tool invocation;
> * show UI for a successful tool response, but actually **fail silently**;
> * continue generation without waiting for **parallel tool calls**.
>
> In these cases, the response may be generated but not provided to the Copilot Agent UI.
> This is a known issue in Visual Studio Copilot, not related to Telerik MCP servers or AI tools, and does not reproduce in VS Code.
> For more details, see the [Visual Studio Developer Community issue about Copilot tool calls](https://developercommunity.visualstudio.com/t/Copilot-stopped-working-after-latest-upd/10936456).
>
> Microsoft has acknowledged the issue and marked it as **Fixed - Pending Release**. A future Visual Studio update is expected to resolve it.

## Usage

Begin prompts with any of these triggers to explicitly invoke the server:

* `/telerik` / `@telerik` / `#telerik`

* `/telerikwpf` / `@telerikwpf` / `#telerikwpf`

* `#telerik-wpf-assistant`

Grant permissions when prompted (per session, workspace, or always).

![Telerik UI for WPF Agentic UI Generator in Visual Studio Copilot Chat with the telerik-wpf-assistant tool enabled](https://www.telerik.com/products/wpf/documentation/assets/b46027d44d4d7366de371d4dec6a034c/ai-mcp-server-2.png)

Start fresh sessions for unrelated prompts to avoid context pollution.

You can check the Output pane of Visual Studio for diagnostics information related to Copilot. To display the relevant information, select to show output from GitHub Copilot.

![Telerik UI for WPF Agentic UI Generator Visual Studio Output pane showing GitHub Copilot diagnostics](https://www.telerik.com/products/wpf/documentation/assets/a44c5dde730d6cbf3b91b71adbb1c6ad/ai-mcp-server-3.png)

## Sample Prompts

Examples you can try:

* `/telerik Give me an example of binding an ObservableCollection<Customer> to a RadGridView, including sorting and grouping.`
* `/telerikWPF Create a RadComboBox bound to a list of countries in MVVM, displaying country names but binding the SelectedValue to a CountryCode property.`
* `/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.`

### Improving Server Usage

To increase the likelihood of the Telerik MCP server being used, add custom instructions to your AI tool:

* [GitHub Copilot repository custom instructions guide](https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot#about-repository-custom-instructions-for-github-copilot-chat)

## Number of Requests

A Telerik [Subscription license](https://www.telerik.com/purchase/faq/licensing-purchasing) is required in order to use the Telerik WPF AI Coding Assistant. Trial users can make a [limited number of requests per year](https://www.telerik.com/products/wpf/documentation/ai-tools/overview#license-requirements).

## Local AI Model Integration

You can use the Telerik WPF MCP server with local large language models (LLMs):

1. Run a local model, for example, through [the Ollama local LLM runtime](https://ollama.com/).
2. Use a bridge package like [the MCP-LLM Bridge project for Ollama](https://github.com/patruff/ollama-mcp-bridge).
3. Connect your local model to the Telerik MCP server.

This setup allows you to use the Telerik WPF Agentic UI Generator without cloud-based AI models.
