[PR #3486] fix(setup): default Claude Desktop to compact MCP schemas #5774

Open
opened 2026-10-31 01:09:19 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3486
Author: @YongxinFu
Created: 10/14/2026
Status: 🔄 Open

Base: main ← Head: fix/3408-claude-desktop-input-schemas


📝 Commits (8)

  • 3e76bca fix(setup): use compact input schemas for Claude Desktop
  • 2ae0d2e fix(setup): disclose compact schema override
  • 5d1c56e docs: clarify Claude Desktop verification status
  • 51917b6 docs: record Claude Desktop schema verification
  • 5e745d4 Merge remote-tracking branch 'origin/main' into sweep/3486
  • 59e0157 fix(setup): preserve explicit Claude Desktop schema profiles
  • 042ec16 chore(merge): sync main and resolve MCP schema test conflict
  • e3cb2be Merge remote-tracking branch 'origin/main' into fix/3408-claude-desktop-input-schemas

📊 Changes

6 files changed (+137 additions, -5 deletions)

View changed files

📝 docs/client-configuration.md (+16 -0)
📝 src/application/Setup.configuration.test.ts (+3 -0)
📝 src/application/SetupClientConfiguration.ts (+3 -1)
📝 src/application/SetupPlan.ts (+5 -1)
📝 tests/boundary/filesystem/claudeDesktopClientConfiguration.test.ts (+97 -3)
📝 tests/boundary/mcp/compactInputSchemaMcp.test.ts (+13 -0)

📄 Description

Summary

Fixes #3408.

  • Default Claude Desktop to compact MCP input schemas only when no profile has been selected.
  • Preserve stored and explicitly supplied full or compact profiles; explicit setup values retain precedence over stored values.
  • Share the conditional default with Kimi, and align setup preview, documentation, and configuration lifecycle tests.

Problem and expected behavior

Issue #3408 reports that Windows Claude Desktop rejects array/object tool parameters with shared-reference schemas. The owner-reported native Desktop repeat on 2026-10-16 accepted the structured browser parameter calls. Setup now selects that compatible default when no profile is configured. A stored or caller-selected full profile remains full, including during registration refresh.

Change and scope

clientRegistrationEnvironment owns validation and merges stored values with explicit setup values. clientConfigurationDesired adds REA_MCP_INPUT_SCHEMA_PROFILE=compact for Claude Desktop or Kimi only when the validated value is undefined. No schema representation, canonical validation, or provider capability changes. The merge from main preserves its reorganized MCP tests and our browser parameter assertions. It also includes a formatter-only change to an upstream AdbProvider expression so the repository format gate passes.

Contract and boundary impact

  • Semantic owner and earliest changed stage: client registration environment assembly in SetupClientConfiguration.
  • Contribution scope fit and linked maintainer decision: existing integration fix; preserves caller choices as requested in the maintainer review.
  • CLI and MCP/tool-catalog contract: Claude Desktop defaults to compact advertisements when unset; explicit profiles and canonical server validation are preserved.
  • Provider, bridge, target-format, or platform compatibility: Claude Desktop registration; Kimi retains its existing conditional default. Other clients are unaffected.
  • Evidence, artifact, provenance, or reconstruction contract: unchanged.
  • Target selection, authority, upstream behavior, and cleanup details: the owner-reported 2026-10-16 browser verification inspected an explicitly allowlisted example.com page through loopback CDP; policy filtering and the attach-time observation boundary were preserved.
  • Generated metadata, package, or installation impact: no generated metadata or package files changed.

Expected effects:

  • 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. (The manual browser check loaded example.com; the setup change itself only writes the local client configuration.)
  • 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

  • Six Desktop configuration scenarios cover an omitted profile, stored full/compact choices, and explicit setup overrides in both directions. Each verifies unrelated environment/server preservation, backups, and repeat-run idempotency.
  • Compact MCP tests validate advertised schemas, structured parameter types, and rejection of canonical-invalid arguments.
  • Owner-reported native repeat (2026-10-16): list_browser_targets returned one allowed example.com page target; inspect_web_page accepted the same array-valued allowed_origins and returned Example Domain.
  • Remaining proof gaps: full CI and package functional verification. The native browser workflow was successfully repeated; other native client/provider workflows remain outside this verification.

Validation performed

  • Windows x64 with pinned Node 24.18.0 and npm 11.16.0.
  • npm run check — passed (typecheck, format, lint, knip, metadata, module boundaries, architecture guards).
  • npm run test:focused -- src/application/Setup.configuration.test.ts src/application/Setup.planning.test.ts tests/boundary/filesystem/claudeDesktopClientConfiguration.test.ts tests/boundary/filesystem/kimiClientConfiguration.test.ts tests/boundary/filesystem/clientConfigurationEnvironment.test.ts tests/boundary/filesystem/clientConfigurationLayeredEnvironment.test.ts tests/boundary/mcp/compactInputSchemaMcp.test.ts — 124 passed, 10 failed. All six Desktop profile cases and all eleven compact MCP tests passed. The same ten failures were reproduced with production files restored to pre-fix 5e745d4dc: nine existing Windows path/launcher expectations and one temporary-symlink EPERM.
  • npm pack --dry-run --json --silent — passed, 1713 packaged entries.
  • npm run verify:package — after syncing main, repository skill verification passed; package archive checking stopped because python3 resolves to an unavailable Microsoft Store alias (exit 9009). Package functional verification did not complete.
  • npm run verify:package:windows — the last attempt stopped at its prerequisite check: this checkout lacks the built native/windows/build/manifest.json.
  • Native Claude Desktop on Windows (owner-reported repeat, 2026-10-16), Chrome 155.0.8059.41 / CDP 1.3 — both browser calls succeeded after starting the loopback debug browser. Endpoint: http://127.0.0.1:9222; both calls used allowed_origins: ["https://example.com"]. list_browser_targets returned target 762A812D03AB96A5A592A00CED8F1912 at https://example.com/ (two non-page targets excluded). inspect_web_page returned title Example Domain, 35 DOM nodes and 38 accessibility nodes, with an observation window of 2026-10-16T00:26:28.495Z to 00:26:29.026Z. Policy-filtered details remained omitted (not_approved / disallowed_origin), and activity before attach was outside the observation. This evidence was supplied by the human owner; it was not independently reproduced by this editing agent.
  • Pre-commit formatting/lint and pre-push check:fast — passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none. Rerun rea setup --client claude_desktop to add the default when unset. Existing explicit full profiles require an intentional edit to compact and a client restart.
  • Real client/OS coverage: owner-reported native Desktop browser workflow successfully repeated on Windows on 2026-10-16, alongside current configuration lifecycle and canonical MCP tests. This covers the two structured browser calls; other providers and native full-profile acceptance were not verified.
  • Package or release metadata impact: none; package functional checks remain limited by the host prerequisites above.
  • Security, privacy, process, or containment review: preserves explicit caller choices and unrelated configuration; no new target interaction capability.

Author readiness

Human owner: @YongxinFu

  • 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.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • 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/3486 **Author:** [@YongxinFu](https://github.com/YongxinFu) **Created:** 10/14/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/3408-claude-desktop-input-schemas` --- ### 📝 Commits (8) - [`3e76bca`](https://github.com/morluto/rea/commit/3e76bca9b50dd4ea162370f4d4b8323f6cfae85c) fix(setup): use compact input schemas for Claude Desktop - [`2ae0d2e`](https://github.com/morluto/rea/commit/2ae0d2edbf3652c86a3614cadf9cae3c52a40ffc) fix(setup): disclose compact schema override - [`5d1c56e`](https://github.com/morluto/rea/commit/5d1c56e094fd1ee7c9b24120705b4739e411b996) docs: clarify Claude Desktop verification status - [`51917b6`](https://github.com/morluto/rea/commit/51917b6fb4fa68e1d88d7be12816d4dfc2686340) docs: record Claude Desktop schema verification - [`5e745d4`](https://github.com/morluto/rea/commit/5e745d4dcea77679c33a6593d1520eba99386c0b) Merge remote-tracking branch 'origin/main' into sweep/3486 - [`59e0157`](https://github.com/morluto/rea/commit/59e015761f9721ca098a82628f05fa4771183e16) fix(setup): preserve explicit Claude Desktop schema profiles - [`042ec16`](https://github.com/morluto/rea/commit/042ec16ae170a248f623bc12c437ea7cdfb8f978) chore(merge): sync main and resolve MCP schema test conflict - [`e3cb2be`](https://github.com/morluto/rea/commit/e3cb2bed6f336a78ad79254fd63f716503202cd7) Merge remote-tracking branch 'origin/main' into fix/3408-claude-desktop-input-schemas ### 📊 Changes **6 files changed** (+137 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `docs/client-configuration.md` (+16 -0) 📝 `src/application/Setup.configuration.test.ts` (+3 -0) 📝 `src/application/SetupClientConfiguration.ts` (+3 -1) 📝 `src/application/SetupPlan.ts` (+5 -1) 📝 `tests/boundary/filesystem/claudeDesktopClientConfiguration.test.ts` (+97 -3) 📝 `tests/boundary/mcp/compactInputSchemaMcp.test.ts` (+13 -0) </details> ### 📄 Description ## Summary Fixes #3408. - Default Claude Desktop to compact MCP input schemas only when no profile has been selected. - Preserve stored and explicitly supplied `full` or `compact` profiles; explicit setup values retain precedence over stored values. - Share the conditional default with Kimi, and align setup preview, documentation, and configuration lifecycle tests. ## Problem and expected behavior Issue #3408 reports that Windows Claude Desktop rejects array/object tool parameters with shared-reference schemas. The owner-reported native Desktop repeat on 2026-10-16 accepted the structured browser parameter calls. Setup now selects that compatible default when no profile is configured. A stored or caller-selected `full` profile remains `full`, including during registration refresh. ## Change and scope `clientRegistrationEnvironment` owns validation and merges stored values with explicit setup values. `clientConfigurationDesired` adds `REA_MCP_INPUT_SCHEMA_PROFILE=compact` for Claude Desktop or Kimi only when the validated value is `undefined`. No schema representation, canonical validation, or provider capability changes. The merge from main preserves its reorganized MCP tests and our browser parameter assertions. It also includes a formatter-only change to an upstream `AdbProvider` expression so the repository format gate passes. ## Contract and boundary impact - Semantic owner and earliest changed stage: client registration environment assembly in `SetupClientConfiguration`. - Contribution scope fit and linked maintainer decision: existing integration fix; preserves caller choices as requested in the maintainer review. - CLI and MCP/tool-catalog contract: Claude Desktop defaults to compact advertisements when unset; explicit profiles and canonical server validation are preserved. - Provider, bridge, target-format, or platform compatibility: Claude Desktop registration; Kimi retains its existing conditional default. Other clients are unaffected. - Evidence, artifact, provenance, or reconstruction contract: unchanged. - Target selection, authority, upstream behavior, and cleanup details: the owner-reported 2026-10-16 browser verification inspected an explicitly allowlisted example.com page through loopback CDP; policy filtering and the attach-time observation boundary were preserved. - Generated metadata, package, or installation impact: no generated metadata or package files changed. Expected effects: - [x] Read existing files or captured data. - [x] Launch or attach to a process. - [ ] Inject instrumentation or run scripts/code. - [x] Change process memory, registers, files, or configuration. - [x] Contact network services. (The manual browser check loaded example.com; the setup change itself only writes the local client configuration.) - [ ] 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 - Six Desktop configuration scenarios cover an omitted profile, stored full/compact choices, and explicit setup overrides in both directions. Each verifies unrelated environment/server preservation, backups, and repeat-run idempotency. - Compact MCP tests validate advertised schemas, structured parameter types, and rejection of canonical-invalid arguments. - Owner-reported native repeat (2026-10-16): `list_browser_targets` returned one allowed example.com page target; `inspect_web_page` accepted the same array-valued `allowed_origins` and returned `Example Domain`. - Remaining proof gaps: full CI and package functional verification. The native browser workflow was successfully repeated; other native client/provider workflows remain outside this verification. ## Validation performed - Windows x64 with pinned Node 24.18.0 and npm 11.16.0. - `npm run check` — passed (typecheck, format, lint, knip, metadata, module boundaries, architecture guards). - `npm run test:focused -- src/application/Setup.configuration.test.ts src/application/Setup.planning.test.ts tests/boundary/filesystem/claudeDesktopClientConfiguration.test.ts tests/boundary/filesystem/kimiClientConfiguration.test.ts tests/boundary/filesystem/clientConfigurationEnvironment.test.ts tests/boundary/filesystem/clientConfigurationLayeredEnvironment.test.ts tests/boundary/mcp/compactInputSchemaMcp.test.ts` — 124 passed, 10 failed. All six Desktop profile cases and all eleven compact MCP tests passed. The same ten failures were reproduced with production files restored to pre-fix `5e745d4dc`: nine existing Windows path/launcher expectations and one temporary-symlink `EPERM`. - `npm pack --dry-run --json --silent` — passed, 1713 packaged entries. - `npm run verify:package` — after syncing main, repository skill verification passed; package archive checking stopped because `python3` resolves to an unavailable Microsoft Store alias (exit 9009). Package functional verification did not complete. - `npm run verify:package:windows` — the last attempt stopped at its prerequisite check: this checkout lacks the built `native/windows/build/manifest.json`. - Native Claude Desktop on Windows (owner-reported repeat, 2026-10-16), Chrome 155.0.8059.41 / CDP 1.3 — both browser calls succeeded after starting the loopback debug browser. Endpoint: `http://127.0.0.1:9222`; both calls used `allowed_origins: ["https://example.com"]`. `list_browser_targets` returned target `762A812D03AB96A5A592A00CED8F1912` at `https://example.com/` (two non-page targets excluded). `inspect_web_page` returned title `Example Domain`, 35 DOM nodes and 38 accessibility nodes, with an observation window of 2026-10-16T00:26:28.495Z to 00:26:29.026Z. Policy-filtered details remained omitted (`not_approved` / `disallowed_origin`), and activity before attach was outside the observation. This evidence was supplied by the human owner; it was not independently reproduced by this editing agent. - Pre-commit formatting/lint and pre-push `check:fast` — passed. ## Compatibility, safety, and release - Breaking changes or migration steps: none. Rerun `rea setup --client claude_desktop` to add the default when unset. Existing explicit full profiles require an intentional edit to compact and a client restart. - Real client/OS coverage: owner-reported native Desktop browser workflow successfully repeated on Windows on 2026-10-16, alongside current configuration lifecycle and canonical MCP tests. This covers the two structured browser calls; other providers and native full-profile acceptance were not verified. - Package or release metadata impact: none; package functional checks remain limited by the host prerequisites above. - Security, privacy, process, or containment review: preserves explicit caller choices and unrelated configuration; no new target interaction capability. ## Author readiness Human owner: @YongxinFu - [x] 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. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. ## Before merge - [ ] This PR addresses a concrete problem or an agreed enhancement. - [ ] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [ ] 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#5774
No description provided.