@progress/kendo-react-mcp 1.6.0 → 1.6.1

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.
Files changed (3) hide show
  1. package/README.md +15 -72
  2. package/dist/index.js +12 -12
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -26,87 +26,30 @@ To use the KendoReact MCP Server, you need:
26
26
 
27
27
  ## Installation
28
28
 
29
- 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.
29
+ Use the [Kendo CLI](https://www.npmjs.com/package/@progress/kendo-cli) and the built-in **Getting Started Assistant** to handle the entire setup automatically - whether you are starting a new project or adding KendoReact to an existing one.
30
30
 
31
- The generic settings of the KendoReact MCP Server are:
31
+ Follow these steps to set up the Agentic UI Generator and use it in your IDE (VS Code or another supported AI-enabled IDE):
32
32
 
33
- * Server name: `kendo-mcp`
34
- * Type: `stdio` (standard input/output transport)
35
- * Command: `npx` (the MCP server works through an npm package)
36
- * Supported arguments: `-y`
37
- * npm package name: `@progress/kendo-react-mcp`
38
- * You also need to add your [Telerik licence key](https://www.telerik.com/kendo-react-ui/components/my-license) as an `env` parameter in the `mcp.json` file. There are two options:
39
- * (recommended) Use a `TELERIK_LICENSE_PATH` argument and point to your Telerik license file location.
40
- * Use a `TELERIK_LICENSE` argument and paste your Telerik license key. Make sure to [update the license key](https://www.telerik.com/kendo-react-ui/components/my-license) when necessary.
33
+ 1. Open your terminal and install the Kendo CLI globally:
41
34
 
42
- > You can ignore the `env` parameter if you have the Telerik license key set up as a global environment variable on your machine. And if the MCP client supports passing global environment variables to MCP servers.
35
+ ```sh
36
+ npm i -g @progress/kendo-cli
37
+ ```
43
38
 
44
- ## Authentication
39
+ 1. Configure the KendoReact MCP server for your IDE and set up your Telerik license in a single step with the Kendo CLI:
45
40
 
46
- 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.
41
+ ```sh
42
+ npx kendo react setup
43
+ ```
47
44
 
48
- - *(Recommended)* When set globally, the MCP server automatically recognizes the license and you can ignore the `env` parameter in the `mcp.json` setup.
49
- - When configured locally, you have to define either one of the following variables inside the `mcp.json` file:
50
- * `TELERIK_LICENSE_PATH`—to point to your license file location.
51
- * `TELERIK_LICENSE`—to paste your license key directly.
45
+ You are now ready to generate components and pages using the Agentic UI Generator in your IDE.
52
46
 
53
- For detailed instructions on obtaining and managing your license key, see [KendoReact Licensing](https://www.telerik.com/kendo-react-ui/components/my-license).
47
+ 1. Create a new empty folder for your project and open it in your IDE. Then, in the AI chat interface, invoke the **Getting Started Assistant**:
54
48
 
55
- ## Configuration Examples
49
+ ```prompt
50
+ #kendo_getting_started_assistant create a new React project
51
+ ```
56
52
 
57
- ### VSCode - Copilot
58
-
59
- Refer to [Use MCP servers in VS Code](https://code.visualstudio.com/docs/copilot/chat/mcp-servers).
60
-
61
- To enable the Kendo React MCP server in a specific workspace or React app, add a `.vscode` folder with an `mcp.json` file at the root of the workspace:
62
-
63
- > .vscode/mcp.json at the workspace root
64
-
65
- ```json
66
- {
67
- "servers": {
68
- "kendo-mcp": {
69
- "type": "stdio",
70
- "command": "npx",
71
- "args": ["-y", "@progress/kendo-react-mcp@latest"],
72
- "env": {
73
- "TELERIK_LICENSE_PATH": "THE_PATH_TO_YOUR_LICENSE_FILE",
74
- // or
75
- "TELERIK_LICENSE": "YOUR_LICENSE_KEY"
76
- }
77
- }
78
- }
79
- }
80
- ```
81
-
82
- > You can ignore the `env` parameter if you have the Telerik license key set up as a global environment variable on your machine. And if the MCP client supports passing global environment variables to MCP servers.
83
-
84
- ### Cursor
85
-
86
- Refer to [Model Context Protocol](https://docs.cursor.com/context/model-context-protocol).
87
-
88
- 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.
89
-
90
- > .cursor/mcp.json at the workspace root
91
-
92
- ```json
93
- {
94
- "mcpServers": {
95
- "kendo-mcp": {
96
- "type": "stdio",
97
- "command": "npx",
98
- "args": ["-y", "@progress/kendo-react-mcp@latest"],
99
- "env": {
100
- "TELERIK_LICENSE_PATH": "THE_PATH_TO_YOUR_LICENSE_FILE",
101
- // or
102
- "TELERIK_LICENSE": "YOUR_LICENSE_KEY"
103
- },
104
- }
105
- }
106
- }
107
- ```
108
-
109
- > You can ignore the `env` parameter if you have the Telerik license key set up as a global environment variable on your machine. And if the MCP client supports passing global environment variables to MCP servers.
110
53
 
111
54
  ## Usage
112
55
 
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import{McpServer as St}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as Tt}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as ct,join as lt}from"path";import{fileURLToPath as dt}from"url";import{loadLicense as Je,decodeLicenseKey as Xe,decodeLicenseEvidence as Ze}from"@progress/kendo-licensing/utils";var B=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function te(e){return e.replace(/^\uFEFF/,"")}async function oe(e){let t=null,n=null;try{let o=Je();if(!o.success){let s=new B(o.message);throw e&&await e("license_load_failed",{error:o.message}).catch(()=>{}),s}try{t=(await Xe(o.value)).licenses.find(async r=>!!(await Ze(r)).userId)}catch(s){console.log(s.message),e&&await e("license_load_failed",{error:s.message||"Unknown decoding error"}).catch(()=>{})}if(!t)return[te(o.value),null]}catch(o){return n=o.message||"Unknown error loading license.",e&&await e("license_load_failed",{error:n}).catch(()=>{}),[null,n]}return[te(t),null]}import P from"node:fs";import G from"node:path";var q=!1,E=process.env.DEBUG_LOG_FILE,ne=!!(E&&typeof E=="string");if(ne){let e=G.resolve(E),t=G.dirname(e);if(t!=="."&&t!==process.cwd()&&!P.existsSync(t))try{P.mkdirSync(t,{recursive:!0})}catch(n){console.error("Error creating log directory:",n)}if(!P.existsSync(e))try{P.writeFileSync(e,"")}catch(n){console.error("Error creating log file:",n)}}else q=!1;q=ne&&!!E&&P.existsSync(G.resolve(E));function g(...e){if(q&&E){let o=`${new Date().toISOString()}: ${e.join(" ")}
3
- `,s=G.resolve(E);P.appendFile(s,o,r=>{r&&console.error("Error writing to log file:",r)})}}import et from"@grpc/proto-loader";import $ from"@grpc/grpc-js";import re from"path";import se from"fs";import{fileURLToPath as tt}from"url";var ot=tt(import.meta.url),nt=re.dirname(ot),ie={version:"unknown"},ae=re.resolve(nt,"../package.json");se.existsSync(ae)&&(ie=JSON.parse(se.readFileSync(ae,"utf-8")));function st(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var M=class{constructor(t,n,o){this.contextApiUrl=t;this.protoPath=n;this.options=o;this.toolNameHeader="assistant";let s=et.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"),g("Using ContextApi URl:",this.contextApiUrl);let r=$.loadPackageDefinition(s);this.client=new r.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?$.credentials.createInsecure():$.credentials.createSsl())}async getMetadata({meta:t}={meta:{}}){let[n,o]=this.isDev?["fake_license",null]:await oe((m,A)=>this.logEvent(m,A)),s=process.env.CONTEXTAPI_API_KEY,r=s&&typeof s=="string",a=n&&typeof n=="string";if(!a&&!r&&o)throw new Error(`Failed to authenticate with API key or License key!
2
+ import{McpServer as St}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as Tt}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as ct,join as lt}from"path";import{fileURLToPath as dt}from"url";import{loadLicense as Je,decodeLicenseKey as Xe,decodeLicenseEvidence as Ze}from"@progress/kendo-licensing/utils";var B=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function te(e){return e.replace(/^\uFEFF/,"")}async function oe(e){let t=null,n=null;try{let o=Je();if(!o.success){let s=new B(o.message);throw e&&await e("license_load_failed",{error:o.message}).catch(()=>{}),s}try{t=(await Xe(o.value)).licenses.find(async r=>!!(await Ze(r)).userId)}catch(s){console.log(s.message),e&&await e("license_load_failed",{error:s.message||"Unknown decoding error"}).catch(()=>{})}if(!t)return[te(o.value),null]}catch(o){return n=o.message||"Unknown error loading license.",e&&await e("license_load_failed",{error:n}).catch(()=>{}),[null,n]}return[te(t),null]}import P from"node:fs";import U from"node:path";var q=!1,E=process.env.DEBUG_LOG_FILE,ne=!!(E&&typeof E=="string");if(ne){let e=U.resolve(E),t=U.dirname(e);if(t!=="."&&t!==process.cwd()&&!P.existsSync(t))try{P.mkdirSync(t,{recursive:!0})}catch(n){console.error("Error creating log directory:",n)}if(!P.existsSync(e))try{P.writeFileSync(e,"")}catch(n){console.error("Error creating log file:",n)}}else q=!1;q=ne&&!!E&&P.existsSync(U.resolve(E));function g(...e){if(q&&E){let o=`${new Date().toISOString()}: ${e.join(" ")}
3
+ `,s=U.resolve(E);P.appendFile(s,o,r=>{r&&console.error("Error writing to log file:",r)})}}import et from"@grpc/proto-loader";import $ from"@grpc/grpc-js";import re from"path";import se from"fs";import{fileURLToPath as tt}from"url";var ot=tt(import.meta.url),nt=re.dirname(ot),ie={version:"unknown"},ae=re.resolve(nt,"../package.json");se.existsSync(ae)&&(ie=JSON.parse(se.readFileSync(ae,"utf-8")));function st(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var M=class{constructor(t,n,o){this.contextApiUrl=t;this.protoPath=n;this.options=o;this.toolNameHeader="assistant";let s=et.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"),g("Using ContextApi URl:",this.contextApiUrl);let r=$.loadPackageDefinition(s);this.client=new r.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?$.credentials.createInsecure():$.credentials.createSsl())}async getMetadata({meta:t}={meta:{}}){let[n,o]=this.isDev?["fake_license",null]:await oe((m,A)=>this.logEvent(m,A)),s=process.env.CONTEXTAPI_API_KEY,r=s&&typeof s=="string",a=n&&typeof n=="string";if(!a&&!r&&o)throw new Error(`Failed to authenticate with API key or License key!
4
4
 
5
5
  License Error: ${o}`);let i=new $.Metadata;if(a)try{i.add("x-license-key",n)}catch(m){throw g("Error adding license key to metadata:",m),new Error(`Failed to use license key: ${m.message}`)}r&&i.add("x-api-key",s),this.options?.libName&&i.add("x-library-name",this.options.libName),i.add("x-tool-name",this.toolNameHeader);let d=JSON.stringify({...t,source:"npm",version:ie.version,os:process.platform,node_version:process.version});return i.add("x-request-metadata",st(d)),i}async query(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.query(t,o,(a,i)=>{a?r(new Error(a)):s(i)})})}async getApiRefMatches(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.getApiRefMatches(t,o,(a,i)=>{a?r(new Error(a)):s(i)})})}async queryCssUtils(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.cssUtilsSearch(t,o,(a,i)=>{a?(g("Error querying CSS Utils:",a),r(new Error(a))):s(i)})})}async queryIconsSearch(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.iconsSearch(t,o,(a,i)=>{a?(g("Error querying Icons Search:",a),r(new Error(a))):s(i)})})}async queryBuildingBlocks(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.buildingBlocksSearch(t,o,(a,i)=>{a?(g("Error querying Building Blocks:",a),r(new Error(a))):s(i)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((n,o)=>{this.client.validateUserLicense(null,t,(s,r)=>{s?(g("Error validating user license:",s),o(new Error(s))):n(r)})})}async queryThemeGenerate(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.generateTheme(t,o,(a,i)=>{a?(g("Error querying context API/GenerateTheme:",a),r(new Error(a))):s(i)})})}async recordOrchestratorUserRequest({meta:t}){let n=await this.getMetadata({meta:t});return new Promise((o,s)=>{this.client.recordOrchestratorUserRequest(null,n,(r,a)=>{r?(g("Error recording orchestrator user request:",r),s(new Error(r))):o(a)})})}async recordToolUserRequest({toolName:t,meta:n}){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.recordToolUserRequest({tool_name:t},o,(a,i)=>{a?(g("Error recording tool user request:",a),r(new Error(a))):s(i)})})}async logEvent(t,n){let o="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq";if(!o||typeof o!="string"){g("LOGGING_API_KEY not configured, skipping log event");return}let s=new $.Metadata;return s.add("x-api-key",o),new Promise((r,a)=>{this.client.logEvent({event_name:t,fields:n||{}},s,(i,d)=>{i?(g("Error logging event:",i),a(new Error(i))):r()})})}};import{z as K}from"zod";var Ht=K.object({user_id:K.string(),user_email:K.string().email()});import{z as b}from"zod";var at=b.object({Product:b.object({Id:b.number().int(),Code:b.string(),Name:b.string()}),License:b.nullable(b.object({Id:b.number().int(),Name:b.string(),Type:b.string(),Active:b.boolean()})),Availability:b.array(b.object({LicenseStart:b.nullable(b.string().datetime()),LicenseEnd:b.nullable(b.string().datetime())})),IsLicenseAvailable:b.optional(b.boolean())}),Yt=b.array(at);async function ce(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 n=await e();return n.toLocaleLowerCase()==="agentic_ui_generator"?"agent":n.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}function le(){return'**Accessibility Guidelines: WCAG 2.2 Level AA Compliance**\n\n**Core Principles:**\n1. Use semantic HTML and ARIA correctly\n2. Ensure WCAG 2.2 AA compliance\n3. Follow W3C ARIA Authoring Practices\n4. Provide standards-based accessibility fixes\n\n**1. Form Control Labels** (WCAG 1.3.1, 3.3.2, 4.1.2)\nEvery input must have an associated label.\nCORRECT: `<input type="search" aria-label="Search products" placeholder="Search...">`\nWRONG: `<span>Email</span><input type="email">` (no association)\nWRONG: `<input type="email" placeholder="Email">` (placeholder as label)\n\n**2. Button Accessibility** (WCAG 4.1.2, 2.4.6, 2.5.3)\nAll buttons need accessible names describing their purpose.\nCORRECT: `<button type="button">Save Changes</button>`\nCORRECT: `<button aria-label="Close dialog"><svg aria-hidden="true" focusable="false">...</svg></button>`\nWRONG: `<button><svg>...</svg></button>` (no accessible name)\nWRONG: `<button>Click here</button>` (generic text)\n\n**3. Popup/Menu Triggers** (WCAG 4.1.2, 1.3.1)\nIndicate popup purpose and state using aria-haspopup, aria-expanded, aria-controls.\nCORRECT: `<button aria-expanded="false" aria-haspopup="menu" aria-controls="menu-id">Settings</button>`\n\n**4. Image Accessibility** (WCAG 1.1.1)\nInformative: `<img src="chart.png" alt="Sales increased 25% in Q4 2024">`\nFunctional: `<a href="/home"><img src="logo.png" alt="Company Name Home"></a>`\nDecorative: `<img src="border.png" alt="" role="presentation">`\nComplex: `<img src="chart.png" alt="Sales data" aria-describedby="desc-id">`\nWRONG: Missing alt, filename as alt, generic alt for decorative images\n\n**5. Link Accessibility** (WCAG 2.4.4, 2.4.6)\nLinks must be descriptive and understandable out of context.\nCORRECT: `<a href="/products">View All Products</a>`\nCORRECT: `<a href="/article" aria-label="Read more about New Product Launch">Read more</a>`\nWRONG: "Click here", "Read more", "Learn more" without context\n\n**6. Form Validation** (WCAG 3.3.1, 3.3.2, 3.3.3)\nErrors must be identified, associated with inputs, and provide suggestions. Use aria-describedby, aria-invalid="true", and role="alert".\n\n**7. Heading Structure** (WCAG 1.3.1, 2.4.6)\nEach page should have an `<h1>` that describes its content. Use hierarchical, descriptive headings with no skipped levels (h1\u2192h2\u2192h3).\nCORRECT: `<h1>Dashboard</h1> <h2>Sales</h2> <h3>By Region</h3>`\nWRONG: No `<h1>` on the page, or skipping levels (h1\u2192h3)\nIf a heading should look smaller than its semantic level, use CSS: `<h2 class="text-sm">Subtitle</h2>`\n\n**8. Page Component Landmark Rules** (WCAG 1.3.1, 4.1.2)\nPage components (route components) may be rendered inside a layout that already provides `<main>`, `<header>`, or `<footer>`. Since the layout configuration is unknown, avoid using these landmarks in page components to prevent potential duplication and nesting violations. Use `<div>`, `<section>`, or `<article>` as the top-level wrapper instead.\n\n**Quick Checklist:**\n- **Forms:** Associated labels, aria-required on required fields, autocomplete attributes, aria-describedby for errors, aria-invalid for invalid fields, fieldsets with legends\n- **Buttons/Links:** Accessible names, aria-label for icon buttons, aria-hidden on decorative icons, descriptive link text\n- **Popups/Dialogs:** aria-haspopup, aria-expanded, aria-controls, role="dialog", aria-modal="true", aria-labelledby, focus trap, Escape to close\n- **Images:** alt on all images, descriptive alt for informative, empty alt for decorative, aria-describedby for complex\n- **Structure:** One h1, logical heading hierarchy, avoid `<main>`, `<header>`, or `<footer>` in page/route components (the layout may already provide them), use `<section>` or `<div>` as page-level wrappers, semantic HTML\n- **Dynamic Content:** role="status"/aria-live="polite" for updates, role="alert"/aria-live="assertive" for critical alerts\n- **Keyboard/Focus:** All interactive elements keyboard accessible, logical focus order, visible focus indicators, no keyboard traps (except modals)\n- **Color/Contrast:** 4.5:1 text contrast (3:1 large text), 3:1 UI component contrast, no color-only information, 3:1 focus indicator contrast'}var rt=1440*60*1e3;function de(e){let{serverName:t,contextApi:n,additionalFields:o={},intervalMs:s=rt}=e,r="mcp_server_heartbeat",a=async()=>{try{let d={server_name:t,timestamp:new Date().toISOString(),...o};await n.logEvent(r,d)}catch(d){g(`Failed to send heartbeat for ${t}:`,d)}};a();let i=setInterval(a,s);return()=>{clearInterval(i),g(`Heartbeat stopped for ${t}`)}}import{z as F}from"zod";var it=["default","bootstrap","material","fluent"];function pe(e,t){return{projectName:F.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:F.boolean().default(!0).describe(`Whether to create a new project before configuring ${e}. Set to true to scaffold a brand-new project, or false if the project already exists and you only want to add ${e} to it.`),theme:F.enum(it).default("default").describe("The Kendo UI theme to use. Determines which theme package is installed and imported.")}}var l="Kendo UI for React",I="react",w="kendo";var O=["ActionSheet","AIPrompt","Animation","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","Breadcrumb","Button","ButtonGroup","BreadCrumb","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","Form","Gantt","Gauge","General","GridLayout","Hint","Icon","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","PromptBox","QRCode","RadialGauge","RadioButton","RadioGroup","RangeSlider","Rating","Ripple","Sankey","Scheduler","ScrollView","Signature","Skeleton","Slider","Sortable","Sparkline","SpeechToTextButton","SmartPasteButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","StockChart","SVGIcon","Switch","TabStrip","TaskBoard","TextArea","TextBox","TileLayout","Timeline","TimePicker","Toolbar","Tooltip","TreeList","TreeView","Typography","Upload","VSCodeExtension","Window"];var pt=lt(ct(dt(import.meta.url)),"../proto/service.proto"),_=new M("contextapi.telerik.com:443",pt,{libName:I});var me=async()=>_.validateUserLicense();import vt from"fs";import ze from"path";import{fileURLToPath as kt}from"url";import{z as C}from"zod";var v=class{constructor(t,n,o){this.name=t;this.config=n;this.cb=o}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 D=(e,t)=>`# ${e.suiteName} - Code Validation & Quality Assurance
6
6
 
@@ -418,7 +418,7 @@ ${T}`)}return f.length>0&&s.push(`## Additional Context
418
418
  ---
419
419
  `)),s.join(`
420
420
 
421
- `)}function ue(e,t,n){let{name:o,title:s,description:r,layoutAssistantName:a,codeAssistantName:i,styleAssistantName:d,iconAssistantName:m,accessibilityAssistantName:A,suiteName:h,libKey:f,components:p}=e,c=new v(o,{title:s,description:r,requiredAccess:e.requiredAccess,inputSchema:{userIntent:C.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 ${h} components you want to use.`),needsComponentsDocsConfidence:C.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:C.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:C.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:C.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:C.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:C.array(C.enum(p)).optional().describe(`Optional list of specific ${h} components needed for the project.`)}},async({userIntent:y,needsComponentsDocsConfidence:S,needsLayoutConfidence:T,needsStylingConfidence:k,needsResponsiveBehaviorConfidence:N,needsIconsConfidence:X,componentsNeeded:Z},{_meta:Ye})=>{g("UI Orchestrator called with:",{userIntent:y,needsComponentsDocsConfidence:S,needsLayoutConfidence:T,needsStylingConfidence:k,needsResponsiveBehaviorConfidence:N,needsIconsConfidence:X});try{await n.recordOrchestratorUserRequest({meta:{userIntent:y,componentsNeeded:Z,_meta:Ye}})}catch(U){throw R(U)}let Qe=c.server?.server.getClientCapabilities?.()?.elicitation,ee;if(Qe&&k>.3&&k<=.6){let U=await c.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"]}});U?.action==="accept"&&U.content?.includeCustomTheming&&(ee=!0)}return{content:[{type:"text",text:L({name:o,userIntent:y,includeComponentsDocs:S>.3,includeTheming:k>.6||!!ee,includeLayout:T>.5,includeIcons:X>.6,includeResponsive:T>.5&&N>.4,layoutAssistantName:a,codeAssistantName:i,styleAssistantName:d,iconAssistantName:m,accessibilityAssistantName:A,suiteName:h,libKey:f,components:Z},t)}]}});return c}function ge(e,t){let{name:n,title:o,description:s,iconAssistantName:r,codeAssistantName:a,suiteName:i,libKey:d,components:m}=e;return new v(n,{title:o,description:s,inputSchema:{userIntent:C.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 ${i}.`),needsIconsConfidence:C.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:C.array(C.enum(m)).optional().describe(`Optional list of specific ${i} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:h,needsIconsConfidence:f,componentsNeeded:p},{_meta:c})=>{g("Assistant Orchestrator called with:",{userIntent:h,needsIconsConfidence:f,componentsNeeded:p});try{await t.recordOrchestratorUserRequest({meta:{userIntent:h,componentsNeeded:p,_meta:c}})}catch(S){throw R(S)}return{content:[{type:"text",text:V({name:n,userIntent:h,includeComponentsDocs:!0,includeIcons:f>.5,codeAssistantName:a,iconAssistantName:r,suiteName:i,libKey:d,components:p})}]}})}function he(e,t){let{name:n,title:o,description:s,suiteName:r,libKey:a,getPreContent:i}=e;return new v(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{prompt:C.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve."),includeBuildingBlockExamples:C.boolean().describe("Whether to include building block examples. Defaults to false.").default(!1)}},async({prompt:d,includeBuildingBlockExamples:m},{_meta:A})=>{g("Layout Assistant called with:",{prompt:d,includeBuildingBlockExamples:m});try{let f=(await t.queryCssUtils({query:d},{_meta:A})).values.join(`
421
+ `)}function ue(e,t,n){let{name:o,title:s,description:r,layoutAssistantName:a,codeAssistantName:i,styleAssistantName:d,iconAssistantName:m,accessibilityAssistantName:A,suiteName:h,libKey:f,components:p}=e,c=new v(o,{title:s,description:r,requiredAccess:e.requiredAccess,inputSchema:{userIntent:C.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 ${h} components you want to use.`),needsComponentsDocsConfidence:C.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:C.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:C.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:C.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:C.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:C.array(C.enum(p)).optional().describe(`Optional list of specific ${h} components needed for the project.`)}},async({userIntent:y,needsComponentsDocsConfidence:S,needsLayoutConfidence:T,needsStylingConfidence:k,needsResponsiveBehaviorConfidence:N,needsIconsConfidence:X,componentsNeeded:Z},{_meta:Ye})=>{g("UI Orchestrator called with:",{userIntent:y,needsComponentsDocsConfidence:S,needsLayoutConfidence:T,needsStylingConfidence:k,needsResponsiveBehaviorConfidence:N,needsIconsConfidence:X});try{await n.recordOrchestratorUserRequest({meta:{userIntent:y,componentsNeeded:Z,_meta:Ye}})}catch(G){throw R(G)}let Qe=c.server?.server.getClientCapabilities?.()?.elicitation,ee;if(Qe&&k>.3&&k<=.6){let G=await c.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"]}});G?.action==="accept"&&G.content?.includeCustomTheming&&(ee=!0)}return{content:[{type:"text",text:L({name:o,userIntent:y,includeComponentsDocs:S>.3,includeTheming:k>.6||!!ee,includeLayout:T>.5,includeIcons:X>.6,includeResponsive:T>.5&&N>.4,layoutAssistantName:a,codeAssistantName:i,styleAssistantName:d,iconAssistantName:m,accessibilityAssistantName:A,suiteName:h,libKey:f,components:Z},t)}]}});return c}function ge(e,t){let{name:n,title:o,description:s,iconAssistantName:r,codeAssistantName:a,suiteName:i,libKey:d,components:m}=e;return new v(n,{title:o,description:s,inputSchema:{userIntent:C.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 ${i}.`),needsIconsConfidence:C.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:C.array(C.enum(m)).optional().describe(`Optional list of specific ${i} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:h,needsIconsConfidence:f,componentsNeeded:p},{_meta:c})=>{g("Assistant Orchestrator called with:",{userIntent:h,needsIconsConfidence:f,componentsNeeded:p});try{await t.recordOrchestratorUserRequest({meta:{userIntent:h,componentsNeeded:p,_meta:c}})}catch(S){throw R(S)}return{content:[{type:"text",text:V({name:n,userIntent:h,includeComponentsDocs:!0,includeIcons:f>.5,codeAssistantName:a,iconAssistantName:r,suiteName:i,libKey:d,components:p})}]}})}function he(e,t){let{name:n,title:o,description:s,suiteName:r,libKey:a,getPreContent:i}=e;return new v(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{prompt:C.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve."),includeBuildingBlockExamples:C.boolean().describe("Whether to include building block examples. Defaults to false.").default(!1)}},async({prompt:d,includeBuildingBlockExamples:m},{_meta:A})=>{g("Layout Assistant called with:",{prompt:d,includeBuildingBlockExamples:m});try{let f=(await t.queryCssUtils({query:d},{_meta:A})).values.join(`
422
422
  `)||"No CSS utilities found for the given prompt.",p=i?.()??"",c=y=>`${p}
423
423
 
424
424
  # Kendo Design System CSS Utilities
@@ -732,7 +732,7 @@ export function ThemeProvider({ children }: { children: React.ReactNode }) {
732
732
 
733
733
  export const useTheme = () => useContext(ThemeContext);
734
734
  \`\`\`
735
- `;var Ue=u.ToolNames.codeAssistant("kendoreact"),Ge=()=>`## Using ${l} Icons
735
+ `;var Ge=u.ToolNames.codeAssistant("kendoreact"),Ue=()=>`## Using ${l} Icons
736
736
 
737
737
  Important: Attempt to prioritize SVG icons over font icons.
738
738
 
@@ -740,9 +740,9 @@ Important: Attempt to prioritize SVG icons over font icons.
740
740
 
741
741
  - Make sure @progress/kendo-svg-icons is installed: \`npm install @progress/kendo-svg-icons\`
742
742
  - Make sure @progress/kendo-react-common is installed (contains SvgIcon component): \`npm install @progress/kendo-react-common\`
743
- - You can call ${Ue} tool for ${l} SvgIcon component for docs and API reference.
743
+ - You can call ${Ge} tool for ${l} SvgIcon component for docs and API reference.
744
744
  - [optional] If SVG is not an option fallback to fonticon - make sure \`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-font-icons/dist/index.css" />\` is added as a reference.
745
- - [optional] If using font icons you can call ${Ue} tool for ${l} Icon component for docs and API reference.
745
+ - [optional] If using font icons you can call ${Ge} tool for ${l} Icon component for docs and API reference.
746
746
 
747
747
  ### Examples
748
748
 
@@ -829,7 +829,7 @@ ${e.componentInstructions}
829
829
  First, ensure the Kendo CLI tool is installed globally:
830
830
 
831
831
  \`\`\`bash
832
- npm i -g @progress/kendo-cli
832
+ npm i -g @progress/kendo-cli@latest
833
833
  \`\`\`
834
834
 
835
835
  This CLI tool will handle the entire project setup including all necessary dependencies and configurations.
@@ -888,7 +888,7 @@ Also add the Kendo CSS utilities CDN link in your \`index.html\` \`<head>\`:
888
888
 
889
889
  `,m=`## Step ${a++}: Activate Kendo License
890
890
 
891
- This step is required to use Kendo UI for Angular components without watermarks and with access to all features. Run the following command to activate your license:
891
+ This step is required to use Kendo React components without watermarks and with access to all features. Run the following command to activate your license:
892
892
 
893
893
  \`\`\`bash
894
894
  npx kendo license activate
@@ -944,13 +944,13 @@ function Home() {
944
944
  <p className="k-font-size-lg k-font-weight-bold k-mb-4">\u{1F60A} Ready to build? Copy any prompt below directly into your coding agent to get started</p>
945
945
  <div className="k-d-grid k-grid-cols-3 k-gap-4 k-max-w-screen-xl k-mx-auto">
946
946
  <div className="prompt-box k-p-4 k-rounded-md">
947
- <p className="k-font-family-monospace k-text-base k-m-0">'#kendoreact_ui_generator Create a dashboard with sales charts, revenue KPIs, and a recent orders grid'</p>
947
+ <p className="k-font-family-monospace k-text-base k-m-0">'#kendo_ui_generator Create a dashboard with sales charts, revenue KPIs, and a recent orders grid'</p>
948
948
  </div>
949
949
  <div className="prompt-box k-p-4 k-rounded-md">
950
- <p className="k-font-family-monospace k-text-base k-m-0">'#kendoreact_ui_generator Create an ecommerce product details page with product images, specifications, reviews, and an add to cart button'</p>
950
+ <p className="k-font-family-monospace k-text-base k-m-0">'#kendo_ui_generator Create an ecommerce product details page with product images, specifications, reviews, and an add to cart button'</p>
951
951
  </div>
952
952
  <div className="prompt-box k-p-4 k-rounded-md">
953
- <p className="k-font-family-monospace k-text-base k-m-0">'#kendoreact_ui_generator Build a registration form with email and password inputs, where did you learn about us text area, and agreement checkbox'</p>
953
+ <p className="k-font-family-monospace k-text-base k-m-0">'#kendo_ui_generator Build a registration form with email and password inputs, where did you learn about us text area, and agreement checkbox'</p>
954
954
  </div>
955
955
  </div>
956
956
  </div>
@@ -1045,4 +1045,4 @@ Add the following styles to \`src/Home.css\`:
1045
1045
  }
1046
1046
  \`\`\`
1047
1047
 
1048
- `}var qe=u.ToolNames.layoutAssistant(w),Q=u.ToolNames.codeAssistant(w),Ke=u.ToolNames.styleAssistant(w),J=u.ToolNames.iconAssistant(w),Fe=u.ToolNames.gettingStartedAssistant(w),Ve=u.ToolNames.accessibilityAssistant(w);function je(e,t){return[u.Tools.createOrchestrator({name:u.ToolNames.orchestrator(w),title:"KendoReact Generator",description:u.ToolDescriptions.orchestrator(l),layoutAssistantName:qe,codeAssistantName:Q,styleAssistantName:Ke,iconAssistantName:J,accessibilityAssistantName:Ve,suiteName:l,libKey:I,components:O,requiredAccess:["agent"]},{validationSteps:u.Validation.React.steps},e),u.Tools.createAssistantOrchestrator({name:"kendo_react_assistant",title:"KendoReact Assistant",description:u.ToolDescriptions.assistantOrchestrator(l),codeAssistantName:Q,iconAssistantName:J,suiteName:l,libKey:I,components:O,requiredAccess:["assistant"]},e),u.Tools.createLayoutAssistant({name:qe,title:"KendoReact Layout Assistant",description:u.ToolDescriptions.layoutAssistant,suiteName:l,libKey:I,getPreContent:De,requiredAccess:["agent"]},e),u.Tools.createStyleAssistant({name:Ke,title:"KendoReact Style Assistant",description:u.ToolDescriptions.styleAssistant,libKey:I,getPreContent:Le,requiredAccess:["agent"]},e),u.Tools.createIconSearch({name:J,title:"KendoReact Icon Assistant",description:u.ToolDescriptions.iconAssistant,libKey:I,getPostContent:Ge,requiredAccess:["assistant","agent"]},e),u.Tools.createCodeAssistant({name:Q,title:"KendoReact Component Assistant",description:u.ToolDescriptions.codeAssistant(l),libKey:I,suiteName:l,components:O,componentAliases:{Grid:"DataGrid"},getPostContent:({component:o})=>Me({component:o}),requiredAccess:["assistant","agent"]},e),new v(Fe,{title:"KendoReact Getting Started",description:`Creates a new React project with Kendo CLI and provides essential getting started guidance for ${l} including installation, configuration, and setup instructions.`,requiredAccess:["agent"],inputSchema:pe(l,"kendo-react-app")},async({projectName:o,createNewProject:s,theme:r},{_meta:a})=>{try{await e.recordToolUserRequest({toolName:Fe,meta:{projectName:o,createNewProject:s,theme:r,_meta:a}})}catch(d){console.error("Error recording tool request:",d)}return{content:[{type:"text",text:Be(o,s,r)}]}}),u.Tools.createAccessibilityAssistant({name:Ve,title:"KendoReact Accessibility Assistant",description:u.ToolDescriptions.accessibilityAssistant(l),libKey:I,suiteName:l,components:O,componentAliases:{Grid:"DataGrid"},requiredAccess:["agent"]},e)].filter(o=>o.hasAccess(t))}var It=kt(import.meta.url),Nt=ze.dirname(It),wt=ze.resolve(Nt,"../package.json"),We=JSON.parse(vt.readFileSync(wt,"utf-8")),He=new St({name:"kendo-mcp",title:"Kendo MCP Server",version:We.version});async function Et(){let e=new Tt;g("Starting server... ");let t=await ce(async()=>{let o=(await me())?.entitlement;return o?.Product?.Code||o?.product?.code});t!=="none"&&(_.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",je(_,t).forEach(o=>o.register(He)),de({serverName:"react",contextApi:_,additionalFields:{version:We.version,access_type:t}})),await He.connect(e)}Et();
1048
+ `}var qe=u.ToolNames.layoutAssistant(w),Q=u.ToolNames.codeAssistant(w),Ke=u.ToolNames.styleAssistant(w),J=u.ToolNames.iconAssistant(w),Fe=u.ToolNames.gettingStartedAssistant(w),Ve=u.ToolNames.accessibilityAssistant(w);function je(e,t){return[u.Tools.createOrchestrator({name:u.ToolNames.orchestrator(w),title:"KendoReact Generator",description:u.ToolDescriptions.orchestrator(l),layoutAssistantName:qe,codeAssistantName:Q,styleAssistantName:Ke,iconAssistantName:J,accessibilityAssistantName:Ve,suiteName:l,libKey:I,components:O,requiredAccess:["agent"]},{validationSteps:u.Validation.React.steps},e),u.Tools.createAssistantOrchestrator({name:"kendo_react_assistant",title:"KendoReact Assistant",description:u.ToolDescriptions.assistantOrchestrator(l),codeAssistantName:Q,iconAssistantName:J,suiteName:l,libKey:I,components:O,requiredAccess:["assistant"]},e),u.Tools.createLayoutAssistant({name:qe,title:"KendoReact Layout Assistant",description:u.ToolDescriptions.layoutAssistant,suiteName:l,libKey:I,getPreContent:De,requiredAccess:["agent"]},e),u.Tools.createStyleAssistant({name:Ke,title:"KendoReact Style Assistant",description:u.ToolDescriptions.styleAssistant,libKey:I,getPreContent:Le,requiredAccess:["agent"]},e),u.Tools.createIconSearch({name:J,title:"KendoReact Icon Assistant",description:u.ToolDescriptions.iconAssistant,libKey:I,getPostContent:Ue,requiredAccess:["assistant","agent"]},e),u.Tools.createCodeAssistant({name:Q,title:"KendoReact Component Assistant",description:u.ToolDescriptions.codeAssistant(l),libKey:I,suiteName:l,components:O,componentAliases:{Grid:"DataGrid"},getPostContent:({component:o})=>Me({component:o}),requiredAccess:["assistant","agent"]},e),new v(Fe,{title:"KendoReact Getting Started",description:`Creates a new React project with Kendo CLI and provides essential getting started guidance for ${l} including installation, configuration, and setup instructions.`,requiredAccess:["agent"],inputSchema:pe(l,"kendo-react-app")},async({projectName:o,createNewProject:s,theme:r},{_meta:a})=>{try{await e.recordToolUserRequest({toolName:Fe,meta:{projectName:o,createNewProject:s,theme:r,_meta:a}})}catch(d){console.error("Error recording tool request:",d)}return{content:[{type:"text",text:Be(o,s,r)}]}}),u.Tools.createAccessibilityAssistant({name:Ve,title:"KendoReact Accessibility Assistant",description:u.ToolDescriptions.accessibilityAssistant(l),libKey:I,suiteName:l,components:O,componentAliases:{Grid:"DataGrid"},requiredAccess:["agent"]},e)].filter(o=>o.hasAccess(t))}var It=kt(import.meta.url),Nt=ze.dirname(It),wt=ze.resolve(Nt,"../package.json"),We=JSON.parse(vt.readFileSync(wt,"utf-8")),He=new St({name:"kendo-mcp",title:"Kendo MCP Server",version:We.version});async function Et(){let e=new Tt;g("Starting server... ");let t=await ce(async()=>{let o=(await me())?.entitlement;return o?.Product?.Code||o?.product?.code});t!=="none"&&(_.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",je(_,t).forEach(o=>o.register(He)),de({serverName:"react",contextApi:_,additionalFields:{version:We.version,access_type:t}})),await He.connect(e)}Et();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-mcp",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "type": "module",
5
5
  "bin": "./dist/index.js",
6
6
  "license": "See LICENSE.md",