Skip to content

organize managed and local connections - #76

Merged
morgmart merged 5 commits into
mainfrom
mcp-inventory-clean
Aug 18, 2026
Merged

organize managed and local connections#76
morgmart merged 5 commits into
mainfrom
mcp-inventory-clean

Conversation

@morgmart

Copy link
Copy Markdown
Collaborator

Category: improvement
User Impact: Connections now shows company-managed services separately from MCPs configured for Goose, Claude Code, and Codex on this device.

Problem: Connections previously mixed company services and Goose extensions into Installed and Available sections, while ignoring MCP configuration owned by Claude Code and Codex. That structure also made local configuration look more like an installer or health surface than a passive inventory.

Solution: Organize the page into Company managed and Local sections under one shared search. Preserve the existing managed catalog and actions, add read-only cross-harness discovery for local MCP configuration, and direct setup through an editable agent-chat draft rather than a technical form.

Product and trust boundaries

  • Configured is not health: Local rows report configuration presence only. The page does not launch MCP processes, contact vendors, check authentication, or claim that a server is active in the current chat.
  • Credential minimization: The inventory response excludes config paths, commands, arguments, URLs, headers, environment values, and OAuth material. Cross-harness grouping uses only an opaque, secret-safe structural fingerprint.
  • Managed loading is unchanged: Existing company-managed loading and connection semantics are intentionally out of scope; this PR reorganizes their presentation without redefining their backend lifecycle.
  • Project-scoped inventory: Local inventory includes user-level MCPs plus project-scoped MCPs for the active Berd project. This read-only path trusts project roots supplied by Berd's renderer; backend project-root authorization should be reconsidered if this surface ever gains configuration writes.
  • Visual review: Before/after screenshots should be attached before human review; this PR was created without uploaded screenshots.
File changes

src-tauri/Cargo.lock
Records the TOML parser dependency used for passive Codex configuration discovery.

src-tauri/Cargo.toml
Adds TOML parsing support for Codex MCP configuration.

src-tauri/src/commands/local_mcp_inventory.rs
Adds bounded, read-only discovery adapters for Goose, Claude Code, and Codex. Returns only redacted structural metadata, isolates source failures, recognizes active-project scopes, and generates opaque identity fingerprints without exposing targets or secrets.

src-tauri/src/commands/mod.rs
Registers the local MCP inventory command module.

src-tauri/src/lib.rs
Exposes the inventory command through Tauri's command handler.

src/app/AppShell.navigation.test.tsx
Protects the Add connection handoff: it preserves the selected harness and creates an editable unsent draft.

src/app/AppShell.tsx
Adds the neutral connection-setup chat handoff without coupling it to provider troubleshooting.

src/app/ui/AppShellContent.tsx
Threads the neutral setup-chat callback into Settings.

src/features/chat/lib/setupChatRequest.ts
Defines the small shared contract for opening a setup conversation as a draft.

src/features/connections/api/localMcpInventory.ts
Defines the minimal renderer-safe inventory contract and Tauri API wrapper.

src/features/connections/lib/tests/localMcpInventory.test.ts
Covers conservative cross-harness identity, collision handling, filtering, and partial-source reporting.

src/features/connections/lib/localMcpInventory.ts
Groups only entries with matching key, name, transport, and opaque target fingerprint, and provides shared filtering/error derivation.

src/features/connections/ui/ConnectionCards.test.tsx
Protects the existing managed-row behavior and spacing between Disconnect and Reconnect actions.

src/features/connections/ui/ConnectionCards.tsx
Adds the missing standard gap around paired managed connection actions; all other managed behavior remains unchanged.

src/features/connections/ui/ConnectionsSettings.pane.test.tsx
Covers section ownership, shared search, empty/error/partial states, retry, active-project changes, and agent setup requests.

src/features/connections/ui/ConnectionsSettings.tsx
Reorganizes the page into Company managed and Local sections, preserves the full managed catalog/actions and ordering, shares one search, and adds the agent-led Add connection entry point.

src/features/connections/ui/LocalMcpConnectionCard.tsx
Renders passive local inventory through the existing ConnectionCard row pattern with a simple Works with label.

src/features/connections/ui/LocalMcpSection.tsx
Owns local inventory loading, successful empty, partial, failure, retry, and search-result states without adding mutation controls.

src/features/settings/ui/SettingsView.tsx
Connects the Connections page to the neutral setup-chat handoff.

src/shared/i18n/locales/en/settings.json
Adds English copy for the new sections, passive inventory, recovery states, and Add connection flow.

src/shared/i18n/locales/es/settings.json
Adds matching Spanish translations.

Verification

  • just check
  • just tauri-check
  • just clippy
  • 25 Connections tests
  • 134 AppShell/navigation tests
  • 13 Rust inventory tests

@morgmart
morgmart requested a review from a team August 18, 2026 04:53
Comment on lines +184 to 190
<LocalMcpSection
searchTerm={searchTerm}
workspacePaths={workspacePaths}
onAddConnection={
onAskAgentToAddMcp ? askAgentToAddConnection : undefined
}
/>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The removed isCompanyManagedExtension filter existed specifically so a local extension that matches an OAuth catalog provider wasn't presented twice (old comment: “extensions already represented by an OAuth catalog card”). Nothing replaces it here: a Goose config.yaml entry keyed slack, linear, etc. now renders as an OAuth row under Company managed and as a passive row under Local, describing the same service with contradictory affordances (Connect/Disconnect above, read-only below). managedExtensions.ts is now unused by production code — either re-apply the match against OAUTH_PROVIDERS when filtering local groups, or make the duplication an explicit product decision.

Generated by AI

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

🤖 This duplication is intentional in the new model. Company managed describes the organization-provided OAuth connection and its lifecycle; Local truthfully reports MCP configuration found in Goose, Claude Code, or Codex. A Slack/Linear entry can exist through both paths with different availability, auth, and session behavior. Reapplying the old fuzzy catalog-name filter would hide real local configuration and undermine the purpose of the Local inventory. I’m leaving this thread open for Morgan’s product judgment.

Comment thread src/features/connections/ui/ConnectionsSettings.tsx
@morgmart
morgmart merged commit 76ab8e8 into main Aug 18, 2026
8 checks passed
@morgmart
morgmart deleted the mcp-inventory-clean branch August 18, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants