@progress/kendo-react-mcp 1.4.2-dev.f821a001.0 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +53 -49
- package/dist/index.js +12 -12
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# KendoReact MCP Server
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The KendoReact [MCP Server](https://modelcontextprotocol.io/introduction) enables you to achieve integration with your already existing AI workflows and reach new levels of developer productivity. The MCP server provides proprietary context to AI-powered IDEs, apps and tools. You can use the KendoReact MCP Server to ask about KendoReact components, features, or general usage. You can successfully prompt more complex questions and tasks, and generate tailored code that includes KendoReact components and API.
|
|
4
4
|
|
|
5
|
-
As of version 1.4 the
|
|
5
|
+
As of version 1.4 the KendoReact MCP server supports [two modes of operation](https://www.telerik.com/kendo-react-ui/components/ai-tools#ai-tools-overview-and-comparison) that depends on your [Telerik license type](https://www.telerik.com/purchase/faq/licensing-purchasing):
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* **Initial code generation**: Quickly add components to your app to speed up the initial development.
|
|
10
|
-
* **Component configuration**: Enable or disable specific component features, or fine tune the configuration through prompting. More * complex configurations are possible but may require additional manual work to be production-ready.
|
|
11
|
-
* **Dummy data generation and data binding**: Quickly add data to your app for testing and prototyping purposes. Avoid exposing or providing access to your proprietary or production data to AI-enabled tools.
|
|
12
|
-
* **Step-by-step explanations**: Understand the solutions provided by the AI Coding Assistant through the detailed explanations (depends * on the tool, mode, and model used). To further develop your knowledge, check the respective documentation.
|
|
13
|
-
* **Preliminary troubleshooting**: Resolve obvious and easy-to-solve issues affecting your code. For more complex issues, look for assistance from the community or contact the support team.
|
|
7
|
+
* **Agentic UI Generator**—Includes all four specialized tools (Component, Layout, Styling, and Icon), coordinated by a comprehensive orchestrator designed for complete UI generation.
|
|
8
|
+
* **AI Coding Assistant**—Includes the Component Tool and Icon Tool, coordinated by an orchestrator optimized for component-level development.
|
|
14
9
|
|
|
15
10
|
## **Agentic UI Generator** Intended Use
|
|
16
11
|
|
|
17
|
-
* **Create Individual Components**: Build specific
|
|
12
|
+
* **Create Individual Components**: Build specific KendoReact components with particular configurations and features like filtering, validation, and data binding.
|
|
18
13
|
* **Create Full Responsive Pages**
|
|
19
14
|
* Build complete dashboards, landing pages, and listing pages in existing applications.
|
|
20
15
|
* Generate pages similar to the [Progress Design System page templates](https://www.telerik.com/design-system/docs/ui-templates/overview/).
|
|
@@ -23,19 +18,26 @@ As of version 1.4 the Kendo UI for React MCP server supports two modes of operat
|
|
|
23
18
|
* Create new responsive pages and sections.
|
|
24
19
|
* Convert existing pages to be responsive for mobile and tablet views.
|
|
25
20
|
|
|
21
|
+
## **AI Coding Assistant** Intended Use
|
|
22
|
+
|
|
23
|
+
* **Initial code generation**: Quickly add components to your app to speed up the initial development.
|
|
24
|
+
* **Component configuration**: Enable or disable specific component features, or fine tune the configuration through prompting. More * complex configurations are possible but may require additional manual work to be production-ready.
|
|
25
|
+
* **Dummy data generation and data binding**: Quickly add data to your app for testing and prototyping purposes. Avoid exposing or providing access to your proprietary or production data to AI-enabled tools.
|
|
26
|
+
* **Step-by-step explanations**: Understand the solutions provided by the AI Coding Assistant through the detailed explanations (depends * on the tool, mode, and model used). To further develop your knowledge, check the respective documentation.
|
|
27
|
+
* **Preliminary troubleshooting**: Resolve obvious and easy-to-solve issues affecting your code. For more complex issues, look for assistance from the community or contact the support team.
|
|
28
|
+
|
|
26
29
|
## Prerequisites
|
|
27
30
|
|
|
28
|
-
To use the
|
|
31
|
+
To use the KendoReact MCP Server, you need:
|
|
29
32
|
|
|
30
33
|
* A [compatible MCP client (IDE, code editor or app)](https://modelcontextprotocol.io/clients) that supports *MCP tools*.
|
|
31
|
-
*
|
|
32
|
-
* An active [DevCraft or Kendo UI for React license](https://www.telerik.com/kendo-react-ui/pricing) or a [Kendo UI for React trial](https://www.telerik.com/kendo-react-ui).
|
|
34
|
+
* An active [Telerik license](https://www.telerik.com/kendo-react-ui/components/ai-tools#license-requirements) that provides access to the KendoReact MCP server.
|
|
33
35
|
|
|
34
36
|
## Installation
|
|
35
37
|
|
|
36
|
-
Use the documentation of your AI-powered MCP client to add the
|
|
38
|
+
Use the documentation of your AI-powered MCP client to add the KendoReact MCP server to a specific workspace or globally. You can see installation tips and examples for some popular MCP clients below.
|
|
37
39
|
|
|
38
|
-
The generic settings of the
|
|
40
|
+
The generic settings of the KendoReact MCP Server are:
|
|
39
41
|
|
|
40
42
|
* Server name: `kendo-mcp`
|
|
41
43
|
* Type: `stdio` (standard input/output transport)
|
|
@@ -50,9 +52,14 @@ The generic settings of the Kendo UI for React MCP Server are:
|
|
|
50
52
|
|
|
51
53
|
## Authentication
|
|
52
54
|
|
|
53
|
-
The MCP server requires
|
|
55
|
+
The KendoReact MCP server [requires an active Subscription or trial license](https://www.telerik.com/kendo-react-ui/components/ai-tools#license-requirements) and a valid key for authentication. You can configure your license key either globally on your machine or locally in the `mcp.json` configuration file.
|
|
56
|
+
|
|
57
|
+
- *(Recommended)* When set globally, the MCP server automatically recognizes the license and you can ignore the `env` parameter in the `mcp.json` setup.
|
|
58
|
+
- When configured locally, you have to define either one of the following variables inside the `mcp.json` file:
|
|
59
|
+
* `TELERIK_LICENSE_PATH`—to point to your license file location.
|
|
60
|
+
* `TELERIK_LICENSE`—to paste your license key directly.
|
|
54
61
|
|
|
55
|
-
|
|
62
|
+
For detailed instructions on obtaining and managing your license key, see [KendoReact Licensing](https://www.telerik.com/kendo-react-ui/components/my-license).
|
|
56
63
|
|
|
57
64
|
## Configuration Examples
|
|
58
65
|
|
|
@@ -87,7 +94,7 @@ To enable the Kendo React MCP server in a specific workspace or React app, add a
|
|
|
87
94
|
|
|
88
95
|
Refer to [Model Context Protocol](https://docs.cursor.com/context/model-context-protocol).
|
|
89
96
|
|
|
90
|
-
To [enable the
|
|
97
|
+
To [enable the KendoReact MCP server in a specific workspace](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server-to-your-workspace) or React app, add a `.cursor` folder with an `mcp.json` file at the root of the workspace.
|
|
91
98
|
|
|
92
99
|
> .cursor/mcp.json at the workspace root
|
|
93
100
|
|
|
@@ -112,26 +119,7 @@ To [enable the Kendo UI for React MCP server in a specific workspace](https://c
|
|
|
112
119
|
|
|
113
120
|
## Usage
|
|
114
121
|
|
|
115
|
-
To increase the probability of the
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
### AI Coding Assistant
|
|
119
|
-
|
|
120
|
-
To use the AI Coding Assistant mode:
|
|
121
|
-
|
|
122
|
-
1. Start your prompt with `#kendo_react_assistant` (the main MCP tool to start the agentic workflow in the coding agent).
|
|
123
|
-
1. This will trigger an agentic workflow using the other available MCP tools to retrieve relevant context based on your prompt.
|
|
124
|
-
1. Inspect the output and verify that the Kendo UI for React MCP Server is used. Look for a statement in the output, which is similar to:
|
|
125
|
-
* `Running kendo-react-mcp-server` (in VS Code)
|
|
126
|
-
* `Calling MCP tool kendo-react-mcp-server` (in Cursor)
|
|
127
|
-
|
|
128
|
-
If the Kendo UI for React 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.
|
|
129
|
-
1. If requested, grant the Kendo UI for React MCP server a permission to run for this session, workspace, or always.
|
|
130
|
-
|
|
131
|
-
Also check more useful documentation about how to use the AI Coding Assistant here:
|
|
132
|
-
- [Getting Started](https://www.telerik.com/kendo-react-ui/components/ai-tools/ai-assistant#getting-started)
|
|
133
|
-
- [Recommendations](https://www.telerik.com/kendo-react-ui/components/ai-tools/ai-assistant#recommendations)
|
|
134
|
-
- [Prompt Library](https://www.telerik.com/kendo-react-ui/components/ai-tools/ai-assistant/prompt-library)
|
|
122
|
+
To increase the probability of the KendoReact MCP Server being used, or to call it without the need to mention "kendo" explicitly, add custom idea instructions to your AI-powered tool. Here are examples for [GitHub Copilot](https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot#about-repository-custom-instructions-for-github-copilot-chat) and [Cursor](https://docs.cursor.com/context/rules).
|
|
135
123
|
|
|
136
124
|
### Agentic UI Generator
|
|
137
125
|
|
|
@@ -140,21 +128,37 @@ To use the Agentic UI Generator mode:
|
|
|
140
128
|
1. Open the AI chat interface in your IDE—Start a new chat session to begin interacting with the Agentic UI Generator.
|
|
141
129
|
1. Start your prompt with `#kendo_ui_generator` (the main MCP tool to start the agentic workflow in the Agentic UI Generator).
|
|
142
130
|
1. This will trigger an agentic workflow using the other available MCP tools to retrieve relevant context based on your prompt.
|
|
143
|
-
1. Inspect the output and verify that the
|
|
131
|
+
1. Inspect the output and verify that the KendoReact MCP Server is used. Look for a statement in the output, which is similar to:
|
|
144
132
|
* `Running kendo-mcp-server` (in VS Code)
|
|
145
133
|
* `Calling MCP tool kendo-mcp-server` (in Cursor)
|
|
146
|
-
1. If requested, grant the
|
|
134
|
+
1. If requested, grant the KendoReact MCP server a permission to run for this session, workspace, or always.
|
|
147
135
|
|
|
148
136
|
Also check more usefule documentation about how to use the Agentic UI Generator here:
|
|
149
|
-
- [Getting Started](https://www.telerik.com/kendo-react-ui/components/ai-tools/agentic-ui-generator
|
|
150
|
-
- [
|
|
151
|
-
- [
|
|
152
|
-
- [Prompt Library](https://www.telerik.com/kendo-react-ui/components/ai-tools/agentic-ui-generator/prompt-library
|
|
137
|
+
- [Getting Started](https://www.telerik.com/kendo-react-ui/components/ai-tools/agentic-ui-generator/getting-started)
|
|
138
|
+
- [Use Cases](https://www.telerik.com/kendo-react-ui/components/ai-tools/agentic-ui-generator/getting-started#use-cases)
|
|
139
|
+
- [Best Practices](https://www.telerik.com/kendo-react-ui/components/ai-tools/agentic-ui-generator/getting-started#best-practices) for more usage tips.
|
|
140
|
+
- [Prompt Library](https://www.telerik.com/kendo-react-ui/components/ai-tools/agentic-ui-generator/prompt-library)
|
|
153
141
|
|
|
154
|
-
### AI
|
|
142
|
+
### AI Coding Assistant
|
|
155
143
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
144
|
+
To use the AI Coding Assistant mode:
|
|
145
|
+
|
|
146
|
+
1. Start your prompt with `#kendo_react_assistant` (the main MCP tool to start the agentic workflow in the coding agent).
|
|
147
|
+
1. This will trigger an agentic workflow using the other available MCP tools to retrieve relevant context based on your prompt.
|
|
148
|
+
1. Inspect the output and verify that the KendoReact MCP Server is used. Look for a statement in the output, which is similar to:
|
|
149
|
+
* `Running kendo-react-mcp-server` (in VS Code)
|
|
150
|
+
* `Calling MCP tool kendo-react-mcp-server` (in Cursor)
|
|
159
151
|
|
|
152
|
+
If the KendoReact 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.
|
|
153
|
+
1. If requested, grant the KendoReact MCP server a permission to run for this session, workspace, or always.
|
|
160
154
|
|
|
155
|
+
Also check more useful documentation about how to use the AI Coding Assistant here:
|
|
156
|
+
- [Getting Started](https://www.telerik.com/kendo-react-ui/components/ai-tools/ai-assistant/getting-started)
|
|
157
|
+
- [Use Cases](https://www.telerik.com/kendo-react-ui/components/ai-tools/ai-assistant/getting-started#use-cases)
|
|
158
|
+
- [Best Practices](https://www.telerik.com/kendo-react-ui/components/ai-tools/ai-assistant/getting-started#best-practices)
|
|
159
|
+
- [Prompt Library](https://www.telerik.com/kendo-react-ui/components/ai-tools/ai-assistant/prompt-library)
|
|
160
|
+
|
|
161
|
+
### AI Tools Usage
|
|
162
|
+
Access to the KendoReact AI Tools is determined by your [Telerik license type](https://www.telerik.com/purchase.aspx?filter=web). Each license tier provides different levels of access and functionality:
|
|
163
|
+
- [License Requirements](https://www.telerik.com/kendo-react-ui/components/ai-tools#license-requirements)
|
|
164
|
+
- [Usage Limits](https://www.telerik.com/kendo-react-ui/components/ai-tools#usage-limits)
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{McpServer as
|
|
3
|
-
`,s=U.resolve(v);E.appendFile(s,n,r=>{r&&console.error("Error writing to log file:",r)})}}import
|
|
2
|
+
import{McpServer as tt}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as ot}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as je,join as He}from"path";import{fileURLToPath as ze}from"url";import{loadLicense as Me,decodeLicenseKey as _e,decodeLicenseEvidence as qe}from"@progress/kendo-licensing/utils";var _=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function X(e){return e.replace(/^\uFEFF/,"")}async function Z(){let e=null,t=null;try{let o=Me();if(!o.success)throw new _(o.message);try{e=(await _e(o.value)).licenses.find(async s=>!!(await qe(s)).userId)}catch(n){console.log(n.message)}if(!e)return[X(o.value),null]}catch(o){return t=o.message||"Unknown error loading license.",[null,t]}return[X(e),null]}import E from"node:fs";import U from"node:path";var q=!1,v=process.env.DEBUG_LOG_FILE,ee=!!(v&&typeof v=="string");if(ee){let e=U.resolve(v),t=U.dirname(e);if(t!=="."&&t!==process.cwd()&&!E.existsSync(t))try{E.mkdirSync(t,{recursive:!0})}catch(o){console.error("Error creating log directory:",o)}if(!E.existsSync(e))try{E.writeFileSync(e,"")}catch(o){console.error("Error creating log file:",o)}}else q=!1;q=ee&&!!v&&E.existsSync(U.resolve(v));function m(...e){if(q&&v){let n=`${new Date().toISOString()}: ${e.join(" ")}
|
|
3
|
+
`,s=U.resolve(v);E.appendFile(s,n,r=>{r&&console.error("Error writing to log file:",r)})}}import Be from"@grpc/proto-loader";import O from"@grpc/grpc-js";import ne from"path";import te from"fs";import{fileURLToPath as Ge}from"url";var Ke=Ge(import.meta.url),Fe=ne.dirname(Ke),se={version:"unknown"},oe=ne.resolve(Fe,"../package.json");te.existsSync(oe)&&(se=JSON.parse(te.readFileSync(oe,"utf-8")));var $=class{constructor(t,o,n){this.contextApiUrl=t;this.protoPath=o;this.options=n;this.toolNameHeader="assistant";let s=Be.loadSync(this.protoPath,{keepCase:!0,longs:String,enums:String,defaults:!0,oneofs:!0});this.isDev=this.contextApiUrl?.includes("localhost")||this.contextApiUrl?.includes("127.0.0.1"),m("Using ContextApi URl:",this.contextApiUrl);let r=O.loadPackageDefinition(s);this.client=new r.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?O.credentials.createInsecure():O.credentials.createSsl())}async getMetadata(){let[t,o]=this.isDev?"fake_license":await Z(),n=process.env.CONTEXTAPI_API_KEY,s=n&&typeof n=="string",r=t&&typeof t=="string";if(!r&&!s&&o)throw new Error(`Failed to authenticate with API key or License key!
|
|
4
4
|
|
|
5
|
-
License Error: ${o}`);let i=new O.Metadata;if(r)try{i.add("x-license-key",t)}catch(
|
|
5
|
+
License Error: ${o}`);let i=new O.Metadata;if(r)try{i.add("x-license-key",t)}catch(h){throw m("Error adding license key to metadata:",h),new Error(`Failed to use license key: ${h.message}`)}return s&&i.add("x-api-key",n),this.options?.libName&&i.add("x-library-name",this.options.libName),i.add("x-tool-name",this.toolNameHeader),i.add("x-request-metadata",JSON.stringify({source:"npm",version:se.version,os:process.platform,node_version:process.version})),i}async query(t){let o=await this.getMetadata();return new Promise((n,s)=>{this.client.query(t,o,(r,i)=>{r?s(new Error(r)):n(i)})})}async queryCssUtils(t){let o=await this.getMetadata();return new Promise((n,s)=>{this.client.cssUtilsSearch(t,o,(r,i)=>{r?(m("Error querying CSS Utils:",r),s(new Error(r))):n(i)})})}async queryIconsSearch(t){let o=await this.getMetadata();return new Promise((n,s)=>{this.client.iconsSearch(t,o,(r,i)=>{r?(m("Error querying Icons Search:",r),s(new Error(r))):n(i)})})}async queryBuildingBlocks(t){let o=await this.getMetadata();return new Promise((n,s)=>{this.client.buildingBlocksSearch(t,o,(r,i)=>{r?(m("Error querying Building Blocks:",r),s(new Error(r))):n(i)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((o,n)=>{this.client.validateUserLicense(null,t,(s,r)=>{s?(m("Error validating user license:",s),n(new Error(s))):o(r)})})}async queryThemeGenerate(t){let o=await this.getMetadata();return new Promise((n,s)=>{this.client.generateTheme(t,o,(r,i)=>{r?(m("Error querying context API/GenerateTheme:",r),s(new Error(r))):n(i)})})}async recordOrchestratorUserRequest(){let t=await this.getMetadata();return new Promise((o,n)=>{this.client.recordOrchestratorUserRequest(null,t,(s,r)=>{s?(m("Error recording orchestrator user request:",s),n(new Error(s))):o(r)})})}};import{z as B}from"zod";var Et=B.object({user_id:B.string(),user_email:B.string().email()});import{z as p}from"zod";var Ve=p.object({Product:p.object({Id:p.number().int(),Code:p.string(),Name:p.string()}),License:p.nullable(p.object({Id:p.number().int(),Name:p.string(),Type:p.string(),Active:p.boolean()})),Availability:p.array(p.object({LicenseStart:p.nullable(p.string().datetime()),LicenseEnd:p.nullable(p.string().datetime())})),IsLicenseAvailable:p.optional(p.boolean())}),Pt=p.array(Ve);async function re(e){let t=process.env.KENDO_MCP_ACCESS;if(t==="true"||t==="1"||t==="full")return"full";if(typeof t=="string"&&(t.toLowerCase()==="agent"||t.toLowerCase()==="assistant"))return t.toLowerCase();let o=await e();return o.toLocaleLowerCase()==="agentic_ui_generator"?"agent":o.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}var l="Kendo UI for React",I="react",k="kendo",L=["ActionSheet","AIPrompt","Animation","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","Breadcrumb","Button","ButtonGroup","Calendar","Card","Chart","ChartWizard","Chat","Checkbox","Chip","ChipList","ChunkProgressBar","CircularGauge","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","DataGrid","Grid","DataQuery","DateMath","DateInput","DatePicker","DateRangePicker","DateTimePicker","Dialog","Drag&Drop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","Error","ExcelExport","ExpansionPanel","ExternalDropZone","FileSaver","FileManager","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","FontIcon","Form","Gantt","Gauge","General","GridLayout","Hint","InlineAIPrompt","Input","Label","LinearGauge","ListBox","ListView","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OrgChart","PageTemplates/BuildingBlocks","Pager","PanelBar","PDFProcessing","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","QRCode","RadialGauge","RadioButton","RadioGroup","RangeSlider","Rating","Ripple","Sankey","Scheduler","ScrollView","Signature","Skeleton","Slider","Sortable","Sparkline","SpeechToTextButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","StockChart","SVGIcon","Switch","TabStrip","TaskBoard","TextArea","TextBox","TileLayout","Timeline","TimePicker","Toolbar","Tooltip","TreeList","TreeView","Typography","Upload","VSCodeExtension","Window"];var Ye=He(je(ze(import.meta.url)),"../proto/service.proto"),M=new $("contextapi.telerik.com:443",Ye,{libName:I});var ie=async()=>M.validateUserLicense();import nt from"fs";import Oe from"path";import{fileURLToPath as st}from"url";import{z as u}from"zod";var T=class{constructor(t,o,n){this.name=t;this.config=o;this.cb=n}register(t){this.server=t,this.server.registerTool(this.name,this.config,this.cb)}hasAccess(t){return!this.config.requiredAccess||this.config.requiredAccess.length===0?!0:t==="full"||this.config.requiredAccess.includes(t)}};var P=(e,t)=>`# ${e.suiteName} - Code Validation & Quality Assurance
|
|
6
6
|
|
|
7
7
|
## Comprehensive Code Validation Checklist
|
|
8
8
|
Execute these validation steps systematically to ensure high-quality, maintainable code:
|
|
@@ -369,8 +369,8 @@ After gathering information:
|
|
|
369
369
|
- Consistent ${e} theme application across all components
|
|
370
370
|
- Custom theme variables properly defined and scoped
|
|
371
371
|
- ${e} icon fonts properly loaded and optimized
|
|
372
|
-
- Brand colors integrated with ${e} component themes`});function ae(e,t,o){let{name:n,title:s,description:r,layoutAssistantName:i,codeAssistantName:
|
|
373
|
-
`)||"No CSS utilities found for the given prompt.",A=
|
|
372
|
+
- Brand colors integrated with ${e} component themes`});function ae(e,t,o){let{name:n,title:s,description:r,layoutAssistantName:i,codeAssistantName:h,styleAssistantName:g,iconAssistantName:y,suiteName:S,libKey:c,components:A}=e,d=new T(n,{title:s,description:r,requiredAccess:e.requiredAccess,inputSchema:{userIntent:u.string().describe(`Detailed description and intent of what the user wants to build. Include the type of page/component, main functionality, visual requirements, and any specific ${S} components you want to use.`),needsComponentsDocsConfidence:u.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:u.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:u.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:u.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:u.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:u.array(u.enum(A)).optional().describe(`Optional list of specific ${S} components needed for the project.`)}},async({userIntent:f,needsComponentsDocsConfidence:C,needsLayoutConfidence:b,needsStylingConfidence:w,needsResponsiveBehaviorConfidence:Q,needsIconsConfidence:W,componentsNeeded:$e})=>{m("UI Orchestrator called with:",{userIntent:f,needsComponentsDocsConfidence:C,needsLayoutConfidence:b,needsStylingConfidence:w,needsResponsiveBehaviorConfidence:Q,needsIconsConfidence:W});try{await o.recordOrchestratorUserRequest()}catch(D){throw x(D)}let Le=d.server?.server.getClientCapabilities?.()?.elicitation,J;if(Le&&w>.3&&w<=.6){let D=await d.server?.server.elicitInput({message:"I was unable to determine if you need custom Kendo Theme assistant. Can you please confirm?",requestedSchema:{type:"object",properties:{includeCustomTheming:{type:"boolean",description:"Whether to include Custom Theming assistance in the workflow."}},required:["includeCustomTheming"]}});D?.action==="accept"&&D.content?.includeCustomTheming&&(J=!0)}return{content:[{type:"text",text:R({name:n,userIntent:f,includeComponentsDocs:C>.3,includeTheming:w>.6||!!J,includeLayout:b>.5,includeIcons:W>.6,includeResponsive:b>.5&&Q>.4,layoutAssistantName:i,codeAssistantName:h,styleAssistantName:g,iconAssistantName:y,suiteName:S,libKey:c,components:$e},t)}]}});return d}function ce(e,t){let{name:o,title:n,description:s,iconAssistantName:r,codeAssistantName:i,suiteName:h,libKey:g,components:y}=e;return new T(o,{title:n,description:s,inputSchema:{userIntent:u.string().describe(`Describe what you want to build or what components you're looking for. Include the type of functionality, features, or UI elements you need from ${h}.`),needsIconsConfidence:u.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:u.array(u.enum(y)).optional().describe(`Optional list of specific ${h} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:c,needsIconsConfidence:A,componentsNeeded:d})=>{m("Assistant Orchestrator called with:",{userIntent:c,needsIconsConfidence:A,componentsNeeded:d});try{await t.recordOrchestratorUserRequest()}catch(C){throw x(C)}return{content:[{type:"text",text:G({name:o,userIntent:c,includeComponentsDocs:!0,includeIcons:A>.5,codeAssistantName:i,iconAssistantName:r,suiteName:h,libKey:g,components:d})}]}})}function le(e,t){let{name:o,title:n,description:s,suiteName:r,libKey:i,getPreContent:h}=e;return new T(o,{title:n,description:s,requiredAccess:e.requiredAccess,inputSchema:{prompt:u.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve."),includeBuildingBlockExamples:u.boolean().describe("Whether to include building block examples. Defaults to false.").default(!1)}},async({prompt:g,includeBuildingBlockExamples:y})=>{m("Layout Assistant called with:",{prompt:g,includeBuildingBlockExamples:y});try{let c=(await t.queryCssUtils({query:g})).values.join(`
|
|
373
|
+
`)||"No CSS utilities found for the given prompt.",A=h?.()??"",d=f=>`${A}
|
|
374
374
|
|
|
375
375
|
# Kendo Design System CSS Utilities
|
|
376
376
|
|
|
@@ -391,7 +391,7 @@ ${b.description}
|
|
|
391
391
|
${b.code}
|
|
392
392
|
\`\`\`
|
|
393
393
|
`).join(`
|
|
394
|
-
`)}`),c=
|
|
394
|
+
`)}`),c=d(C)}catch(f){m("Error calling building-blocks service:",f),c=d()}else c=d();return{content:[{type:"text",text:c}]}}catch(S){throw x(S)}})}function pe(e,t){let{name:o,title:n,description:s,libKey:r,getPreContent:i}=e;return new T(o,{title:n,description:s,requiredAccess:e.requiredAccess,inputSchema:{prompt:u.string().describe("A natural language description of the desired visual style or theme. For example: 'Create a modern dark theme with high contrast'.")}},async({prompt:h})=>{m("Style Assistant called with:",{prompt:h});let g="";try{let c=await t.queryThemeGenerate({prompt:h});if(c.variables_json){let A=JSON.parse(c.variables_json),d=[];if(A)for(let f of Object.keys(A))typeof A[f]=="string"&&d.push(`${f}: ${A[f]}`);g=d.join(`
|
|
395
395
|
|
|
396
396
|
`)}}catch(c){throw x(c)}let y=i?.()??"";return{content:[{type:"text",text:g?`Use the following CSS variables to style the web application, including colors, typography, spacing, and component appearance.
|
|
397
397
|
Ensure the variables are applied consistently across all relevant elements.
|
|
@@ -404,15 +404,15 @@ ${y}
|
|
|
404
404
|
\`\`\`css
|
|
405
405
|
${g}
|
|
406
406
|
\`\`\`
|
|
407
|
-
`:"No CSS variables were generated for the given prompt."}]}})}function de(e,t){let{name:o,title:n,description:s,libKey:r,getPostContent:i}=e;return new T(o,{title:n,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:
|
|
407
|
+
`:"No CSS variables were generated for the given prompt."}]}})}function de(e,t){let{name:o,title:n,description:s,libKey:r,getPostContent:i}=e;return new T(o,{title:n,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:u.string().describe("A search query for finding icons. Be specific about the icon purpose, style, or action."),limit:u.number().min(.1).max(1).default(.1).describe("The proportion of matching icons to return (0.1 = 1 icon, 0.5 = 5 icons, 1.0 = many icons). Default is 0.1.")}},async({query:h,limit:g})=>{m("Icon Search called with:",{query:h,limit:g});try{let y=await t.queryIconsSearch({query:h,limit:g*100}),S=i?.()??"";return{content:[{type:"text",text:`${y.values.join(`
|
|
408
408
|
|
|
409
409
|
`)}
|
|
410
410
|
|
|
411
|
-
${S}`}]}}catch(y){throw x(y)}})}function me(e,t){let{name:o,title:n,description:s,libKey:r,suiteName:i,components:
|
|
411
|
+
${S}`}]}}catch(y){throw x(y)}})}function me(e,t){let{name:o,title:n,description:s,libKey:r,suiteName:i,components:h,componentAliases:g,getPostContent:y}=e;return new T(o,{title:n,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:u.string().describe("The query to search for."),component:u.enum(h).describe("The component to search for. If not specified, use General.")}},async({query:S,component:c})=>{m("Code Assistant called with:",{query:S,component:c});let A=c;if(g){let d=g[c];d&&(A=d)}try{let f=(await t.query({query:S,component:A?.toLowerCase()??"general",lib_name:r,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]})).values.map(w=>w.replace(/\0/g,"")),C=y?.({component:c})??"";return{content:[{type:"text",text:`${f.join(`
|
|
412
412
|
|
|
413
413
|
`)}
|
|
414
414
|
|
|
415
|
-
${C}`}]}}catch(
|
|
415
|
+
${C}`}]}}catch(d){throw x(d)}})}function x(e){let t=e;return t.code===16?new Error("Error: You are not authenticated. Please verify the Telerik License Key provided is valid."):t.code===8?new Error(`Error: You have exceeded the extension quota. Upgrade to subscription licensing to unlock full access. Message: ${t.message}.`):t.code===7?new Error("Error: You do not have permission to access this resource. Please verify that you have a valid license."):new Error(`Error: An error occurred while calling the service. Please try again later.
|
|
416
416
|
|
|
417
417
|
Error Code: ${t.code} Error Message: ${t.message}`)}var ue=e=>`${e}_ui_generator`,he=e=>`${e}_assistant`,ge=e=>`${e}_layout_assistant`,fe=e=>`${e}_component_assistant`,ye=e=>`${e}_style_assistant`,Ae=e=>`${e}_icon_assistant`;var Se=e=>`This is the single entry point for all UI-related tasks. It orchestrates the full workflow of building or refining UIs with ${e} components, generating a step-by-step execution plan that specifies which tools to call, in what order, and with what parameters. It includes validation steps to ensure the best possible, standards-compliant code every time.
|
|
418
418
|
|
|
@@ -526,7 +526,7 @@ ${j.PERFORMANCE_OPTIMIZATION}
|
|
|
526
526
|
${j.THEME_AND_STYLING}
|
|
527
527
|
- Proper theme switching functionality (if implemented)
|
|
528
528
|
- Only ONE theme import exists across the application
|
|
529
|
-
- Make sure theme import mechanism is consistent with existing project setup`;var
|
|
529
|
+
- Make sure theme import mechanism is consistent with existing project setup`;var Qe={createOrchestrator:ae,createAssistantOrchestrator:ce,createLayoutAssistant:le,createStyleAssistant:pe,createIconSearch:de,createCodeAssistant:me},We={orchestrator:ue,assistantOrchestrator:he,layoutAssistant:ge,codeAssistant:fe,styleAssistant:ye,iconAssistant:Ae},Je={orchestrator:Se,assistantOrchestrator:Te,layoutAssistant:Ce,styleAssistant:Ie,iconAssistant:be,codeAssistant:ve},Xe={Orchestrator:{render:R},Validator:{render:P},SharedValidation:{getSteps:N}},Ze={Angular:{steps:F,additionalPlan:V},React:{steps:H}},a={Tools:Qe,ToolNames:We,ToolDescriptions:Je,Templates:Xe,Validation:Ze};var et=a.ToolNames.codeAssistant("kendoreact"),Ne=()=>`# Kendo Design System Guidelines for ${l}
|
|
530
530
|
|
|
531
531
|
## Setting up Styles/CSS
|
|
532
532
|
|
|
@@ -555,7 +555,7 @@ Alternatively, you can also consume them directly from the Unpkg CDN.
|
|
|
555
555
|
|
|
556
556
|
In the ${l} there are available components to create layout. Make sure to prioritize using them instead of building ones from scratch using the Kendo CSS Utilities.
|
|
557
557
|
|
|
558
|
-
For any Layout component you can also call the ${
|
|
558
|
+
For any Layout component you can also call the ${et} tool in order to get specific API reference and docs.
|
|
559
559
|
|
|
560
560
|
- ${l} Card component.
|
|
561
561
|
- Generally, it is recommended to use 100% width (e.g., \`<Card style={{ width: '100%' }}>\`)
|
|
@@ -740,4 +740,4 @@ Example: If someone asks about "grid", "GRID", or "GrId", you always refer to Da
|
|
|
740
740
|
## Component-Specific Guidelines
|
|
741
741
|
|
|
742
742
|
${e.componentInstructions}
|
|
743
|
-
`),t};var Pe=a.ToolNames.layoutAssistant(k),z=a.ToolNames.codeAssistant(k),Re=a.ToolNames.styleAssistant(k),Y=a.ToolNames.iconAssistant(k);function De(e,t){return[a.Tools.createOrchestrator({name:a.ToolNames.orchestrator(k),title:"KendoReact Generator",description:a.ToolDescriptions.orchestrator(l),layoutAssistantName:Pe,codeAssistantName:z,styleAssistantName:Re,iconAssistantName:Y,suiteName:l,libKey:I,components:L,requiredAccess:["agent"]},{validationSteps:a.Validation.React.steps},e),a.Tools.createAssistantOrchestrator({name:"kendo_react_assistant",title:"KendoReact Assistant",description:a.ToolDescriptions.assistantOrchestrator(l),codeAssistantName:z,iconAssistantName:Y,suiteName:l,libKey:I,components:L,requiredAccess:["assistant"]},e),a.Tools.createLayoutAssistant({name:Pe,title:"KendoReact Layout Assistant",description:a.ToolDescriptions.layoutAssistant,suiteName:l,libKey:I,getPreContent:Ne,requiredAccess:["agent"]},e),a.Tools.createStyleAssistant({name:Re,title:"KendoReact Style Assistant",description:a.ToolDescriptions.styleAssistant,libKey:I,getPreContent:we,requiredAccess:["agent"]},e),a.Tools.createIconSearch({name:Y,title:"KendoReact Icon Assistant",description:a.ToolDescriptions.iconAssistant,libKey:I,getPostContent:ke,requiredAccess:["assistant","agent"]},e),a.Tools.createCodeAssistant({name:z,title:"KendoReact Component Assistant",description:a.ToolDescriptions.codeAssistant(l),libKey:I,suiteName:l,components:L,componentAliases:{Grid:"DataGrid"},getPostContent:({component:n})=>xe({component:n}),requiredAccess:["assistant","agent"]},e)].filter(n=>n.hasAccess(t))}var st
|
|
743
|
+
`),t};var Pe=a.ToolNames.layoutAssistant(k),z=a.ToolNames.codeAssistant(k),Re=a.ToolNames.styleAssistant(k),Y=a.ToolNames.iconAssistant(k);function De(e,t){return[a.Tools.createOrchestrator({name:a.ToolNames.orchestrator(k),title:"KendoReact Generator",description:a.ToolDescriptions.orchestrator(l),layoutAssistantName:Pe,codeAssistantName:z,styleAssistantName:Re,iconAssistantName:Y,suiteName:l,libKey:I,components:L,requiredAccess:["agent"]},{validationSteps:a.Validation.React.steps},e),a.Tools.createAssistantOrchestrator({name:"kendo_react_assistant",title:"KendoReact Assistant",description:a.ToolDescriptions.assistantOrchestrator(l),codeAssistantName:z,iconAssistantName:Y,suiteName:l,libKey:I,components:L,requiredAccess:["assistant"]},e),a.Tools.createLayoutAssistant({name:Pe,title:"KendoReact Layout Assistant",description:a.ToolDescriptions.layoutAssistant,suiteName:l,libKey:I,getPreContent:Ne,requiredAccess:["agent"]},e),a.Tools.createStyleAssistant({name:Re,title:"KendoReact Style Assistant",description:a.ToolDescriptions.styleAssistant,libKey:I,getPreContent:we,requiredAccess:["agent"]},e),a.Tools.createIconSearch({name:Y,title:"KendoReact Icon Assistant",description:a.ToolDescriptions.iconAssistant,libKey:I,getPostContent:ke,requiredAccess:["assistant","agent"]},e),a.Tools.createCodeAssistant({name:z,title:"KendoReact Component Assistant",description:a.ToolDescriptions.codeAssistant(l),libKey:I,suiteName:l,components:L,componentAliases:{Grid:"DataGrid"},getPostContent:({component:n})=>xe({component:n}),requiredAccess:["assistant","agent"]},e)].filter(n=>n.hasAccess(t))}var rt=st(import.meta.url),it=Oe.dirname(rt),at=Oe.resolve(it,"../package.json"),ct=JSON.parse(nt.readFileSync(at,"utf-8")),Ue=new tt({name:"kendo-mcp",title:"Kendo MCP Server",version:ct.version});async function lt(){let e=new ot;m("Starting server... ");let t=await re(async()=>{let n=(await ie())?.entitlement;return n?.Product?.Code||n?.product?.code});t!=="none"&&(M.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",De(M,t).forEach(n=>n.register(Ue))),await Ue.connect(e)}lt();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-mcp",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"license": "See LICENSE.md",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@grpc/grpc-js": "^1.14.3",
|
|
28
28
|
"@grpc/proto-loader": "^0.8.0",
|
|
29
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
30
|
-
"@progress/kendo-licensing": "^1.
|
|
29
|
+
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
30
|
+
"@progress/kendo-licensing": "^1.9.1",
|
|
31
31
|
"tslib": "^2.3.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|