|
| 1 | +--- |
| 2 | +title: MCP Server as a NuGet Package |
| 3 | +page_title: Telerik Reporting MCP (Model Context Protocol) Server as a NuGet Package |
| 4 | +description: "Learn how to add and use the Telerik Reporting MCP Server via a NuGet package with the dnx command as a Reporting AI coding assistant and code generator for better developer productivity. The Telerik Reporting MCP server provides proprietary context about Telerik Reporting to AI-powered software." |
| 5 | +slug: ai-mcp-server-as-a-nuget |
| 6 | +tags: telerik,reporting,ai,server,dotnet,coding assistant,nuget |
| 7 | +position: 2 |
| 8 | +--- |
| 9 | + |
| 10 | +# Telerik Reporting MCP Server (NuGet) |
| 11 | + |
| 12 | +The Telerik Reporting [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. |
| 13 | + |
| 14 | +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 global dotnet tool](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-install) and invoke its executable. |
| 15 | + |
| 16 | +## Prerequisites |
| 17 | + |
| 18 | +| Target Runtime | Required SDK | Invocation Method | Notes | |
| 19 | +|----------------|--------------|-------------------|-------| |
| 20 | +| .NET 8 / .NET 9 | .NET 8 or .NET 9 SDK | [dotnet tool](https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools) | `dnx` not supported; install tool manually | |
| 21 | +| .NET 10 | .NET 10 SDK (Preview 6 or newer) | `dnx` dynamic execution | Simplest approach; no prior install step | |
| 22 | + |
| 23 | +Additional requirements: |
| 24 | + |
| 25 | +* A [Telerik user account](https://www.telerik.com/account/). |
| 26 | +* An active [license](https://www.telerik.com/purchase/individual/reporting.aspx) covering the usage of Telerik Reporting. |
| 27 | +* An application that uses the [Telerik Reporting]({%slug telerikreporting/welcome-to-telerik-reporting!%}). |
| 28 | + |
| 29 | +## Summary of Installation Approaches |
| 30 | + |
| 31 | +| Aspect | .NET 8 / 9 | .NET 10 | |
| 32 | +|--------|------------|---------| |
| 33 | +| Availability of `dnx` | Not available | Available | |
| 34 | +| Install Command | `dotnet tool install Telerik.Reporting.MCP` | None (resolved on demand) | |
| 35 | +| .mcp.json Command | `dotnet` | `dnx` | |
| 36 | +| .mcp.json Args | `telerik-reporting-assistant` | `Telerik.Reporting.MCP`, `--yes` | |
| 37 | +| Update Version | Re-run tool install with `--version` or `tool update` | Handled by latest package resolved by `dnx` | |
| 38 | +| Offline Use | Requires prior tool install | Requires prior NuGet cache warm-up | |
| 39 | + |
| 40 | +## Server Installation |
| 41 | + |
| 42 | +### .NET 8 / .NET 9 |
| 43 | + |
| 44 | +Install the MCP server as a local tool in your solution root (or another chosen path): |
| 45 | + |
| 46 | +````powershell |
| 47 | +dotnet tool install -g Telerik.Reporting.MCP |
| 48 | +```` |
| 49 | + |
| 50 | +If updating: |
| 51 | + |
| 52 | +````powershell |
| 53 | +dotnet tool update -g Telerik.Reporting.MCP |
| 54 | +```` |
| 55 | + |
| 56 | +These commands install/update the Telerik Reporting MCP [dotnet tool](https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools) globally. Global tools are installed in the following directories by default when you specify the **-g** or **--global** option: |
| 57 | + |
| 58 | +- Windows - `%USERPROFILE%\.dotnet\tools` |
| 59 | +- Linux/MacOS - `$HOME/.dotnet/tools` |
| 60 | + |
| 61 | +### .NET 10 |
| 62 | + |
| 63 | +No manual install step is needed. The `dnx` command will download and execute the NuGet package on demand. |
| 64 | + |
| 65 | +## Server Configuration |
| 66 | + |
| 67 | +### .NET 8 / .NET 9 Configuration (`.mcp.json`) |
| 68 | + |
| 69 | +Add a `.mcp.json` file to your solution root (or to `%USERPROFILE%` for global usage): |
| 70 | + |
| 71 | +````json |
| 72 | +{ |
| 73 | + "servers": { |
| 74 | + "telerik-reporting-assistant": { |
| 75 | + "type": "stdio", |
| 76 | + "command": "dotnet", |
| 77 | + "args": ["telerik-reporting-assistant"], |
| 78 | + "env": { |
| 79 | + "TELERIK_LICENSE_PATH": "THE_PATH_TO_YOUR_LICENSE_FILE" |
| 80 | + } |
| 81 | + } |
| 82 | + } |
| 83 | +} |
| 84 | +```` |
| 85 | + |
| 86 | +If you prefer embedding the license string directly: |
| 87 | + |
| 88 | +````json |
| 89 | +"env": { |
| 90 | + "TELERIK_LICENSE": "YOUR_LICENSE_KEY" |
| 91 | +} |
| 92 | +```` |
| 93 | + |
| 94 | +### .NET 10 Configuration (`.mcp.json`) |
| 95 | + |
| 96 | +Use these settings when configuring the server in your MCP client: |
| 97 | + |
| 98 | +````json |
| 99 | +{ |
| 100 | + "servers": { |
| 101 | + "telerik-reporting-assistant": { |
| 102 | + "type": "stdio", |
| 103 | + "command": "dnx", |
| 104 | + "args": [ |
| 105 | + "Telerik.Reporting.MCP", |
| 106 | + "--yes" |
| 107 | + ], |
| 108 | + "env": { |
| 109 | + "TELERIK_LICENSE_PATH": "THE_PATH_TO_YOUR_LICENSE_FILE" |
| 110 | + } |
| 111 | + } |
| 112 | + } |
| 113 | +} |
| 114 | +```` |
| 115 | + |
| 116 | + |
| 117 | +You may substitute `TELERIK_LICENSE` instead of `TELERIK_LICENSE_PATH` (*see [License Configuration](#license-configuration) section below for details and recommendations*). The `inputs` array is optional and not required for the current functionality. |
| 118 | + |
| 119 | +After saving the file, restart Visual Studio and enable the `telerik-reporting-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). |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | +### Global Setup |
| 124 | + |
| 125 | +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`). |
| 126 | + |
| 127 | +### Telerik Visual Studio Extension Setup: |
| 128 | + |
| 129 | +The `.mcp.json` file can be created and updated by using the [Telerik Visual Studio Extension]({%slug reporting-integration-with-visual-studio%}) menu in Visual Studio. |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | +The `Configure MCP Server Globally` option creates (or updates if existing) the global `%USERPROFILE%\.mcp.json` file and adds the Telerik server entry. |
| 134 | + |
| 135 | +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. |
| 136 | + |
| 137 | +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) an [copilot-instructions.md](https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions?tool=visualstudio) file 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. |
| 138 | + |
| 139 | +## License Configuration |
| 140 | + |
| 141 | +Add your [Telerik license key]({%slug license-key%}) using one of these options in the `env` section. |
| 142 | + |
| 143 | +__Option 1: License File Path (Recommended)__ |
| 144 | + |
| 145 | +````json |
| 146 | +"env": { |
| 147 | + "TELERIK_LICENSE_PATH": "THE_PATH_TO_YOUR_LICENSE_FILE" |
| 148 | +} |
| 149 | +```` |
| 150 | + |
| 151 | +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: |
| 152 | + |
| 153 | +`"TELERIK_LICENSE_PATH": "%appdata%/Telerik/telerik-license.txt"` |
| 154 | + |
| 155 | +__Option 2: Direct License Key__ |
| 156 | + |
| 157 | +````json |
| 158 | +"env": { |
| 159 | + "TELERIK_LICENSE": "YOUR_LICENSE_KEY_HERE" |
| 160 | +} |
| 161 | +```` |
| 162 | + |
| 163 | +> Option 1 is recommended unless you're sharing settings across different systems. Remember to [update your license key]({%slug license-key%}#updating-your-license-key) when necessary. |
| 164 | +
|
| 165 | +## Visual Studio Usage |
| 166 | + |
| 167 | +After configuration and restart: |
| 168 | + |
| 169 | +1. Open Copilot Chat. |
| 170 | +2. Enable the `telerik-reporting-assistant` tool. |
| 171 | +3. Grant permissions when prompted (*per session, workspace, or always*). |
| 172 | + |
| 173 | + |
| 174 | + |
| 175 | +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**). |
| 176 | + |
| 177 | + |
| 178 | + |
| 179 | +## Usage |
| 180 | + |
| 181 | +Begin prompts with any of these triggers to explicitly invoke the server: |
| 182 | + |
| 183 | +- `/telerik` / `@telerik` / `#telerik` |
| 184 | +- `/telerikreporting` / `@telerikreporting` / `#telerikreporting` |
| 185 | +- `#telerik-reporting-assistant` |
| 186 | + |
| 187 | +## Sample Prompts |
| 188 | + |
| 189 | +Examples you can try: |
| 190 | + |
| 191 | +* `#telerik-reporting-assistant How do I set up the Telerik Reporting REST Service in an ASP.NET Core project that targets .NET 10?` |
| 192 | +* `#telerik-reporting-assistant Can I use a database as a storage for my report files in the Reporting REST service? Show me an example.` |
| 193 | +* `#telerik-reporting-assistant How to change the displayed report after a button is clicked in the Native Blazor Report Viewer?` |
| 194 | + |
| 195 | +## See Also |
| 196 | + |
| 197 | +* [AI Coding Assistant Overview]({%slug ai-coding-assistant%}) |
| 198 | +* [npm-based Telerik Reporting MCP Server]({%slug ai-mcp-server%}) |
0 commit comments