You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+131-3Lines changed: 131 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,7 @@ This monorepo contains several packages that combine into the `igniteui-cli`:
38
38
|[@igniteui/angular-templates](https://www.npmjs.com/package/@igniteui/angular-templates)| Contains the template definitions for Angular components |[packages/igx-templates](./packages/igx-templates)|
39
39
|[@igniteui/angular-schematics](https://www.npmjs.com/package/@igniteui/angular-schematics)| IgniteUI CLI implementation to be used with Angular CLI's schematics engine |[packages/ng-schematics](./packages/ng-schematics)|
40
40
|[igniteui-cli](https://www.npmjs.com/package/igniteui-cli)| Standalone IgniteUI CLI tool for React, jQuery and Angular |[packages/cli](./packages/cli)|
41
+
|[@igniteui/mcp-server](https://www.npmjs.com/package/@igniteui/mcp-server)| MCP server providing AI assistants with Ignite UI documentation and API reference |[packages/igniteui-mcp/igniteui-doc-mcp](./packages/igniteui-mcp/igniteui-doc-mcp)|
41
42
42
43
## Table of Contents
43
44
@@ -50,6 +51,9 @@ This monorepo contains several packages that combine into the `igniteui-cli`:
50
51
* [Generate Ignite UI for React project](#generate-ignite-ui-for-react-project)
51
52
* [Adding components](#adding-components)
52
53
*[Build and run](#build-and-run)
54
+
*[MCP Server](#mcp-server)
55
+
*[Using with AI Assistants](#using-with-ai-assistants)
56
+
*[Testing with MCP Inspector](#testing-with-mcp-inspector)
53
57
*[Schematics](#schematics)
54
58
*[Schematic Definitions](#schematic-definitions)
55
59
*[Contribution](#contribution)
@@ -137,6 +141,54 @@ ig build
137
141
ig start
138
142
```
139
143
144
+
## MCP Server
145
+
146
+
The CLI includes a bundled [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server that provides AI assistants with Ignite UI documentation search, API reference lookup, and scaffolding guidance for Angular, React, Blazor, and Web Components.
147
+
148
+
Start the MCP server:
149
+
```bash
150
+
ig mcp
151
+
```
152
+
153
+
The server runs over stdio and supports the following options:
154
+
```bash
155
+
ig mcp --remote <url># Use a remote backend instead of the local SQLite database
156
+
ig mcp --debug # Enable debug logging to mcp-server.log
157
+
```
158
+
159
+
### Using with AI Assistants
160
+
161
+
Configure your MCP client (e.g., VS Code, Claude Desktop, Cursor) to use the CLI as the MCP server:
162
+
163
+
```json
164
+
{
165
+
"mcpServers": {
166
+
"igniteui": {
167
+
"command": "ig",
168
+
"args": ["mcp"]
169
+
}
170
+
}
171
+
}
172
+
```
173
+
174
+
The MCP server exposes the following tools to AI assistants:
175
+
176
+
| Tool | Description |
177
+
|------|-------------|
178
+
|`list_components`| List available Ignite UI component docs for a framework |
179
+
|`get_doc`| Fetch full markdown content of a specific component doc |
180
+
|`search_docs`| Full-text search across Ignite UI documentation |
181
+
|`get_api_reference`| Retrieve the full API reference for a component or class |
182
+
|`search_api`| Search API entries by keyword or partial component name |
183
+
|`generate_ignite_app`| Return a setup guide for a new Ignite UI project |
184
+
185
+
### Testing with MCP Inspector
186
+
187
+
To interactively test and debug the MCP server tools:
188
+
```bash
189
+
npx @modelcontextprotocol/inspector ig mcp
190
+
```
191
+
140
192
## Schematics
141
193
You can also add `Ignite UI for Angular` components to your projects by using the `igniteui/angular-schematics` package. It included schematic definitions for most of the logic present in the [`igniteui-cli`](/packages/cli). These can be called in any existing Angular project or even when creating one. You can learn more about the schematics package on from its [readme](/package/ng-schematics).
142
194
@@ -147,12 +199,88 @@ See the [Contribution guide](https://github.com/IgniteUI/igniteui-cli/blob/maste
147
199
### Run locally
148
200
1. Clone the repository
149
201
2. Install dependencies with `yarn install`
150
-
3. To build the packages, run `yarn build` in the project `root`.
151
-
4. Open in Visual Studio Code
202
+
3. Build the MCP server and bundle it into the CLI:
203
+
```bash
204
+
cd packages/igniteui-mcp/igniteui-doc-mcp
205
+
npm install
206
+
npm run build
207
+
cd ../../..
208
+
npm run build:mcp-bundle
209
+
```
210
+
4. Build the monorepo packages: `npm run build`
211
+
5. Open in Visual Studio Code
152
212
153
213
There is a predefined launch.config file forVS Codein the root folder, so you can use VS Code View/Debug window and choose one of the predefined actions. These include launching the step by step guide, create new project for a particular framework or add components.
154
214
155
-
5. Hit Start Debugging/F5
215
+
6. Hit Start Debugging/F5
216
+
217
+
#### MCP Server development
218
+
219
+
The MCP server at `packages/igniteui-mcp/igniteui-doc-mcp` has its own build pipeline, separate from the monorepo. It uses ESM (ES2022, Node16 modules) while the rest of the monorepo uses CommonJS. See [DEVELOPMENT.md](./packages/igniteui-mcp/igniteui-doc-mcp/DEVELOPMENT.md) for the full MCP server development guide.
220
+
221
+
**Build the MCP server:**
222
+
```bash
223
+
cd packages/igniteui-mcp/igniteui-doc-mcp
224
+
npm install # Install MCP-specific dependencies (separate from yarn workspaces)
225
+
npm run build # Compile TypeScript + copy SQLite DB to dist/
226
+
```
227
+
228
+
**Build API reference documentation:**
229
+
230
+
The MCP server includes API reference docs for Angular, React, and Web Components. Angular and Web Components docs are generated from framework submodules via TypeDoc (submodules are auto-initialized by the build scripts). React uses a pre-built TypeDoc JSON model checked into git.
npm run build:docs:webcomponents # Web Components: init submodule → build lib → TypeDoc → markdown + index.json
236
+
npm run build:docs:all # Build both
237
+
```
238
+
239
+
>**Note:** Web Components requires a one-time library build (`npm run build:publish`in the submodule) before TypeDoc can run. The build script handles this automatically.
240
+
241
+
**Bundle MCP into CLI** (from the repo root):
242
+
```bash
243
+
npm run build:mcp-bundle # Copies dist/ and docs/ into packages/cli/mcp/
244
+
```
245
+
246
+
This copies the compiled MCP server, SQLite documentation database, and API reference docs into the CLI package. The `packages/cli/mcp/` directory is a build artifact (gitignored) and must be regenerated before publishing.
247
+
248
+
**Test the MCP server locally:**
249
+
```bash
250
+
npm run build:mcp-bundle
251
+
npm run build
252
+
node packages/cli/lib/cli.js mcp # Start via CLI
253
+
# or directly:
254
+
node packages/cli/mcp/dist/index.js # Start the bundled server
255
+
```
256
+
257
+
#### Building CLI package with bundled MCP server
258
+
259
+
The CLI package includes the MCP server as a bundled build artifact (not an npm dependency). To produce a complete CLI package with full MCP functionality, follow these steps:
260
+
261
+
```bash
262
+
# 1. Install monorepo dependencies
263
+
yarn install
264
+
265
+
# 2. Build the MCP server
266
+
cd packages/igniteui-mcp/igniteui-doc-mcp
267
+
npm install
268
+
npm run build # Compile TypeScript + copy SQLite DB
269
+
270
+
# 3. Build API reference docs (optional but recommended for full functionality)
271
+
npm run build:docs:all # Init submodules + generate Angular + WC API docs via TypeDoc
272
+
273
+
# 4. Bundle MCP into CLI (from repo root)
274
+
cd ../../..
275
+
npm run build:mcp-bundle # Copy dist/ + docs/ → packages/cli/mcp/
276
+
277
+
# 5. Build all packages for publishing
278
+
npm run build-pack
279
+
```
280
+
281
+
After step 5, `npm pack` from the repo root or `packages/cli/` will produce a tarball with the MCP server, documentation database, and API reference docs all included.
282
+
283
+
>**Skipping API docs:** If you skip step 3, the MCP server will still work for`list_components`, `get_doc`, `search_docs`, and `generate_ignite_app` tools using the bundled SQLite database. Only the `get_api_reference` and `search_api` tools require API docs.
0 commit comments