feat(mcp): add provar-nitrox-component-catalog bundled MCP resource#150
Merged
Merged
Conversation
Adds a bundled static MCP resource at provar://nitrox/component-catalog that catalogs all 9 shipped NitroX (Hybrid Model) base component packages. Also documents MCP Inspector setup in docs/development.md. RCA: The NitroX generate tool had no reference material to guide component generation — agents had to guess naming conventions, type strings, tagNames, and interaction patterns. Additionally no guidance existed for interactive MCP testing via the MCP Inspector. Fix: Bundle a static catalog of all shipped NitroX packages (generated from local installation, committed to docs/) and register it as a readable MCP resource, mirroring the provar-step-reference pattern. Add MCP Inspector setup guide including port-in-use resolution steps to docs/development.md. Changes: - docs/NITROX_COMPONENT_CATALOG.md: committed static catalog (~2000 lines) across common, html5, salesforce-lwc, screenflow, experienceCloud, omnistudio, runtimeOmnistudio, msdynamics, and vlocityIns packages - package.json: compile step copies catalog to lib/mcp/docs/; added to wireit files inputs - src/mcp/server.ts: registers new resource via readFileSync — no runtime dependency on local Provar installation - src/mcp/tools/nitroXTools.ts: provar_nitrox_generate description references the catalog - scripts/generate-nitrox-catalog.cjs: dev utility to regenerate when packages update - docs/development.md: MCP Inspector setup guide with port-cleanup commands Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…og resource RCA: No assertions verified the generate tool description mentions the component catalog resource, leaving a gap if the reference was accidentally removed. Fix: Add MockMcpServer.registrations capture and a describe block that asserts provar_nitrox_generate description includes provar-nitrox-component-catalog. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
RCA: The MCP Resources section in docs/mcp.md still described only one resource after adding the NitroX component catalog, leaving documentation incomplete. Fix: Add catalog resource entry to ToC and Resources section; add tip to NitroX section recommending agents read the catalog before calling generate. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
RCA: Version bump required on any PR that triggers a publish; this PR adds the provar-nitrox-component-catalog MCP resource (new user-visible feature). Fix: Increment beta suffix from 16 to 17 in package.json and server.json. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Quality Orchestrator🟢 LOW · 🧪 Tests to Run · Running 2 of 41 tests
▶ Run commandnpx playwright test \
unit/mcp/server.test.ts \
unit/mcp/nitroXTools.test.ts⚡ quality-orchestrator · |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new bundled MCP documentation resource (provar://nitrox/component-catalog) that exposes a compiled-in Markdown catalog of shipped NitroX base component packages, and updates NitroX generation guidance/docs accordingly.
Changes:
- Register a new MCP resource (
provar://nitrox/component-catalog) served from bundled markdown copied intolib/mcp/docs/at build time. - Update
provar_nitrox_generatetool description and add a unit test asserting the description references the new catalog resource. - Add a maintainer script to regenerate the catalog markdown and update docs/development with MCP Inspector instructions; bump versions to
1.5.0-beta.17.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/mcp/nitroXTools.test.ts | Extends the mock server to capture tool descriptions and adds an assertion that provar_nitrox_generate references the catalog. |
| src/mcp/tools/nitroXTools.ts | Updates provar_nitrox_generate description to instruct reading the component catalog first. |
| src/mcp/server.ts | Registers the new provar://nitrox/component-catalog MCP resource backed by bundled markdown. |
| server.json | Bumps published MCP server metadata version to 1.5.0-beta.17. |
| scripts/generate-nitrox-catalog.cjs | Adds a developer utility to regenerate docs/NITROX_COMPONENT_CATALOG.md from local NitroX package extraction. |
| package.json | Bumps package version and updates the wireit compile step to copy the new catalog into lib/mcp/docs/. |
| docs/NITROX_COMPONENT_CATALOG.md | Adds the generated NitroX component package catalog markdown content. |
| docs/mcp.md | Documents the new resource and updates guidance to read it before using provar_nitrox_generate. |
| docs/development.md | Adds MCP Inspector setup instructions and improves table formatting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+108
to
+112
| const docsDir = join(dirname(fileURLToPath(import.meta.url)), 'docs'); | ||
|
|
||
| server.resource( | ||
| 'provar-nitrox-component-catalog', | ||
| 'provar://nitrox/component-catalog', |
Comment on lines
+307
to
+309
| # Compile first, then launch the Inspector against the dev server | ||
| npm run compile | ||
| npx @modelcontextprotocol/inspector node bin/dev.js provar mcp start --allowed-paths /absolute/path/to/your/provar/project |
RCA: ESLint @typescript-eslint/member-ordering requires public fields before private fields; the initial test commit had the order reversed, causing CI lint failure. Fix: Move public registrations declaration above private handlers field. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…piled modes RCA: In dev/ts-node mode the sibling lib/mcp/docs/ path doesn't exist, so both MCP resources (nitrox-component-catalog and step-reference) always fell through to the "Catalog not found" fallback text, making them unusable during development. Fix: Extract resolveDocsDir() that probes the sibling docs/ dir and falls back to repo-root docs/ when absent; add server.test.ts covering both branches. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
provar://nitrox/component-catalogas a bundled MCP resource — catalog of all 9 shipped NitroX (Hybrid Model) base component packages, compiled into the package at build time (same pattern asprovar-step-reference)provar_nitrox_generatetool description to prompt agents to read the catalog before generatingscripts/generate-nitrox-catalog.cjs— maintainer script to regenerate the catalog when Provar ships updated NitroX packagesdocs/mcp.mdand adds MCP Inspector setup todocs/development.md1.5.0-beta.17Details
The catalog is a static Markdown file (
docs/NITROX_COMPONENT_CATALOG.md, ~2000 lines) committed to the repo and copied tolib/mcp/docs/at compile time via wireit. The MCP resource reads it viareadFileSyncat runtime — no dependency on~/Provar/.nitroX/on the end-user's machine.To regenerate when Provar ships new NitroX packages:
node scripts/generate-nitrox-catalog.cjs # then commit docs/NITROX_COMPONENT_CATALOG.mdTest plan
yarn test:only— 895 passing (up from 894; new test assertsprovar_nitrox_generatedescription references the catalog resource)yarn compile— TypeScript clean,lib/mcp/docs/NITROX_COMPONENT_CATALOG.mdpresent in outputprovar://nitrox/component-catalogresource — returns full Markdown catalogprovar_nitrox_generatedescription in MCP Inspector includes reference toprovar-nitrox-component-catalog🤖 Generated with Claude Code