New to Telerik UI for ASP.NET CoreStart a free 30-day trial

Telerik ASP.NET Core MCP Server

The Telerik ASP.NET Core MCP Server lets you interact with AI and reach new levels of developer productivity. The MCP server provides proprietary context to AI-powered IDEs, apps and tools. You can use the Telerik ASP.NET Core MCP server for ASP.NET Core AI code generation and ask about Telerik UI for ASP.NET Core components, features, or general usage. You can successfully prompt more complex questions and tasks, and generate tailored code that includes Telerik UI for ASP.NET Core HtmlHelper and TagHelper components, along with their APIs.

Prerequisites

To use the Telerik ASP.NET Core MCP server, you need:

Installation

Use the documentation of your AI-powered MCP client to add the Telerik ASP.NET Core HtmlHelper or Telerik ASP.NET Core TagHelper MCP server to a specific workspace or globally. You can see installation tips and examples for some popular MCP clients below.

The generic settings of the Telerik ASP.NET Core MCP server are:

  • npm package name: @progress/telerik-aspnetcore-html-mcp for HtmlHelper and telerik-aspnetcore-tag-mcp for TagHelper
  • Type: stdio (standard input/output transport)
  • Command: npx (the MCP server works through an npm package)
  • Arguments: -y
  • Server name: telerikAspnetcoreHtmlAssistant for HtmlHelper and telerikAspnetcoreTagAssistant for TagHelper

You also need to add your Telerik licence key as an env parameter in the mcp.json file. There are two options:

  • (recommended) Use a TELERIK_LICENSE_PATH argument and point to the location of your Telerik license file.
  • Use a TELERIK_LICENSE argument and paste your Telerik license key. Make sure to update the license key when necessary.
  • Do not use hyphens (-) or underscores (_) in the MCP server name in the MCP .json file, due to potential compatibility issues with some MCP clients, such as Visual Studio.
  • Some MCP clients expect the MCP servers to be listed under a servers JSON key, while others expect mcpServers.
  • Some MCP clients expect an mcp.json file, while others like Visual Studio 2022 expect an .mcp.json file.

Visual Studio

For detailed instructions, refer to Use MCP servers in Visual Studio.

Early Visual Studio 17.14 versions require the Copilot Chat window to be open and active when you open a solution. Otherwise the Telerik MCP server is not used.

Workspace Configuration

To enable the Telerik MCP Servers in a specific ASP.NET Core app, add a .mcp.json file to the solution folder:

  • Telerik ASP.NET Core HtmlHelpers MCP Server

    .mcp.json

    JSON
    {
      "servers": {
        "telerikAspnetcoreHtmlAssistant": {
          "type": "stdio",
          "command": "npx",
          "args": [ "-y", "@progress/telerik-aspnetcore-html-mcp@latest" ],
          "env": {
            "TELERIK_LICENSE_PATH": "C:\\Users\\___\\AppData\\Roaming\\Telerik\\telerik-license.txt"
          }
        }
      }
    }
  • Telerik ASP.NET Core TagHelpers MCP Server

    .mcp.json

    JSON
    {
      "servers": {
        "telerikAspnetcoreTagAssistant": {
          "type": "stdio",
          "command": "npx",
          "args": [ "-y", "@progress/telerik-aspnetcore-tag-mcp@latest" ],
          "env": {
            "TELERIK_LICENSE_PATH": "C:\\Users\\lukanova\\AppData\\Roaming\\Telerik\\telerik-license.txt"
          }
        }
      }
    }

Global Configuration

To enable global automatic discovery of the Telerik MCP Servers in Visual Studio, add the above .mcp.json file to your user directory (%USERPROFILE%), for example, C:\Users\____\.mcp.json.

Once the Telerik MCP server is added, make sure that the telerikAspnetcoreHtmlAssistant or telerikAspnetcoreTagAssistant tool is enabled (checked) in the Copilot Chat window's tool selection dropdown. This dropdown opens when clicking on a wrench icon 🔧 at the bottom of the Copilot Window. The Telerik MCP server may get disabled when starting a new chat, changing threads, or relaunching Visual Studio. This is a known issue with MCP servers in general.

VS Code

For detailed instructions, refer to Use MCP servers in VS Code.

This section applies to VS Code 1.102.1 and newer versions.

Make sure that chat.mcp.enabled is enabled in the VS Code settings.

Workspace Configuration

To enable the Telerik MCP Servers in a specific workspace or ASP.NET Core app, add a .vscode folder with an mcp.json file at the root of the workspace with the following content:

  • Telerik ASP.NET Core HtmlHelpers MCP Server

    .vscode/mcp.json

    JSON
    {
      "servers": {
        "telerikAspnetcoreHtmlAssistant": {
          "type": "stdio",
          "command": "npx",
          "args": [ "-y", "@progress/telerik-aspnetcore-html-mcp@latest" ],
          "env": {
            "TELERIK_LICENSE_PATH": "C:\\Users\\___\\AppData\\Roaming\\Telerik\\telerik-license.txt"
          }
        }
      }
    }
  • Telerik ASP.NET Core TagHelpers MCP Server

    .vscode/mcp.json

    JSON
    {
      "servers": {
        "telerikAspnetcoreTagAssistant": {
          "type": "stdio",
          "command": "npx",
          "args": [ "-y", "@progress/telerik-aspnetcore-tag-mcp@latest" ],
          "env": {
            "TELERIK_LICENSE_PATH": "C:\\Users\\lukanova\\AppData\\Roaming\\Telerik\\telerik-license.txt"
          }
        }
      }
    }

