Skip to content

feat(setup): let doctor, update and uninstall see MCPorter registrations - #10702

Merged
morluto merged 5 commits into
fix/mcp-add-client-path-overridesfrom
feat/fold-mcporter
Nov 15, 2026
Merged

morluto merged 5 commits into
fix/mcp-add-client-path-overridesfrom
feat/fold-mcporter

Conversation

@morluto

@morluto morluto commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

MCPorter becomes a row in the client table. Registrations that rea mcp add or rea setup --client mcporter wrote are now inspected by doctor, refreshed by update and removed by uninstall. As the maintainer decided, setup never selects MCPorter from detection: MCPorter already imports the registrations setup writes for Claude Code, Codex, Cursor and others.

Stacked on #10698, which is stacked on #10694. Refs #7181.

Problem and expected behavior

Before, MCPorter was a registration-only catalog entry, so doctor, update and uninstall never saw what mcp add wrote. Expected: REA can inspect, refresh and remove its own MCPorter row, without offering MCPorter to every user who has ~/.mcporter.

Change and scope

  • SupportedClients.ts:
    • New mcporter row. Its synchronous location follows MCPorter's rules: MCPORTER_CONFIG is exclusive; otherwise the first existing XDG or legacy candidate; a new file goes to the XDG path.
    • A relative MCPORTER_CONFIG becomes a configPathError, because MCPorter resolves it against each command's directory.
    • The stdio profile constants move here from the catalog.
  • New row flag registrationApplicability: only a registration REA wrote makes the client applicable.
    • detectClients skips such rows, so setup never selects or proposes them from detection.
    • Doctor uses only the registration file as evidence and does not report a missing row unless the client is selected.
  • Catalog: mcporter becomes tableClient("mcporter"). The async resolver from fix(mcp): register fx and MCPorter where they read their configuration #10698 is removed.
  • Docs: supported-agents table, a client-configuration section, and the skill's id list.
  • Not included: Goose, Junie, fx and Kilo (separate PRs).

Contract and boundary impact

  • Semantic owner and earliest changed stage: the client table row. The catalog copy is removed.

  • Contribution scope fit and linked maintainer decision: coordinator decision, "keep MCPorter out of setup's default selection, but registrations REA wrote must be visible to doctor/update/uninstall".

  • CLI and MCP/tool-catalog contract:

    • --client mcporter is accepted by setup and doctor.
    • mcp add --agent mcporter now refuses a relative MCPORTER_CONFIG.
    • mcp add's own default selection is unchanged.
  • Provider, bridge, target-format, or platform compatibility: none.

  • Evidence, artifact, provenance, or reconstruction contract: none.

  • Target selection, authority, upstream behavior, and cleanup details: writes only after approval (setup) or explicit selection (mcp add). Uninstall removes only REA-owned rows.

  • Generated metadata: the product catalog setup_clients gains mcporter. The cursor-plugin skill copy was regenerated.

  • 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:
    • mcpAddClientLifecycle.test.ts gains an MCPorter case: mcp add writes, doctor reports it owned, update selects it, setup can plan it, uninstall removes it. A new test checks that an existing ~/.mcporter file without rea is neither detected by setup nor reported by doctor, while an explicit selection reports missing.
    • McpRegistrationCatalog.test.ts adds the relative MCPORTER_CONFIG refusal. The existing location cases from fix(mcp): register fx and MCPorter where they read their configuration #10698 now run through the table row.
  • Remaining proof gaps: no installed MCPorter was run.

Validation performed

  • npm run test:focused -- tests/boundary/filesystem/mcpAddClientLifecycle.test.ts tests/boundary/filesystem/clientLifecycle.test.ts — 70 passed.
  • npm run test:focused -- tests/boundary/filesystem/clientRegistrationStatus.test.ts tests/process-global/updateMaintenance.test.ts tests/acceptance/setup/automaticClientSetup.test.ts tests/boundary/cli/cliSetup.test.ts tests/boundary/cli/mcpAddDiscovery.test.ts — 121 passed.
  • npm run test:local -- src/application/McpRegistrationCatalog.test.ts — 32 passed.
  • npm run test:local -- src/application/McpRegistrationCatalog.test.ts src/application/McpClientRegistration.test.ts src/application/McpClientRegistration.formats.test.ts src/application/SetupPlan.test.ts src/application/Setup.planning.test.ts src/application/Doctor.test.ts src/application/Uninstall.test.ts — 213 passed, 1 skipped.
  • npm run check:fast — passed.
  • npm run docs:check — passed.
  • Per-client fail-closed change (coordinator decision on the MCPorter thread): an unresolved client location is reported as unknown; update maintains the other clients and names the unknown one with its recovery; uninstall still stops. npm run test:focused -- tests/boundary/filesystem/clientRegistrationStatus.test.ts tests/process-global/updateMaintenance.test.ts src/application/Update.test.ts tests/boundary/filesystem/mcpAddClientLifecycle.test.ts tests/boundary/filesystem/claudeDesktopClientConfiguration.test.ts tests/boundary/filesystem/setupConfig.test.ts — all passed; tsc --noEmit; oxlint/oxfmt on changed files. The new regressions were not run against the code before the fix; two existing Windows Claude Desktop assertions changed from invalid to unknown.
  • Review fix 9c8d3d7 (failed maintenance plans keep unknown clients): npm run test:focused -- tests/process-global/updateMaintenance.test.ts src/application/Update.test.ts tests/boundary/filesystem/setupClientConfigCleanupOwnership.test.ts passed; the new case failed with the UpdateMaintenance.ts change reverted. Pre-push npm run check:fast passed.

Compatibility, safety, and release

  • Breaking changes or migration steps: none. A relative MCPORTER_CONFIG now fails registration instead of writing a cwd-relative file.
  • Real Hopper/Ghidra, browser, or OS coverage: macOS filesystem tests.
  • Package or release metadata impact: the docs say mcporter requires a release after 6.9.0.
  • Security, privacy, process, or containment review: no new write locations.

Author readiness

Human owner:

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T06:29:38.042002Z 9c8d3d7 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 308bfb8ddd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/application/SupportedClients.ts Resolved
@greptile-apps

greptile-apps Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: plus

[Medium impact] The PR appears safe to merge; no new blocking issue remains.

Summary

MCPorter now uses the shared client table, so doctor, update, and uninstall can inspect registrations REA wrote.

  • REA now inspects and maintains MCPorter registrations.
  • Update maintains known clients when another location is unknown.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Shared MCPorter client row] --> B{Location resolved?}
  B -->|No| C[Doctor reports unknown]
  C --> D[Update skips this client and keeps recovery]
  C --> E[Uninstall stops]
  B -->|Yes| F{REA registration present?}
  F -->|No| G[Doctor omits row unless selected]
  F -->|Yes| H[Inspect registration and ownership]
  H --> I[Update selects enabled owned registrations]
  H --> J[Uninstall removes only owned registrations]
  A --> K[Setup detection excludes MCPorter]
Loading

Reviews (3) · Last reviewed commit: "fix(update): keep unknown clients in eve..." · Reviewed by Greptile

Comment thread src/application/SupportedClients.ts Resolved
Comment thread src/application/SupportedClients.ts Resolved
@morluto

morluto commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

Greptile findings on 308bfb8: (1) Unselected MCPorter blocks maintenance - resolved by the coordinator's per-client fail-closed decision (e52c10d, see the reply on the review thread): an unresolved location is reported as unknown and update maintains every other client. (2) Legacy MCPorter gets skipped - already fixed by "fix(setup): detect MCPorter by the folder of the file it loads": mcporterLocation returns the folder of whichever candidate file exists (XDG or ~/.mcporter) as markerPath, so plain rea mcp add detects a legacy-only file. Covered by the McpRegistrationCatalog MCPorter cases and mcpAddClientLifecycle.

