Repository navigation
fix(mcp): start the docs server from @igniteui/mcp-server in ai-config - #1870
Merged
Merged
Conversation
ai-config now writes `npx -y @igniteui/mcp-server` instead of `npx -y igniteui-cli mcp`, except in projects that list igniteui-cli, where pnpm can't start the server package directly. Re-running ai-config updates only command and args, keeping user-added fields. The server reports its real version in serverInfo, and resolvePackage and getUpgradeablePackages no longer crash on a package.json without a dependencies field.
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues requiring changes to the standalone docs-server configuration update.
No open issues 🎉
What changed in this PR
This PR addresses #1864 by making ai-config launch the standalone docs server, reducing startup overhead while retaining the CLI-based command for projects that declare igniteui-cli.
Changes:
- Defaults to
npx -y @igniteui/mcp-server, preserves user-added configuration fields, and avoids rewriting unchanged configurations. - Reports the server’s package version and handles package manifests without
dependencies. - Updates configuration documentation and regression tests for CLI and Angular schematic workflows.
| File | Description |
|---|---|
spec/unit/packageResolve-spec.ts |
Tests package resolution without a dependencies field. |
spec/unit/ai-config-spec.ts |
Tests command selection, configuration migration, field preservation, and unchanged-file handling. |
README.md |
Documents the new command, CLI fallback, and startup alternatives. |
packages/ng-schematics/src/ng-new/index_spec.ts |
Updates the expected server command for generated Angular projects. |
packages/ng-schematics/src/cli-config/index_spec.ts |
Tests the standalone command and project-local CLI fallback. |
packages/igniteui-mcp/Specification.md |
Updates MCP configuration examples to use the standalone package. |
packages/igniteui-mcp/igniteui-doc-mcp/src/index.ts |
Reports the package version in server metadata. |
packages/core/util/mcp-config.ts |
Selects the launch command and updates configuration fields without replacing entire entries. |
packages/core/update/package-resolve.ts |
Defaults missing dependencies to an empty object. |
Review effort: Balanced
7 of 16 tasks
ivanvpetrov
marked this pull request as ready for review
November 2, 2026 08:59
kdinev
approved these changes
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1864.
This PR changes the entry
ig ai-configwrites (part 1); Part 2 is already solved with #1871.Description
ig ai-configwrotenpx -y igniteui-cli mcp, which downloads the whole CLI (140 MB) to run the docs server and starts it as a second process. Cold starts took about 16 s alone and 24 s when sessions start together, close to the 30 s timeout of common MCP clients.ai-config(and the Angularai-configschematic) now writesnpx -y @igniteui/mcp-server: about 8 s cold, one Node process fewer, and a stale globaligniteui-cliis no longer picked up.package.jsonlistsigniteui-clikeepnpx -y igniteui-cli mcp. In a pnpm project, npx finds@igniteui/mcp-serveras a transitive dependency but pnpm doesn't link its bin, so the server package can't start there (verified:'igniteui-mcp' is not recognized). These projects already start from the local copy without a download, and perf(cli): start the MCP server in-process before the CLI loads #1871 brings that path close to the speed of starting the server package directly. Schematicng newprojects list@igniteui/angular-schematicsinstead and get the new entry.igniteui-cli, so re-runningai-configupdates existing configs instead of adding a second server. It now updates onlycommandandargs, so user-added fields such asenvsurvive, and it no longer rewrites a file whose values are unchanged.serverInfoinstead of a hard-coded1.0.0.resolvePackageandgetUpgradeablePackageshandle apackage.jsonwithoutdependencies. Before, everyigcommand,ig mcpincluded, crashed in such folders.Existing projects get the new entry when they re-run
ig ai-config.Type of Change
Affected Packages
igniteui-cli(packages/cli)@igniteui/cli-core(packages/core)@igniteui/angular-templates(packages/igx-templates)@igniteui/angular-schematics(packages/ng-schematics)@igniteui/mcp-server(packages/igniteui-mcp)Checklist
npm run test)npm run build)npm run lint)Additional Context
Follow-up: #1871 handles
ig mcpbefore the CLI loads and runs the server in the same process, with no CLI parent and no child process (the second point of #1864). This halves the warm start ofig mcp, including thenpx -y igniteui-cli mcpentry kept for projects that listigniteui-cli, and sends the "Different igniteui-cli global and local version" notice to stderr. The two PRs touch different files and can merge in either order.The skill files and documentation pages in the framework and documentation repos still show
npx -y igniteui-cli mcpand need the same change there. Until then, an agent that follows a skill's MCP setup step after a slow first start may write the old entry back over the new one.