This enables you to call the respective MCP Server with the #telerikCoreAssistant.

Global Configuration

To add the Telerik MCP Servers globally for VS Code, run the MCP: Open User Configuration command from the Command Palette and add the above content to the automatically created mcp.json file in your user folder.

Alternatively, manually create an mcp.json file with the above content in your user folder.

Also, ensure that chat.mcp.discovery.enabled is enabled in settings.json.

VS Code settings.json

JSON
{
  // ...
  "chat.mcp.discovery.enabled": true,
}

Cursor

For detailed instructions, refer to Model Context Protocol.

Workspace Configuration

To enable the Telerik MCP servers in a specific workspace or ASP.NET Core app, add a .cursor folder with an mcp.json file at the root of the workspace with the following content:

  • Telerik ASP.NET Core HtmlHelpers MCP Server

    .cursor/mcp.json

    JSON
    {
      "mcpServers": {
        "telerikAspnetcoreHtmlAssistant": {
          "type": "stdio",
          "command": "npx",
          "args": [ "-y", "@progress/telerik-aspnetcore-html-mcp@latest" ],
          "env": {
            "TELERIK_LICENSE_PATH": "C:\\Users\\___\\AppData\\Roaming\\Telerik\\telerik-license.txt"
          }
        }
      }
    }
  • Telerik ASP.NET Core TagHelpers MCP Server

    .cursor/mcp.json

    JSON
    {
      "mcpServers": {
        "telerikAspnetcoreTagAssistant": {
          "type": "stdio",
          "command": "npx",
          "args": [ "-y", "@progress/telerik-aspnetcore-tag-mcp@latest" ],
          "env": {
            "TELERIK_LICENSE_PATH": "C:\\Users\\lukanova\\AppData\\Roaming\\Telerik\\telerik-license.txt"
          }
        }
      }
    }

This enables you to call the respective MCP Server with the #telerikCoreAssistant.

Global Configuration

To add the Telerik MCP Servers globally for Cursor, add a .cursor folder with the above mcp.json file in your user folder.

Usage

When switching between tasks and files, start a new session in a new chat window to avoid polluting the context with irrelevant or outdated information.

To use the Telerik ASP.NET Core MCP Server:

  1. Start your prompt with #telerikCoreAssistant (or with # followed by your custom server name, if set).

  2. Confirm that the respective Telerik MCP server is used, because this doesn't happen deterministically. Look for a statement in the output, which is similar to:

    • Running telerikAspnetcoreHtmlAssistant or Running telerikAspnetcoreTagAssistant (in VS Code)
    • Calling MCP tool telerikAspnetcoreHtmlAssistant or Calling MCP tool telerikAspnetcoreTagAssistant (in Cursor)

    MCP Server uses Telerik ASP.NET Core AI Coding Assistant in VS Code

  3. If the Telerik MCP server is not used even though it's installed and enabled, double-check the server name in your configuration and try rephrasing your prompt using another trigger syntax from the list in step 1.

  4. If requested, grant the Telerik MCP server a permission to run for this session, workspace, or always.

  5. If you want to prompt for information or code that are not related to your previous prompts, it is a good practice to start a new session in a new chat window, so that the context is not polluted by irrelevant old information.

To increase the probability of the Telerik ASP.NET Core MCP Server being used, or to call it without the need to mention "telerik" explicitly, add custom instructions to your AI-powered tool. Here are examples for GitHub Copilot and Cursor.

Sample Prompts

The following list describes how your prompts may look like:

  • When generating HtmlHelper components:

    • "@telerikaspnetcorehtml Generate a Telerik UI for ASP.NET Core Grid with sorting and paging enabled. Bind the Grid to dummy data."
    • "@telerikaspnetcorehtml Generate a ComboBox that shows a list of products. Create a Product class and generate sample data."
    • "@telerikaspnetcorehtml Show me sample code for a Telerik UI for ASP.NET Core Grid with virtual scrolling for the rows and columns."
  • When generating TagHelper components:

    • "@telerikaspnetcoretag Generate a Telerik UI for ASP.NET Core Grid with sorting and paging enabled. Bind the Grid to dummy data."
    • "@telerikaspnetcoretag Generate a ComboBox that shows a list of products. Create a Product class and generate sample data."
    • "@telerikaspnetcoretag Show me sample code for a Telerik UI for ASP.NET Core Grid with virtual scrolling for the rows and columns."

Usage Limits

A Telerik Subscription license is recommended in order to use the Telerik ASP.NET Core AI Coding Assistant without restrictions. Perpetual license holders and trial users can make a limited number of requests per year.

Connect to Local AI Model

You can use the Telerik ASP.NET Core MCP server with local large language models (LLM). For example, run your local model through Ollama and use a third-party package such as MCP-LLM Bridge to connect the model to the Telerik MCP server. This will allow you to use the Telerik AI Coding Assistant without a cloud-based AI model.

See Also