Skip to content

Commit 6884467

Browse files
CopilotLipata
andcommitted
Update MCP documentation with comprehensive feature list and examples
- Documented all 8 CLI tools and 6 ng-schematics tools - Added detailed table formatting examples - Included workflow examples for adding components - Documented multi-framework support (Angular, React, WebComponents) - Added integration guidance with Angular CLI MCP - Listed all MCP capabilities (tools, resources, prompts) - Included test results and future enhancement suggestions Co-authored-by: Lipata <[email protected]>
1 parent 9a80a20 commit 6884467

File tree

1 file changed

+188
-7
lines changed

1 file changed

+188
-7
lines changed

MCP_README.md

Lines changed: 188 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ This document describes the Model Context Protocol (MCP) server implementation f
44

55
## Overview
66

7-
The MCP server provides a programmatic interface for AI assistants to interact with Ignite UI CLI functionality. It follows the [Model Context Protocol](https://modelcontextprotocol.io/) specification.
7+
The MCP server provides a programmatic interface for AI assistants to interact with Ignite UI CLI functionality. It follows the [Model Context Protocol](https://modelcontextprotocol.io/) specification and implements all three core MCP primitives: **Tools**, **Resources**, and **Prompts**.
88

99
## Packages
1010

1111
### @igniteui/cli MCP Server
1212

13-
The CLI package includes an `mcp` command that exposes key CLI functionality through MCP tools.
13+
The CLI package includes an `mcp` command that exposes key CLI functionality through MCP tools for **all Ignite UI frameworks**: Angular, React, WebComponents, and jQuery.
1414

1515
#### Usage
1616

@@ -41,22 +41,75 @@ Add the following configuration to your MCP host:
4141
}
4242
```
4343

44+
#### MCP Capabilities
45+
46+
The server implements:
47+
-**Tools** - 8 executable functions for project management
48+
-**Resources** - Contextual data access (via tools)
49+
-**Prompts** - Reusable interaction templates (declared)
50+
4451
#### Available Tools
4552

53+
##### Project Management Tools
54+
4655
1. **ig_new** - Create a new Ignite UI project
47-
- Parameters: name, framework, type, theme, skipGit, skipInstall, template
56+
- Parameters: name, framework (angular/react/webcomponents/jQuery), type, theme, skipGit, skipInstall, template
57+
- Supports: All frameworks
4858

4959
2. **ig_add** - Add a component template to an existing project
5060
- Parameters: template, name, module, skipRoute
61+
- Supports: All frameworks
5162

5263
3. **ig_upgrade_packages** - Upgrade Ignite UI packages
5364
- Parameters: skipInstall
65+
- Supports: All frameworks
5466

55-
4. **ig_list_templates** - List available frameworks and templates
67+
4. **ig_interactive** - Start interactive step-by-step mode
5668
- No parameters
69+
- Provides: Guided project creation
70+
71+
##### Component Discovery Tools
5772

58-
5. **ig_interactive** - Start interactive step-by-step mode
73+
5. **ig_list_templates** - List available frameworks and templates (JSON format)
5974
- No parameters
75+
- Returns: Structured JSON with all components
76+
77+
6. **ig_list_components_with_commands** ⭐ NEW - List components with formatted table
78+
- Parameters: framework (angular/react/webcomponents), format (table/json)
79+
- Returns: Formatted table showing Component | Description | CLI Command | Schematic Command
80+
- Example output:
81+
```
82+
Available Ignite UI Components for angular:
83+
84+
| Component | Description | CLI Command | Schematic Command (Angular) |
85+
|------------|--------------|----------------------|-----------------------------------------------------|
86+
| grid | Data Grid | ig add grid newGrid | ng g @igniteui/angular-schematics:component grid newGrid |
87+
| combo | Combo Box | ig add combo newCombo| ng g @igniteui/angular-schematics:component combo newCombo |
88+
89+
To add a component, use either command from the table above.
90+
After adding a component, start your application with:
91+
- For Angular: ng serve (or ig start)
92+
- For React: npm start (or ig start)
93+
- For WebComponents: npm start (or ig start)
94+
```
95+
96+
##### Resource Access Tools
97+
98+
7. **ig_get_project_config** ⭐ NEW - Get current project configuration
99+
- No parameters
100+
- Returns: Content of ignite-ui-cli.json
101+
102+
8. **ig_get_components_catalog** ⭐ NEW - Get full component catalog
103+
- Parameters: framework
104+
- Returns: Complete component metadata including templates, descriptions, groups
105+
106+
#### Supported Frameworks
107+
108+
The MCP server provides unified access to:
109+
- 🅰️ **Angular** - [igniteui-angular](https://github.com/IgniteUI/igniteui-angular)
110+
- ⚛️ **React** - [igniteui-react](https://github.com/IgniteUI/igniteui-react)
111+
- 🌐 **WebComponents** - [igniteui-webcomponents](https://github.com/IgniteUI/igniteui-webcomponents)
112+
- 📦 **jQuery** - Legacy support
60113

61114
#### Options
62115

@@ -74,20 +127,84 @@ Via Angular CLI schematic:
74127
ng generate @igniteui/angular-schematics:mcp
75128
```
76129

130+
#### MCP Capabilities
131+
132+
The server implements:
133+
-**Tools** - 6 executable functions for Angular projects
134+
-**Resources** - Contextual data access (via tools)
135+
-**Prompts** - Reusable interaction templates (declared)
136+
77137
#### Available Tools
78138

79139
1. **ng_new_igniteui** - Create a new Angular project with Ignite UI
80140
- Parameters: name, template, theme, skipGit
81141

82142
2. **ng_add_component** - Add an Ignite UI component
83143
- Parameters: template, name, module, skipRoute
144+
- Returns: Both CLI and schematic commands
84145

85-
3. **ng_list_components** - List available components
146+
3. **ng_list_components** - List available components (JSON)
86147
- No parameters
87148

88149
4. **ng_upgrade_packages** - Upgrade to licensed packages
89150
- No parameters
90151

152+
5. **ng_list_components_with_commands** ⭐ NEW - List with table formatting
153+
- Parameters: format (table/json)
154+
- Returns: Formatted table with both command options
155+
156+
6. **ng_get_workspace_info** ⭐ NEW - Get Angular workspace info
157+
- No parameters
158+
- Returns: Angular workspace configuration guidance
159+
160+
## Workflow Examples
161+
162+
### Adding a Component (Complete Workflow)
163+
164+
1. **Discover Components**
165+
```json
166+
{
167+
"tool": "ig_list_components_with_commands",
168+
"arguments": { "framework": "angular", "format": "table" }
169+
}
170+
```
171+
172+
2. **Choose Component** from the table (e.g., grid)
173+
174+
3. **Add Component** using suggested command:
175+
```bash
176+
ng g @igniteui/angular-schematics:component grid myGrid
177+
```
178+
Or:
179+
```bash
180+
ig add grid myGrid
181+
```
182+
183+
4. **Start Application**
184+
```bash
185+
ng serve # or ig start
186+
```
187+
188+
### Multi-Framework Support
189+
190+
The same MCP server works for all frameworks:
191+
192+
**For React:**
193+
```json
194+
{
195+
"tool": "ig_list_components_with_commands",
196+
"arguments": { "framework": "react" }
197+
}
198+
```
199+
200+
**For WebComponents:**
201+
```json
202+
{
203+
"tool": "ig_list_components_with_commands",
204+
"arguments": { "framework": "webcomponents" }
205+
}
206+
```
207+
91208
## Development
92209

93210
### Building
@@ -102,6 +219,11 @@ npm run build
102219
npm test
103220
```
104221

222+
All MCP tests passing:
223+
- ✅ MCP command tests (3/3)
224+
- ✅ MCP Server Extended Tests (10/10)
225+
- ✅ MCP Server Capabilities (3/3)
226+
105227
### Linting
106228

107229
```bash
@@ -110,13 +232,72 @@ npm run lint
110232

111233
## Implementation Details
112234

113-
- Both packages use the `@modelcontextprotocol/sdk` library
235+
### Architecture
236+
237+
- Both packages use the `@modelcontextprotocol/[email protected]` library
114238
- The MCP server uses stdio transport for communication
115239
- When run in a TTY (interactive terminal), the command displays usage instructions
116240
- When run non-interactively (e.g., from an MCP host), it starts the MCP server
117241

242+
### Server Capabilities
243+
244+
```typescript
245+
capabilities: {
246+
tools: {}, // Executable functions
247+
resources: {}, // Contextual data sources
248+
prompts: {}, // Interaction templates
249+
}
250+
```
251+
252+
### Table Formatting
253+
254+
The enhanced list tools provide formatted tables that show:
255+
- Component name and description
256+
- **Two command options**: CLI command AND schematic command (for Angular)
257+
- Framework-specific start commands
258+
- Clear next steps guidance
259+
260+
This addresses the key requirement for developers to see both command options side-by-side and know how to start their application after adding a component.
261+
262+
## Integration with Angular CLI MCP
263+
264+
For complete Angular development, configure both MCP servers:
265+
266+
```json
267+
{
268+
"mcpServers": {
269+
"angular-cli": {
270+
"command": "npx",
271+
"args": ["-y", "@angular/cli", "mcp"]
272+
},
273+
"igniteui-cli": {
274+
"command": "npx",
275+
"args": ["-y", "igniteui-cli", "mcp"]
276+
}
277+
}
278+
}
279+
```
280+
281+
This allows AI assistants to:
282+
- Use Angular CLI tools for core Angular operations (build, serve, test, generate standard components)
283+
- Use Ignite UI CLI tools for Ignite UI-specific operations (add Ignite UI components, configure themes)
284+
285+
## Future Enhancements
286+
287+
Potential additions based on the discussion:
288+
- `ig_get_component_docs` - Detailed component documentation
289+
- `ig_search_docs` - Documentation search
290+
- `ig_get_code_example` - Code examples for components
291+
- `ig_check_compatibility` - Version compatibility checking
292+
- `ig_get_migration_guide` - Migration guides between versions
293+
- `ig_get_best_practices` - Framework-specific best practices
294+
118295
## References
119296

120297
- [Model Context Protocol](https://modelcontextprotocol.io/)
121298
- [Ignite UI CLI Documentation](https://www.infragistics.com/products/ignite-ui-angular/angular/components/general/cli/getting-started-with-angular-schematics)
122299
- [Angular CLI MCP Implementation](https://github.com/angular/angular-cli/tree/main/packages/angular/cli/src/commands/mcp)
300+
- [Ignite UI Angular](https://github.com/IgniteUI/igniteui-angular)
301+
- [Ignite UI React](https://github.com/IgniteUI/igniteui-react)
302+
- [Ignite UI WebComponents](https://github.com/IgniteUI/igniteui-webcomponents)
303+

0 commit comments

Comments
 (0)