Skip to content

feat: add workspace MCP configuration - #3293

Open
carlosflorencio wants to merge 7 commits into
mainfrom
feature/plan-workspace-mcp-c-dcc
Open

feat: add workspace MCP configuration#3293
carlosflorencio wants to merge 7 commits into
mainfrom
feature/plan-workspace-mcp-c-dcc

Conversation

@carlosflorencio

@carlosflorencio carlosflorencio commented Sep 2, 2026

Copy link
Copy Markdown
Member

Tip

PR walkthrough: Open the visual walkthrough

Workspace MCP configuration was previously scattered across legacy profile JSON and launch-time assumptions, which made reusable workspace definitions, safe registry installs, and scoped task/session selection impossible. This adds a workspace-owned catalog with additive selection resolution, explicit marketplace review, lazy materialization, legacy migration, idle ACP reconfiguration, and responsive settings/selectors.

Important Changes

  • Persist workspace-owned MCP definitions with remote, managed npm, and existing executable setup modes.
  • Add a cached public registry with explicit review before saving exact package versions and lazy task-executor materialization.
  • Compose repository, workspace-contextual profile, task, and task-session selections additively with secret-safe filtering and legacy migration.
  • Apply session MCP changes only while idle, preferring ACP session/resume and falling back to session/load with durable status.
  • Add workspace settings, collapsed repository/task selectors, session controls, localization, public documentation, and desktop/mobile E2E coverage.

Validation

  • env -u KANDEV_INTERNAL_CONFIG_FILE -u KANDEV_INTERNAL_CONFIG_HOME_FILE make -C apps/backend test (full Go suite)
  • make -C apps/backend build
  • make -C apps/backend e2e-plugin-package
  • pnpm --filter @kandev/web run lint
  • pnpm --filter @kandev/web run typecheck
  • pnpm run i18n:check
  • pnpm run i18n:ratchet
  • pnpm run e2e:sleep-ratchet
  • Focused changed web Vitest suite: 80 tests passed in 5 files
  • Workspace MCP E2E: 4 desktop settings, 2 mobile settings, 1 desktop task, and 2 mobile task tests passed
  • pnpm run build:e2e
  • node --test scripts/validate-public-docs.test.mjs and node scripts/validate-public-docs.mjs
  • python3 scripts/lint-spec-files.py --all
  • git diff --check

The full frontend Vitest suite was attempted twice, but its worker exited unexpectedly after happy-dom stylesheet warnings under Node 24. The focused changed-file suite passed.

Diagram

flowchart LR
    C[Workspace catalog] --> S[Scope selections]
    S --> R[Effective resolver]
    R --> L[Launch with resolved servers]
    R --> I[Idle session reconfiguration]
    M[Registry cache] --> C
    P[Legacy profile JSON] --> X[One-time workspace migration]
    X --> C
Loading

Possible Improvements

Medium risk: the full frontend Vitest suite still needs a stable Node 24 happy-dom worker run; focused changed-file tests are green.