@morluto
morluto force-pushed the fix/mcp-add-client-path-overrides branch from a646960 to 78e6fc8 Compare November 15, 2026 05:53
@morluto

morluto commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

@greptileai review — the findings on 308bfb8 are addressed on the current head (see the comment above); please re-review 9bf3550.

Comment thread src/application/UpdateMaintenance.ts Resolved
MCPorter becomes a client-table row, so a registration rea mcp add or
rea setup --client mcporter wrote is inspected, refreshed and removed like
other clients. MCPorter already imports setup-managed clients'
registrations, so the row is applicable only through REA's own
registration: setup never selects it from detection and doctor reports
it only when its file holds a rea row or the caller selects it. A
relative MCPORTER_CONFIG is refused because MCPorter resolves it per
command directory.
With an absolute XDG_CONFIG_HOME and only a legacy ~/.mcporter file, the row returned the legacy file but the absent XDG folder as its detection evidence, so default registration and setup skipped MCPorter.
…' maintenance

A client whose configuration location cannot be resolved (for example a relative MCPORTER_CONFIG) is reported as unknown, never missing or absent. Update maintenance leaves each unresolved client out of its scope and names it with its own recovery, while still maintaining the other clients; uninstall still stops, because it cannot tell whether that client's file holds REA's row.
@morluto
morluto force-pushed the fix/mcp-add-client-path-overrides branch from 78e6fc8 to 40b1c5c Compare November 15, 2026 06:27
@morluto

morluto commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

Greptile finding on 9bf3550 (Failed plans hide skipped clients) is valid and fixed in 9c8d3d7. Root cause: planIntegrationMaintenance computed the scope (including unresolved clients) but three later failure returns (setup dry run failed, invalid plan, out-of-scope plan) and the catch dropped it. Every failure now goes through one unavailableMaintenance(remediation, scope) owner, which keeps scope and appends the unknown clients' own recovery to the remediation, so runUpdate's existing suppression of the separate notice for unavailable no longer hides them. Regression: "names an unknown MCPorter client when planning the known clients fails" in tests/process-global/updateMaintenance.test.ts (fails without the source change; 40/40 with it).

@greptileai review

