[PR #5064] [CLOSED] feat(plugin): ship a Claude Code plugin for the MCP server #6764

Closed
opened 2026-11-01 21:42:52 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/5064
Author: @cainiao1992
Created: 10/18/2026
Status: ❌ Closed

Base: main ← Head: feat/claude-code-plugin


📝 Commits (1)

  • 6a3052e feat(plugin): ship a Claude Code plugin for the MCP server

📊 Changes

5 files changed (+129 additions, -0 deletions)

View changed files

➕ .claude-plugin/marketplace.json (+27 -0)
➕ .claude-plugin/plugin.json (+23 -0)
📝 docs/installation.md (+17 -0)
📝 package.json (+2 -0)
➕ scripts/rea-mcp-launcher.mjs (+60 -0)

📄 Description

Summary

Fixes #5062.

Adds a Claude Code plugin and marketplace so REA can be installed in one step:

/plugin marketplace add morluto/rea
/plugin install rea@rea

The plugin registers the existing local MCP server and installs the
reverse-engineer-anything skill together; no separate doctor registration
or skills add step is needed.

Problem and expected behavior

Claude Code users currently register REA with rea mcp doctor --client claude_code and install the skill separately, and the two can drift:
instructions from one version while the registered server runs another.
Expected behavior: installing the plugin puts the server and the skill on one
released version, and development checkouts load the local build directly.

Change and scope

  • .claude-plugin/marketplace.json declares this repository as a marketplace
    whose single entry sources the plugin from the published rea-agents npm
    package (source: npm). Plugin content therefore never comes from this
    repository's git tree, and generated skills/ stay uncommitted as required.
  • .claude-plugin/plugin.json is the plugin manifest with an inline
    mcpServers entry. Inlining keeps the launcher out of a repository-root
    .mcp.json, which Claude Code would otherwise also read as project-level
    configuration where ${CLAUDE_PLUGIN_ROOT} does not expand.
  • scripts/rea-mcp-launcher.mjs prefers the local build when the checkout has
    scripts/rea.mjs, dist/, and node_modules/; otherwise it runs
    npx -y rea-agents@<package version> mcp. The version is read from the same
    package.json that ships in the tarball, so the fallback stays pinned to the
    version the plugin itself shipped with — no second version source to sync.
  • package.json#files adds the manifest and the launcher to the published
    tarball.
  • docs/installation.md gains a "Claude Code plugin" section.

Follow the contribution scope.
This packages the existing MCP server and skill behind Claude Code's plugin
installation; no new provider, engine, or target-interaction capability is
introduced. The required maintainer scope decision is not applicable — nothing
here touches target execution, injection, mutation, or protection recovery.

Contract and boundary impact

  • Semantic owner and earliest changed stage: distribution/installation layer (docs/installation.md, plugin manifests); domain and application layers are untouched.
  • Contribution scope fit and linked maintainer decision: not applicable — existing capabilities gain an installation channel; no authority or scope change.
  • CLI and MCP/tool-catalog contract: unchanged. Same server and catalog; the launcher only chooses how rea mcp starts.
  • Provider, bridge, target-format, or platform compatibility: the launcher works on macOS/Linux/Windows (a shell is used only on win32 so spawn resolves npx.cmd). The npx fallback requires Node/npm on PATH; the local branch requires a completed build.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable.
  • Generated metadata (docs/public/product-catalog.json), package, or installation impact: none regenerated; skills/ and catalogs stay ignored. The two authored .claude-plugin JSON files are committed intentionally — they are source manifests, not build outputs.

Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • Tests added or updated: none. The repository suite does not cover Claude Code's plugin loader; the change was validated with claude plugin validate and direct smoke tests listed below.
  • Base reproduction or other evidence: observed outputs under "Validation performed".
  • User-visible CLI/MCP output (if applicable): the launcher smoke test returns serverInfo {"name":"rea","version":"6.7.0"}.
  • Remaining proof gaps: the npx fallback was smoke-tested as the exact command it spawns (npx -y rea-agents@6.7.0 mcp), not through a full npm-sourced plugin install; the author additionally installed the plugin from this branch and used it without issues. The win32 taskkill path of the launcher is source-derived, not executed.

For evidence-bearing changes:

  • Observed, derived, and inferred claims remain distinguishable.
  • Artifact identity, source provenance, and failed attempts remain preserved.
  • Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.

Validation performed

  • claude plugin validate . — passed with one warning: version: No version specified. Intentional: the manifest omits version so the npm package's own version remains the single version source; adding it would require a per-release sync.
  • npm pack --dry-run — tarball includes .claude-plugin/plugin.json, scripts/rea-mcp-launcher.mjs, and skills/reverse-engineer-anything/; marketplace.json is correctly excluded (6.0 MB, 1775 files).
  • npm run check:fast — passed.
  • npm run docs:check — passed.
  • Launcher local branch — an MCP initialize request returned serverInfo {"name":"rea","version":"6.7.0"}.
  • npx fallback branch — npx -y rea-agents@6.7.0 mcp answered initialize identically.
  • Review fixes (c92b71d8e) — after rebuilding dist: local-branch initialize smoke passes; with dist/mcp/main.js absent the runtime check evaluates false and the launcher falls back to the published package; SIGTERM to the launcher stopped the spawned server on macOS arm64 with no leftover rea.mjs mcp processes.
  • Author verification — installed the plugin from this branch and exercised it successfully.

Compatibility, safety, and release

  • Breaking changes or migration steps: none; purely additive.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable (no target interaction). Launcher verified on macOS arm64; the win32 npx.cmd handling is source-derived, not executed.
  • Package or release metadata impact: the published tarball gains two small files (~2 KB total) via package.json#files; no version or metadata regeneration.
  • Security, privacy, process, or containment review: the launcher spawns node/npx with stdio: "inherit" and no added environment; npm-sourced plugin installs never run install scripts (enforced by Claude Code), and the fallback pins an exact released version.

Author readiness

Human owner: @cainiao1992

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/5064 **Author:** [@cainiao1992](https://github.com/cainiao1992) **Created:** 10/18/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/claude-code-plugin` --- ### 📝 Commits (1) - [`6a3052e`](https://github.com/morluto/rea/commit/6a3052e5db95201e2fb1a2d725c8e7e49dd7d301) feat(plugin): ship a Claude Code plugin for the MCP server ### 📊 Changes **5 files changed** (+129 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `.claude-plugin/marketplace.json` (+27 -0) ➕ `.claude-plugin/plugin.json` (+23 -0) 📝 `docs/installation.md` (+17 -0) 📝 `package.json` (+2 -0) ➕ `scripts/rea-mcp-launcher.mjs` (+60 -0) </details> ### 📄 Description ## Summary Fixes #5062. Adds a Claude Code plugin and marketplace so REA can be installed in one step: ```text /plugin marketplace add morluto/rea /plugin install rea@rea ``` The plugin registers the existing local MCP server and installs the `reverse-engineer-anything` skill together; no separate `doctor` registration or `skills add` step is needed. ## Problem and expected behavior Claude Code users currently register REA with `rea mcp doctor --client claude_code` and install the skill separately, and the two can drift: instructions from one version while the registered server runs another. Expected behavior: installing the plugin puts the server and the skill on one released version, and development checkouts load the local build directly. ## Change and scope - `.claude-plugin/marketplace.json` declares this repository as a marketplace whose single entry sources the plugin from the published `rea-agents` npm package (`source: npm`). Plugin content therefore never comes from this repository's git tree, and generated `skills/` stay uncommitted as required. - `.claude-plugin/plugin.json` is the plugin manifest with an inline `mcpServers` entry. Inlining keeps the launcher out of a repository-root `.mcp.json`, which Claude Code would otherwise also read as project-level configuration where `${CLAUDE_PLUGIN_ROOT}` does not expand. - `scripts/rea-mcp-launcher.mjs` prefers the local build when the checkout has `scripts/rea.mjs`, `dist/`, and `node_modules/`; otherwise it runs `npx -y rea-agents@<package version> mcp`. The version is read from the same `package.json` that ships in the tarball, so the fallback stays pinned to the version the plugin itself shipped with — no second version source to sync. - `package.json#files` adds the manifest and the launcher to the published tarball. - `docs/installation.md` gains a "Claude Code plugin" section. Follow the [contribution scope](https://github.com/morluto/rea/blob/main/CONTRIBUTING.md#contribution-scope). This packages the existing MCP server and skill behind Claude Code's plugin installation; no new provider, engine, or target-interaction capability is introduced. The required maintainer scope decision is not applicable — nothing here touches target execution, injection, mutation, or protection recovery. ## Contract and boundary impact - Semantic owner and earliest changed stage: distribution/installation layer (`docs/installation.md`, plugin manifests); domain and application layers are untouched. - Contribution scope fit and linked maintainer decision: not applicable — existing capabilities gain an installation channel; no authority or scope change. - CLI and MCP/tool-catalog contract: unchanged. Same server and catalog; the launcher only chooses how `rea mcp` starts. - Provider, bridge, target-format, or platform compatibility: the launcher works on macOS/Linux/Windows (a shell is used only on win32 so `spawn` resolves `npx.cmd`). The npx fallback requires Node/npm on PATH; the local branch requires a completed build. - Evidence, artifact, provenance, or reconstruction contract: none. - Target selection, authority, upstream behavior, and cleanup details (if applicable): not applicable. - Generated metadata (`docs/public/product-catalog.json`), package, or installation impact: none regenerated; `skills/` and catalogs stay ignored. The two authored `.claude-plugin` JSON files are committed intentionally — they are source manifests, not build outputs. Expected effects (check known effects; use documentation-only on its own). Unchecked items do not establish absence; leave uncertainties visible. - [ ] Read existing files or captured data. - [ ] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [ ] Change process memory, registers, files, or configuration. - [ ] Contact network services. - [ ] Recover protected code or work around protections. - [x] Documentation or usability only; no target interaction. - [ ] Not sure yet; investigation or maintainer guidance needed. ## Evidence and regression coverage - Tests added or updated: none. The repository suite does not cover Claude Code's plugin loader; the change was validated with `claude plugin validate` and direct smoke tests listed below. - Base reproduction or other evidence: observed outputs under "Validation performed". - User-visible CLI/MCP output (if applicable): the launcher smoke test returns `serverInfo {"name":"rea","version":"6.7.0"}`. - Remaining proof gaps: the npx fallback was smoke-tested as the exact command it spawns (`npx -y rea-agents@6.7.0 mcp`), not through a full npm-sourced plugin install; the author additionally installed the plugin from this branch and used it without issues. The win32 `taskkill` path of the launcher is source-derived, not executed. For evidence-bearing changes: - [x] Observed, derived, and inferred claims remain distinguishable. - [x] Artifact identity, source provenance, and failed attempts remain preserved. - [x] Unsupported, incomplete, unavailable, or uncertain outcomes remain visible. ## Validation performed - `claude plugin validate .` — passed with one warning: `version: No version specified`. Intentional: the manifest omits `version` so the npm package's own version remains the single version source; adding it would require a per-release sync. - `npm pack --dry-run` — tarball includes `.claude-plugin/plugin.json`, `scripts/rea-mcp-launcher.mjs`, and `skills/reverse-engineer-anything/`; `marketplace.json` is correctly excluded (6.0 MB, 1775 files). - `npm run check:fast` — passed. - `npm run docs:check` — passed. - Launcher local branch — an MCP `initialize` request returned `serverInfo {"name":"rea","version":"6.7.0"}`. - npx fallback branch — `npx -y rea-agents@6.7.0 mcp` answered `initialize` identically. - Review fixes (c92b71d8e) — after rebuilding `dist`: local-branch `initialize` smoke passes; with `dist/mcp/main.js` absent the runtime check evaluates false and the launcher falls back to the published package; SIGTERM to the launcher stopped the spawned server on macOS arm64 with no leftover `rea.mjs mcp` processes. - Author verification — installed the plugin from this branch and exercised it successfully. ## Compatibility, safety, and release - Breaking changes or migration steps: none; purely additive. - Real Hopper/Ghidra, browser, or OS coverage: not applicable (no target interaction). Launcher verified on macOS arm64; the win32 `npx.cmd` handling is source-derived, not executed. - Package or release metadata impact: the published tarball gains two small files (~2 KB total) via `package.json#files`; no version or metadata regeneration. - Security, privacy, process, or containment review: the launcher spawns `node`/`npx` with `stdio: "inherit"` and no added environment; npm-sourced plugin installs never run install scripts (enforced by Claude Code), and the fallback pins an exact released version. ## Author readiness Human owner: @cainiao1992 - [ ] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [ ] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [ ] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:42:52 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#6764
No description provided.