Checklist

  • If I do not have repository write access and this is a large architectural change, I discussed the direction in a linked issue before opening this PR.
  • This PR contains one logical change; unrelated work is split into separate PRs.
  • I have performed a self-review of my code.
  • I have manually tested my changes and they work as expected.
  • My changes have tests that cover the new functionality and edge cases.
  • If my change touches UI files (apps/web/), I have added or updated Playwright e2e tests in apps/web/e2e/ and verified them with make test-e2e.
  • I checked whether this affects public docs in docs/public/** and updated them or noted why no docs change is needed.

Review in cubic

Screenshots

Desktop workspace MCP settings

Mobile workspace MCP setup

Preview Environment

URL https://kandev-pr-3293-bwo7.sprites.app
Commit 6f0cc94
Agent Mock agent

Updates automatically on each push. Destroyed when the PR is closed.

@carlosflorencio
carlosflorencio temporarily deployed to opencode-review-trusted September 2, 2026 15:56 — with GitHub Actions Inactive
@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown

Too many files changed for review (152 files, 100 file limit).

Bypass the limit by tagging @greptile-apps to review.

@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 165 files, which is 15 over the limit of 150.

To get a review, reduce the PR to 150 files or fewer by splitting it into smaller PRs or changing its base branch.

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: QUIET

Plan: Team

Run ID: 98c21315-80f8-4de2-b886-ffbb1cc87845

📥 Commits

Reviewing files that changed from the base of the PR and between 69e6c4f and 6f0cc94.

📒 Files selected for processing (165)
  • apps/backend/internal/agent/mcpconfig/acp.go
  • apps/backend/internal/agent/mcpconfig/catalog_service.go
  • apps/backend/internal/agent/mcpconfig/catalog_test.go
  • apps/backend/internal/agent/mcpconfig/catalog_types.go
  • apps/backend/internal/agent/mcpconfig/legacy_import.go
  • apps/backend/internal/agent/mcpconfig/legacy_import_test.go
  • apps/backend/internal/agent/mcpconfig/materialize.go
  • apps/backend/internal/agent/mcpconfig/materialize_test.go
  • apps/backend/internal/agent/mcpconfig/registry/client.go
  • apps/backend/internal/agent/mcpconfig/registry/client_test.go
  • apps/backend/internal/agent/mcpconfig/registry/curated.go
  • apps/backend/internal/agent/mcpconfig/registry/curated.json
  • apps/backend/internal/agent/mcpconfig/registry/marketplace.go
  • apps/backend/internal/agent/mcpconfig/registry/marketplace_test.go
  • apps/backend/internal/agent/mcpconfig/registry/sync.go
  • apps/backend/internal/agent/mcpconfig/registry/sync_test.go
  • apps/backend/internal/agent/mcpconfig/registry/types.go
  • apps/backend/internal/agent/mcpconfig/resolve_effective.go
  • apps/backend/internal/agent/mcpconfig/resolve_effective_test.go
  • apps/backend/internal/agent/mcpconfig/selections.go
  • apps/backend/internal/agent/mcpconfig/selections_test.go
  • apps/backend/internal/agent/mcpconfig/types.go
  • apps/backend/internal/agent/runtime/agentctl/agent.go
  • apps/backend/internal/agent/runtime/agentctl/agent_test.go
  • apps/backend/internal/agent/runtime/agentctl/client.go
  • apps/backend/internal/agent/runtime/agentctl/control.go
  • apps/backend/internal/agent/runtime/lifecycle/executor_backend.go
  • apps/backend/internal/agent/runtime/lifecycle/manager.go
  • apps/backend/internal/agent/runtime/lifecycle/manager_events.go
  • apps/backend/internal/agent/runtime/lifecycle/manager_execution.go
  • apps/backend/internal/agent/runtime/lifecycle/manager_interaction.go
  • apps/backend/internal/agent/runtime/lifecycle/manager_launch.go
  • apps/backend/internal/agent/runtime/lifecycle/manager_mcp_reconfiguration.go
  • apps/backend/internal/agent/runtime/lifecycle/manager_mcp_reconfiguration_test.go
  • apps/backend/internal/agent/runtime/lifecycle/manager_passthrough.go
  • apps/backend/internal/agent/runtime/lifecycle/manager_profile.go
  • apps/backend/internal/agent/runtime/lifecycle/types.go
  • apps/backend/internal/agent/runtime/lifecycle/workspace_sources_reconcile.go
  • apps/backend/internal/agent/settings/handlers/handlers.go
  • apps/backend/internal/agent/settings/handlers/mcp_catalog_handlers.go
  • apps/backend/internal/agent/settings/handlers/mcp_catalog_handlers_test.go
  • apps/backend/internal/agent/settings/handlers/mcp_marketplace_handlers.go
  • apps/backend/internal/agent/settings/handlers/mcp_marketplace_handlers_test.go
  • apps/backend/internal/agent/settings/handlers/mcp_selection_handlers.go
  • apps/backend/internal/agent/settings/store/mcp_catalog.go
  • apps/backend/internal/agent/settings/store/mcp_registry.go
  • apps/backend/internal/agent/settings/store/mcp_selections.go
  • apps/backend/internal/agent/settings/store/mcp_session_state.go
  • apps/backend/internal/agent/settings/store/sqlite.go
  • apps/backend/internal/agent/settings/store/sqlite_mcp_catalog_test.go
  • apps/backend/internal/agent/settings/store/sqlite_mcp_registry_test.go
  • apps/backend/internal/agent/settings/store/sqlite_mcp_session_state_test.go
  • apps/backend/internal/agentctl/server/adapter/adapter.go
  • apps/backend/internal/agentctl/server/adapter/transport/acp/adapter.go
  • apps/backend/internal/agentctl/server/adapter/transport/acp/adapter_session.go
  • apps/backend/internal/agentctl/server/adapter/transport/acp/adapter_session_test.go
  • apps/backend/internal/agentctl/server/adapter/transport/shared/config.go
  • apps/backend/internal/agentctl/server/api/agent.go
  • apps/backend/internal/agentctl/server/api/agent_test.go
  • apps/backend/internal/agentctl/server/config/config.go
  • apps/backend/internal/agentctl/server/instance/instance.go
  • apps/backend/internal/agentctl/server/instance/manager.go
  • apps/backend/internal/agentctl/server/process/manager.go
  • apps/backend/internal/agentctl/types/types.go
  • apps/backend/internal/backendapp/agents.go
  • apps/backend/internal/backendapp/helpers.go
  • apps/backend/internal/backendapp/main.go
  • apps/backend/internal/backendapp/mcp_deletion_cleanup_test.go
  • apps/backend/internal/backendapp/mcp_selection.go
  • apps/backend/internal/mcp/handlers/handlers.go
  • apps/backend/internal/orchestrator/service.go
  • apps/backend/internal/orchestrator/session_launch.go
  • apps/backend/internal/orchestrator/session_mcp.go
  • apps/backend/internal/orchestrator/task_operations.go
  • apps/backend/internal/task/dto/requests.go
  • apps/backend/internal/task/handlers/task_http_handlers.go
  • apps/backend/internal/task/handlers/task_ws_handlers.go
  • apps/backend/internal/task/service/service.go
  • apps/backend/internal/task/service/service_requests.go
  • apps/backend/internal/task/service/service_resources.go
  • apps/backend/internal/task/service/service_tasks.go
  • apps/web/app/settings/agents/[agentId]/agent-setup-parts.tsx
  • apps/web/app/settings/agents/[agentId]/profile-mcp-config-card.tsx
  • apps/web/app/settings/workspace/[id]/mcp-servers/page.tsx
  • apps/web/components/app-sidebar/sections/settings/settings-menu-branches.test.ts
  • apps/web/components/mcp/mcp-selection-picker.tsx
  • apps/web/components/settings/agent-profile-page.tsx
  • apps/web/components/settings/repository-card.tsx
  • apps/web/components/settings/repository-mcp-selection.tsx
  • apps/web/components/settings/workspaces/mcp-definition-form.tsx
  • apps/web/components/settings/workspaces/mcp-marketplace.tsx
  • apps/web/components/settings/workspaces/mcp-settings.tsx
  • apps/web/components/task-create-dialog-advanced-settings.tsx
  • apps/web/components/task-create-dialog-footer.tsx
  • apps/web/components/task-create-dialog-form-body.test.tsx
  • apps/web/components/task-create-dialog-form-reset.ts
  • apps/web/components/task-create-dialog-helpers.ts
  • apps/web/components/task-create-dialog-mcp.ts
  • apps/web/components/task-create-dialog-prop-builders.ts
  • apps/web/components/task-create-dialog-setup.test.ts
  • apps/web/components/task-create-dialog-setup.ts
  • apps/web/components/task-create-dialog-state.ts
  • apps/web/components/task-create-dialog-submit.test.tsx
  • apps/web/components/task-create-dialog-submit.tsx
  • apps/web/components/task-create-dialog-types.ts
  • apps/web/components/task-create-dialog.test.tsx
  • apps/web/components/task-create-dialog.tsx
  • apps/web/components/task/dockview-desktop-layout.tsx
  • apps/web/components/task/dockview-panel-content.tsx
  • apps/web/components/task/mcp-session-selector.tsx
  • apps/web/components/task/new-session-dialog.tsx
  • apps/web/components/task/new-session-form-actions.test.ts
  • apps/web/components/task/new-session-form-actions.ts
  • apps/web/components/task/new-session-mcp.ts
  • apps/web/components/task/new-subtask-form-state.ts
  • apps/web/components/task/task-chat-panel.tsx
  • apps/web/components/task/task-session-mcp-settings.tsx
  • apps/web/e2e/helpers/api-client.ts
  • apps/web/e2e/tests/settings/mobile-workspace-mcp-configuration.spec.ts
  • apps/web/e2e/tests/settings/workspace-mcp-configuration.spec.ts
  • apps/web/e2e/tests/task/mobile-task-mcp-selection.spec.ts
  • apps/web/e2e/tests/task/task-mcp-selection.spec.ts
  • apps/web/hooks/domains/workspace/use-mcp-selection-editor.ts
  • apps/web/hooks/domains/workspace/use-mcp-workspace-settings.ts
  • apps/web/lib/api/domains/kanban-api.ts
  • apps/web/lib/api/domains/mcp-api.ts
  • apps/web/lib/api/index.ts
  • apps/web/lib/services/session-launch-helpers.ts
  • apps/web/lib/services/session-launch-service.ts
  • apps/web/lib/settings/workspace-settings-tabs.ts
  • apps/web/lib/types/http-mcp.ts
  • apps/web/lib/types/http.ts
  • apps/web/src/locales/en/agents.json
  • apps/web/src/locales/en/settings.json
  • apps/web/src/locales/pseudo/agents.json
  • apps/web/src/locales/pseudo/settings.json
  • apps/web/src/locales/pt-pt/_verbatim.json
  • apps/web/src/locales/pt-pt/agents.json
  • apps/web/src/locales/pt-pt/settings.json
  • apps/web/src/locales/zh-cn/agents.json
  • apps/web/src/locales/zh-cn/settings.json
  • apps/web/src/locales/zh-hk/agents.json
  • apps/web/src/locales/zh-hk/settings.json
  • apps/web/src/locales/zh-tw/agents.json
  • apps/web/src/locales/zh-tw/settings.json
  • apps/web/src/settings-routes.tsx
  • docs/decisions/2026-09-01-workspace-mcp-configuration.md
  • docs/decisions/INDEX.md
  • docs/plans/workspace-mcp-configuration/plan.md
  • docs/plans/workspace-mcp-configuration/task-01-persist-workspace-mcp-catalog.md
  • docs/plans/workspace-mcp-configuration/task-02-integrate-public-mcp-registry.md
  • docs/plans/workspace-mcp-configuration/task-03-migrate-scoped-mcp-selections.md
  • docs/plans/workspace-mcp-configuration/task-04-resolve-effective-runtime-mcps.md
  • docs/plans/workspace-mcp-configuration/task-05-apply-idle-session-mcp-changes.md
  • docs/plans/workspace-mcp-configuration/task-06-build-workspace-mcp-settings.md
  • docs/plans/workspace-mcp-configuration/task-07-add-scoped-mcp-selectors.md
  • docs/plans/workspace-mcp-configuration/task-08-cover-mcp-user-journeys.md
  • docs/plans/workspace-mcp-configuration/task-09-update-public-mcp-documentation.md
  • docs/public/agents-and-profiles.md
  • docs/public/automation-and-mcp.md
  • docs/public/feature-status.md
  • docs/public/security.md
  • docs/specs/agents/README.md
  • docs/specs/agents/requirements/workspace-mcp-configuration.md
  • docs/specs/agents/system-design/workspace-mcp-configuration.md

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@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: 954b41ba10

ℹ️ 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 apps/backend/internal/backendapp/agents.go
Comment thread apps/backend/internal/agent/mcpconfig/materialize.go Outdated
Comment thread apps/backend/internal/agent/mcpconfig/registry/marketplace.go Outdated
Comment thread apps/web/components/settings/workspaces/mcp-definition-form.tsx
Comment thread apps/backend/internal/agent/runtime/lifecycle/manager_launch.go
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T16:06:39.097082Z 954b41b PR opened
ℹ️ 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.

@cubic-dev-ai cubic-dev-ai 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.

All reported issues were addressed across 152 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/backend/internal/agent/mcpconfig/legacy_import.go
Comment thread apps/backend/internal/agent/mcpconfig/legacy_import.go
Comment thread apps/web/hooks/domains/workspace/use-mcp-workspace-settings.ts
Comment thread apps/web/components/task/new-session-mcp.ts Outdated
Comment thread apps/backend/internal/agent/mcpconfig/registry/client.go
Comment thread apps/backend/internal/agent/mcpconfig/registry/marketplace.go Outdated
Comment thread apps/backend/internal/orchestrator/session_mcp.go
Comment thread apps/web/components/task-create-dialog.tsx
Comment thread apps/backend/internal/agent/mcpconfig/materialize.go Outdated
…e-mcp-c-dcc

# Conflicts:
#	apps/backend/internal/backendapp/agents.go
#	docs/public/security.md
@carlosflorencio
carlosflorencio temporarily deployed to opencode-review-trusted September 2, 2026 16:32 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Cloudflare Pages docs preview

Open the docs preview

Built from docs commit 6f0cc94.

Stable PR alias: https://docs-pr-3293.landing-87j.pages.dev/docs

…e-mcp-c-dcc

# Conflicts:
#	docs/specs/agents/README.md
@carlosflorencio
carlosflorencio temporarily deployed to opencode-review-trusted September 2, 2026 20:52 — with GitHub Actions Inactive
…e-mcp-c-dcc

# Conflicts:
#	docs/public/feature-status.md
@carlosflorencio
carlosflorencio temporarily deployed to opencode-review-trusted September 2, 2026 21:19 — with GitHub Actions Inactive
@carlosflorencio
carlosflorencio temporarily deployed to opencode-review-trusted September 2, 2026 22:33 — with GitHub Actions Inactive
@carlosflorencio
carlosflorencio temporarily deployed to opencode-review-trusted September 2, 2026 23:51 — with GitHub Actions Inactive
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.

1 participant