[PR #645] [MERGED] feat(setup): support Command Code MCP registration #2135

Closed
opened 2026-10-16 21:14:45 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/645
Author: @troke12
Created: 10/6/2026
Status: ✅ Merged
Merged: 10/6/2026
Merged by: @morluto

Base: main ← Head: feat/setup-command-code


📝 Commits (2)

  • 6b9d474 feat(setup): support Command Code MCP registration
  • 39023e0 fix(setup): reject non-stdio Command Code transport as invalid

📊 Changes

14 files changed (+115 additions, -13 deletions)

View changed files

📝 README.md (+1 -1)
📝 README_ar.md (+2 -2)
📝 README_ja.md (+2 -2)
📝 README_ko.md (+2 -2)
📝 README_zh.md (+2 -2)
📝 docs/installation.md (+1 -0)
📝 docs/product-catalog.json (+6 -0)
📝 docs/roadmap.md (+1 -1)
📝 src/application/ClientConfigurationDocument.ts (+8 -0)
📝 src/application/ClientRegistrationStatus.ts (+5 -0)
📝 src/application/SupportedClients.ts (+12 -0)
📝 tests/boundary/filesystem/clientConfigurationDialects.test.ts (+16 -3)
📝 tests/boundary/filesystem/clientLifecycle.test.ts (+1 -0)
📝 tests/boundary/filesystem/clientRegistrationStatus.test.ts (+56 -0)

📄 Description

Summary

REA setup cannot configure Command Code today, so users of that agent must hand-edit their MCP config. This adds Command Code (commandcode) as a supported setup client so rea setup registers REA's local MCP server for it.

Problem and expected behavior

Expected: rea setup (interactive, or --client commandcode) writes REA's stdio MCP registration into Command Code's user-scope config at ~/.commandcode/mcp.json, preserves unrelated settings, backs up, and reports the client as configured/aligned. Before this change no such client existed.

Change and scope

  • Add the commandcode client definition targeting ~/.commandcode/mcp.json (marker ~/.commandcode).
  • Add a commandcode config dialect that writes { "transport": "stdio", "enabled": true, "command", "args", "env"? } under the mcpServers key — the exact shape Command Code writes itself.
  • Accept transport in registration inspection and require transport: "stdio" for alignment.
  • Update the READMEs (all locales), the installation client table, the roadmap, and regenerate the product catalog.

Intentionally not included: Command Code project-scope (.mcp.json) or local-scope configs. Only the user-scope file is managed.

Contract and boundary impact

  • Semantic owner and earliest changed stage: src/application/SupportedClients.ts (client inventory) and src/application/ClientConfigurationDocument.ts (registration entry dialect).
  • CLI and MCP/tool-catalog contract: none; no tool inputs/outputs change.
  • Provider, bridge, target-format, or platform compatibility: none; setup-only change.
  • Evidence, artifact, provenance, or reconstruction contract: none.
  • Process execution, authorization, cleanup, or containment impact: none; reuses the existing atomic write + backup path.
  • Generated metadata (docs/product-catalog.json), package, or installation impact: setup_clients gains commandcode via regeneration.

Evidence and regression coverage

  • Tests added or updated: tests/boundary/filesystem/clientConfigurationDialects.test.ts (register/read-back/uninstall for commandcode), tests/boundary/filesystem/clientLifecycle.test.ts (detection order).
  • Base reproduction or other evidence: verified the integration end-to-end against a real Command Code CLI v1.74.3.
  • User-visible CLI/MCP output (if applicable): rea setup --yes --client commandcode --json returns status: "ready" with appliedActions: ["configured_commandcode"]; cmd mcp list then reports rea stdio user enabled.
  • Remaining proof gaps: none for setup; Command Code interactive UI was not exercised beyond a headless tool call.

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

  • npm run build:cached — passed.
  • npm run check:fast (typecheck + lint) — passed.
  • npm run knip — passed.
  • npm run docs:check — passed.
  • npx vitest run tests/boundary/filesystem/clientConfigurationDialects.test.ts tests/boundary/filesystem/clientLifecycle.test.ts tests/boundary/cli/productCatalog.test.ts tests/conformance/readmeConsistency.test.ts — 47 passed.
  • Manual: cmd mcp add --scope user rea -- npx -y rea-agents@latest mcp, then a headless run invoked mcp__rea__binary_session and returned real REA output (provider.id = composite:ghidra+hopper+native-macos+rea-artifact-graph+rea-dotnet-static).

Compatibility, safety, and release

  • Breaking changes or migration steps: none.
  • Real Hopper/Ghidra, browser, or OS coverage: not applicable; no provider behavior changed.
  • Package or release metadata impact: expected feat bump via Release Please.
  • Security, privacy, process, or containment review: reuses the existing backup/atomic-write path and writes only the REA mcpServers.rea entry.

Review checklist

  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 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/645 **Author:** [@troke12](https://github.com/troke12) **Created:** 10/6/2026 **Status:** ✅ Merged **Merged:** 10/6/2026 **Merged by:** [@morluto](https://github.com/morluto) **Base:** `main` ← **Head:** `feat/setup-command-code` --- ### 📝 Commits (2) - [`6b9d474`](https://github.com/morluto/rea/commit/6b9d474787f9355c147af261586ecff3cf9fa7fd) feat(setup): support Command Code MCP registration - [`39023e0`](https://github.com/morluto/rea/commit/39023e07f24335d5baa0266f160cbb7baad8982a) fix(setup): reject non-stdio Command Code transport as invalid ### 📊 Changes **14 files changed** (+115 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -1) 📝 `README_ar.md` (+2 -2) 📝 `README_ja.md` (+2 -2) 📝 `README_ko.md` (+2 -2) 📝 `README_zh.md` (+2 -2) 📝 `docs/installation.md` (+1 -0) 📝 `docs/product-catalog.json` (+6 -0) 📝 `docs/roadmap.md` (+1 -1) 📝 `src/application/ClientConfigurationDocument.ts` (+8 -0) 📝 `src/application/ClientRegistrationStatus.ts` (+5 -0) 📝 `src/application/SupportedClients.ts` (+12 -0) 📝 `tests/boundary/filesystem/clientConfigurationDialects.test.ts` (+16 -3) 📝 `tests/boundary/filesystem/clientLifecycle.test.ts` (+1 -0) 📝 `tests/boundary/filesystem/clientRegistrationStatus.test.ts` (+56 -0) </details> ### 📄 Description ## Summary REA setup cannot configure Command Code today, so users of that agent must hand-edit their MCP config. This adds Command Code (`commandcode`) as a supported setup client so `rea setup` registers REA's local MCP server for it. ## Problem and expected behavior Expected: `rea setup` (interactive, or `--client commandcode`) writes REA's stdio MCP registration into Command Code's user-scope config at `~/.commandcode/mcp.json`, preserves unrelated settings, backs up, and reports the client as configured/aligned. Before this change no such client existed. ## Change and scope - Add the `commandcode` client definition targeting `~/.commandcode/mcp.json` (marker `~/.commandcode`). - Add a `commandcode` config dialect that writes `{ "transport": "stdio", "enabled": true, "command", "args", "env"? }` under the `mcpServers` key — the exact shape Command Code writes itself. - Accept `transport` in registration inspection and require `transport: "stdio"` for alignment. - Update the READMEs (all locales), the installation client table, the roadmap, and regenerate the product catalog. Intentionally not included: Command Code project-scope (`.mcp.json`) or local-scope configs. Only the user-scope file is managed. ## Contract and boundary impact - Semantic owner and earliest changed stage: `src/application/SupportedClients.ts` (client inventory) and `src/application/ClientConfigurationDocument.ts` (registration entry dialect). - CLI and MCP/tool-catalog contract: none; no tool inputs/outputs change. - Provider, bridge, target-format, or platform compatibility: none; setup-only change. - Evidence, artifact, provenance, or reconstruction contract: none. - Process execution, authorization, cleanup, or containment impact: none; reuses the existing atomic write + backup path. - Generated metadata (`docs/product-catalog.json`), package, or installation impact: `setup_clients` gains `commandcode` via regeneration. ## Evidence and regression coverage - Tests added or updated: `tests/boundary/filesystem/clientConfigurationDialects.test.ts` (register/read-back/uninstall for `commandcode`), `tests/boundary/filesystem/clientLifecycle.test.ts` (detection order). - Base reproduction or other evidence: verified the integration end-to-end against a real Command Code CLI v1.74.3. - User-visible CLI/MCP output (if applicable): `rea setup --yes --client commandcode --json` returns `status: "ready"` with `appliedActions: ["configured_commandcode"]`; `cmd mcp list` then reports `rea stdio user enabled`. - Remaining proof gaps: none for setup; Command Code interactive UI was not exercised beyond a headless tool call. 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 - `npm run build:cached` — passed. - `npm run check:fast` (typecheck + lint) — passed. - `npm run knip` — passed. - `npm run docs:check` — passed. - `npx vitest run tests/boundary/filesystem/clientConfigurationDialects.test.ts tests/boundary/filesystem/clientLifecycle.test.ts tests/boundary/cli/productCatalog.test.ts tests/conformance/readmeConsistency.test.ts` — 47 passed. - Manual: `cmd mcp add --scope user rea -- npx -y rea-agents@latest mcp`, then a headless run invoked `mcp__rea__binary_session` and returned real REA output (`provider.id = composite:ghidra+hopper+native-macos+rea-artifact-graph+rea-dotnet-static`). ## Compatibility, safety, and release - Breaking changes or migration steps: none. - Real Hopper/Ghidra, browser, or OS coverage: not applicable; no provider behavior changed. - Package or release metadata impact: expected `feat` bump via Release Please. - Security, privacy, process, or containment review: reuses the existing backup/atomic-write path and writes only the REA `mcpServers.rea` entry. ## Review checklist - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [ ] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:14:45 +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#2135
No description provided.