@morluto
morluto merged commit 015b60d into fix/mcp-add-client-path-overrides Nov 15, 2026
1 check passed
@morluto
morluto deleted the feat/fold-mcporter branch November 15, 2026 06:38
morluto added a commit that referenced this pull request Nov 15, 2026
…ons (#10702)

* feat(setup): let doctor, update and uninstall see MCPorter registrations

MCPorter becomes a client-table row, so a registration rea mcp add or
rea setup --client mcporter wrote is inspected, refreshed and removed like
other clients. MCPorter already imports setup-managed clients'
registrations, so the row is applicable only through REA's own
registration: setup never selects it from detection and doctor reports
it only when its file holds a rea row or the caller selects it. A
relative MCPORTER_CONFIG is refused because MCPorter resolves it per
command directory.

* fix(setup): detect MCPorter by the folder of the file it loads

With an absolute XDG_CONFIG_HOME and only a legacy ~/.mcporter file, the row returned the legacy file but the absent XDG folder as its detection evidence, so default registration and setup skipped MCPorter.

* fix(setup): keep an unresolved client unknown without blocking others' maintenance

A client whose configuration location cannot be resolved (for example a relative MCPORTER_CONFIG) is reported as unknown, never missing or absent. Update maintenance leaves each unresolved client out of its scope and names it with its own recovery, while still maintaining the other clients; uninstall still stops, because it cannot tell whether that client's file holds REA's row.

* docs(setup): restore MCPorter's release note and client-table row after rebase

* fix(update): keep unknown clients in every failed maintenance plan
morluto added a commit that referenced this pull request Nov 15, 2026
…ons (#10702)

* feat(setup): let doctor, update and uninstall see MCPorter registrations

MCPorter becomes a client-table row, so a registration rea mcp add or
rea setup --client mcporter wrote is inspected, refreshed and removed like
other clients. MCPorter already imports setup-managed clients'
registrations, so the row is applicable only through REA's own
registration: setup never selects it from detection and doctor reports
it only when its file holds a rea row or the caller selects it. A
relative MCPORTER_CONFIG is refused because MCPorter resolves it per
command directory.

* fix(setup): detect MCPorter by the folder of the file it loads

With an absolute XDG_CONFIG_HOME and only a legacy ~/.mcporter file, the row returned the legacy file but the absent XDG folder as its detection evidence, so default registration and setup skipped MCPorter.

* fix(setup): keep an unresolved client unknown without blocking others' maintenance

A client whose configuration location cannot be resolved (for example a relative MCPORTER_CONFIG) is reported as unknown, never missing or absent. Update maintenance leaves each unresolved client out of its scope and names it with its own recovery, while still maintaining the other clients; uninstall still stops, because it cannot tell whether that client's file holds REA's row.

* docs(setup): restore MCPorter's release note and client-table row after rebase

* fix(update): keep unknown clients in every failed maintenance plan
morluto added a commit that referenced this pull request Nov 15, 2026
#10698)

* fix(mcp): register fx and MCPorter where they read their configuration

fx reads $FX_HOME/mcp.json when FX_HOME is set, and MCPorter reads
MCPORTER_CONFIG exclusively or prefers an absolute XDG_CONFIG_HOME file.
rea mcp add always wrote ~/.fx/mcp.json and ~/.mcporter/mcporter.json,
which those clients then ignored. Resolve both from the clients' own
rules, and refuse an FX_HOME fx itself refuses.

* fix(mcp): detect MCPorter by its selected file and refuse FX_HOME aliases

Address review findings: MCPORTER_CONFIG now also names the detection
marker, so default registration includes MCPorter when only that file
exists, and is resolved with path.resolve as MCPorter does. FX_HOME with
. or .. segments is refused, so the private profile mode cannot reach
the home folder through an alias. Override tests use the host's path
rules for real temporary paths.

* fix(mcp): never apply fx's private folder mode to the home folder

A linked parent in FX_HOME can name the caller's home folder after the textual root and home checks pass. The private profile writer now compares the opened folder's identity with the caller's home folder and refuses before changing modes or publishing.

* feat(setup): let doctor, update and uninstall see MCPorter registrations (#10702)

* feat(setup): let doctor, update and uninstall see MCPorter registrations

MCPorter becomes a client-table row, so a registration rea mcp add or
rea setup --client mcporter wrote is inspected, refreshed and removed like
other clients. MCPorter already imports setup-managed clients'
registrations, so the row is applicable only through REA's own
registration: setup never selects it from detection and doctor reports
it only when its file holds a rea row or the caller selects it. A
relative MCPORTER_CONFIG is refused because MCPorter resolves it per
command directory.

* fix(setup): detect MCPorter by the folder of the file it loads

With an absolute XDG_CONFIG_HOME and only a legacy ~/.mcporter file, the row returned the legacy file but the absent XDG folder as its detection evidence, so default registration and setup skipped MCPorter.

* fix(setup): keep an unresolved client unknown without blocking others' maintenance

A client whose configuration location cannot be resolved (for example a relative MCPORTER_CONFIG) is reported as unknown, never missing or absent. Update maintenance leaves each unresolved client out of its scope and names it with its own recovery, while still maintaining the other clients; uninstall still stops, because it cannot tell whether that client's file holds REA's row.

* docs(setup): restore MCPorter's release note and client-table row after rebase

* fix(update): keep unknown clients in every failed maintenance plan
@morluto morluto added area: setup Setup, packaging, upgrade, install, Doctor, and client registration enhancement New feature or request labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: setup Setup, packaging, upgrade, install, Doctor, and client registration enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant