From c75598ff6d5f81ec410b6d988e1078b5b4715ea0 Mon Sep 17 00:00:00 2001 From: Jaroslav Bachorik Date: Sat, 3 Oct 2026 21:45:57 +0200 Subject: [PATCH] fix(pi): register jafar-perf's MCP server in the pi package jafar-perf lived in btraceio/jafar-perf-box as a pi package whose manifest registered the plugin's .mcp.json (`pi.mcp`), so installing it into pi also brought the jafar MCP server. This repository's pi package listed skills only, so pi users moving here would get the skills with no server behind them. Add `pi.mcp: ./plugins/jafar-perf/.mcp.json`, and have validate-repository.js check that path exists like it does for the skills directories, so the entry cannot rot. Only jafar-perf's server is registered: jfr-analyzer's .mcp.json starts the same jfr-mcp daemon under another name, and pi would run two bridges for one server. Verified: pi-mcp-adapter's own package loader (package-mcp-loader.ts, run from a copy outside node_modules) is given this package installed into a scratch pi home. With the entry it registers `btraceio_agent-plugins__jafar` as `jbang jfr-mcp@btraceio --stdio --attach`; without it, which is what main has today, it registers no servers. scripts/validate-marketplace.sh passes, and the validator now fails on a `pi.mcp` pointing at a missing file. Not run: a live pi session calling a jafar tool through the adapter. Co-Authored-By: Claude Sonnet 5.5 --- package.json | 3 ++- scripts/validate-repository.js | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 1bef9f7..992205a 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "./plugins/jfr-analyzer/skills", "./plugins/jafar-perf/skills", "./plugins/perf-engineer/skills" - ] + ], + "mcp": "./plugins/jafar-perf/.mcp.json" } } diff --git a/scripts/validate-repository.js b/scripts/validate-repository.js index de0f8e7..b4b2219 100755 --- a/scripts/validate-repository.js +++ b/scripts/validate-repository.js @@ -33,6 +33,7 @@ function checkCatalog(catalog, kind) { checkCatalog(claude, 'claude'); checkCatalog(codex, 'codex'); for (const resource of pi.pi?.skills || []) if (!exists(resource.replace(/^\.\//, ''))) errors.push(`pi: missing ${resource}`); +if (pi.pi?.mcp && !exists(pi.pi.mcp.replace(/^\.\//, ''))) errors.push(`pi: missing MCP config ${pi.pi.mcp}`); const skillFiles = []; function walk(dir) {