Repository navigation
Conversation
1.13.0 is the newest 1.x release the workspace's seven-day maturity gate will install, and the first line that serves src/skills. The build now depends on the matching @xmcp-dev/compiler. The bundler hook merges xmcp's rspack 2 aliases instead of replacing them, points Zod at the hoisted workspace copy, and keeps the stdio entry silent on stderr.
Vendors the MCP-driven skill from dotCMS/agent-toolkit and publishes it through the MCP Skills extension. A drift check pins that commit. The smoke test checks the skills capability, the manifest, and that every resources/read matches the published SHA-256 and size.
|
Claude finished @nicobytes's task in 1m 43s —— View job Claude Code ReviewReviewed the full diff (build config, drift/tools guard scripts, smoke test, and the vendored skill). This is a well-engineered spike: the smoke test boots the real bundle and verifies the seven tools, the skill manifest, per-file SHA-256/size, and forbidden markers; the drift check pins upstream and enforces the allowed-edit set exactly. I independently scanned the served skill files and confirmed no forbidden markers ( No correctness, security, or convention bugs found. Two non-blocking design notes below, both tied to the build no longer being hermetic. New Issues
Everything else — the |
The diff-scoped strict gate rejects capabilities as a dotted property because the JSON-RPC result type carries an index signature. Co-authored-by: Nicolas Molina Monroy <hi@nicobytes.com>
Proposed Changes
Serves the
dot-ui-vtl-migrationskill from@dotcms/mcp-serverthrough the MCP Skills extension (io.modelcontextprotocol/skills), after upgradingxmcpfrom 0.6.4 to 1.13.0. The seven existing tools are unchanged. This is a draft spike for #38760. It is not published to npm, andvtl_migration.pyis not ported to TypeScript.Two commits, so the upgrade can be reviewed on its own, plus a follow-up that fixes the strict typecheck gate:
chore(mcp-server): upgrade xmcp from 0.6.4 to 1.13.0feat(mcp-server): serve the dot-ui-vtl-migration skillfix(mcp-server): read initialize capabilities with bracket accessxmcp breaking changes adapted
1.13.0 is the newest 1.x the workspace's seven-day maturity gate (
minimumReleaseAge: 10080) will install. 1.13.4 (26 Nov 2026) is the registry latest and is still inside that window. 1.13.0 (20 Nov 2026) is the first release at or after 1.10.0 that clears it, and 1.10.0 is the first release that servessrc/skills/.Adapted from the xmcp upgrade notes and the 1.13.0 compiler:
@xmcp-dev/compiler@1.13.0is a dev dependency. Since 0.8.0 thexmcppackage is the runtime and the compiler is separate;xmcp buildresolves it from the project.engines.nodeon the published package is>=22.12.0. Rspack 2 (1.10.2) requires Node 22.12 to build. CI already usescore-web/.nvmrc(v22.22.3).bundlerhook receives an Rspack 2 config whoseresolve.aliasalready containszod,node:builtins, and the.xmcpruntime shims. Replacing that map drops them. The hook now appends ours.zodis aliased to the workspace-root install, because pnpm does not createapps/mcp-server/node_modules/zodand xmcp only auto-aliases Zod when that path exists.@dotcms/ai/*aliases stay. xmcp readspathsonly from this app'stsconfig.json, which extends the base config and does not repeat them.<toolsPath>/**/*.{ts,tsx}with no exclude (confirmed in the 1.13 compiler). A file with no default export is skipped only after the module is evaluated, soscripts/check-tools-dir.mjsstill rejects a spec undersrc/tools/. The comment now says that.stdio.jswith a shebang, emitted todist/apps/mcp-server/. xmcp 1.x also runs dotenv on startup and writesinjected env (0) from .envto stderr even when the file is missing. That line is protocol noise on stdio. The shebang banner now setsDOTENV_CONFIG_QUIET=truewhen the caller has not set it, so the shipped server stays silent. A second BannerPlugin cannot be appended: rspack prepends it and the shebang leaves line 1.ts-checker-rspack-plugin@1.8.0(a compiler dependency) requireschokidar@^4.0.3. 4.0.3 (18 Dec 2024) is the only release in that range and has no npm provenance attestation, while 4.0.0, 4.0.1 and 5.0.0 do. It is listed intrustPolicyExcludewith that reason. It is not a takeover.paths.resourcesstaysfalse(no resource modules).paths.skillsis./src/skills. The skills extension registers each file as a resource and declares theresourcescapability itself.Source of truth
Vendored copy plus a drift check, not a build-time copy.
dotCMS/agent-toolkitis a separate repository. Copying it at build time would make everypnpm nx build mcp-serverdepend on GitHub for the bytes that ship, and those bytes would not be in the review diff. The files undercore-web/apps/mcp-server/src/skills/dot-ui-vtl-migration/are the copy (SKILL.md,reference/,scripts/vtl_migration.pyonly).scripts/skill-upstream.jsonpinsdotCMS/agent-toolkitat895ba10e8d639276099e674eb59d7a7f25b0c4d8(main when this was taken, which contains merged PR dotCMS/agent-toolkit#1).scripts/check-skill-drift.mjsruns beforexmcp build, downloads those four files, applies the allowed edits below, and fails if the served bytes differ.The core checkout's
.claude/skills/dot-ui-vtl-migrationwas not used. That copy shells out touvand calls REST withDOTCMS_TOKEN/BASE_URL.Allowed edits, each matched exactly once by the drift check:
nameisdot-ui-vtl-migration, not upstream'sdotcms-custom-field-migration. xmcp and the Agent Skills spec require the name to equal the directory, and the issue requires the URIskill://dot-ui-vtl-migration/SKILL.md. Upstream's own directory is alreadydot-ui-vtl-migration; the frontmatter name does not match it, so an unmodified copy does not build.reference/migration-guide.mdno longer citescore-web/apps/dotcms-ui/src/daisyui-theme.css. It names the admin UI theme stylesheet instead.scripts/vtl_migration.pyno longer citesdotCMS/core'smigrate_custom_fields.py. The logic is unchanged.Acceptance criteria
xmcpis 1.13.0 (>= 1.10.0).pnpm nx build mcp-server,pnpm nx lint mcp-serverandpnpm nx test mcp-serverpass. See commands below.src/smoke/server-boot.spec.tsstill lists exactly the seven tools:download_assets,execute,page_create,page_place_content,page_verify,search,upload_assets. The build log reportsRegistered 7 tools, 1 skill.capabilities.extensions["io.modelcontextprotocol/skills"]andcapabilities.resourcesoninitialize(protocol2025-06-18).skills/listreturnsskill://dot-ui-vtl-migration/SKILL.md. The description matches the servedSKILL.md(the shortened form of the agent-toolkit description). The manifest includesscripts/vtl_migration.pyand the two reference files, and nothing else. The smoke test asserts this.resources/readon every manifest URI returns bytes whose SHA-256 and size match the manifest. The smoke test asserts this.uv(as a word),DOTCMS_TOKEN,BASE_URL, REST basic auth (Authorization: Basic/HTTPBasicAuth), or a core-local path (.claude/skills,core-web/,dotCMS/src,dotCMS/core,migrate_custom_fields,apps/mcp-server/).Commands and results
From
core-web, on this branch:pnpm nx test mcp-serverdepends onbuild, and the smoke test bootsdist/apps/mcp-server/stdio.jsover stdio.CI
On
b1d0b5b1f5, run 46071778948 failedPR Test / Frontend Unit Testsin the strict typecheck gate (TS4111oninitialize.result.capabilities).Finalize / Final Statusfailed only because that job failed. Fixed in26e6563852.On
26e6563852,PR Test / Frontend Unit TestsandFinalize / Final Statussucceed. Two Claude jobs fail before they review the diff, both withWorkflow initiated by non-human actor: cursor (type: Bot). Add bot to allowed_bots list or use '*' to allow all bots.That is the action refusing a bot-opened PR, not a finding about this change.Manual verification (for reviewer)
These two checks are for Nicolas, against a real dotCMS instance. Do not also install
.claude/skills/dot-ui-vtl-migrationor the agent-toolkit plugin in that Claude Code session, or the skill can come from disk instead of the server.Build and point Claude Code at the local bundle:
cd core-web pnpm nx build mcp-server{ "mcpServers": { "dotcms": { "command": "node", "args": ["<repo>/core-web/dist/apps/mcp-server/stdio.js"], "env": { "DOTCMS_URL": "http://localhost:8080", "AUTH_TOKEN": "<jwt from the instance>" } } } }Restart Claude Code so it reconnects. The skill should show up as coming from the
dotcmsMCP server, nameddot-ui-vtl-migration.Single field. Paste one legacy Dojo/Dijit custom-field template and ask for the migration. Expect one inline reply: migrated code inside
#if( $structures.isNewEditModeEnabled() ), the original untouched inside#else. Expect nopython3and novtl_migration.py.Whole instance, dry run. Ask to dry-run a migration of every legacy custom field on the connected instance. Expect Claude Code to ask for approval before it runs
python3onscripts/vtl_migration.py(the script ispython3and the standard library only). Expect every instance read (contentTypes, field bodies,/dA/files) to go through the MCP tools (execute,download_assets, and the others), not through REST,uv,DOTCMS_TOKEN, orBASE_URL. Nothing should be written to the instance: the skill's own step 6 ispython3 scripts/vtl_migration.py check --dry-run. Please paste both transcripts on this PR and note which step failed, if any.Known limitations
https://raw.githubusercontent.comon every build. A blocked network fails the build even when the vendored files are unchanged.download_assetscan fetch a/dA/file by path, whetherexecutecan publish multipart, and whether the preloadedcontentTypeslist is complete.vtl_migration.pyis still Python. Porting it to a server-side tool is a follow-up.paths.promptsstays off. Tasks, elicitation and file uploads are not in this change.stdio.jsdoes not.Checklist
src/smoke/server-boot.spec.ts(stdio boot, seven tools, skill manifest, digest/size, forbidden markers) andscripts/check-skill-drift.mjson builduv,DOTCMS_TOKEN,BASE_URL, REST basic auth and core-local paths. No secrets are added.Additional Info
Refs #38760
Related: #38007, #36078, #37699, #37768, dotCMS/agent-toolkit#1.