Skip to content

feat(mcp): add project management tools - #8677

Open
juliusmarminge wants to merge 6 commits into
agents/mcp-controls/base-490318afrom
agents/mcp-projects/management
Open

feat(mcp): add project management tools#8677
juliusmarminge wants to merge 6 commits into
agents/mcp-controls/base-490318afrom
agents/mcp-projects/management

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Aug 29, 2026

Copy link
Copy Markdown
Member

Problem

Agents can work inside projects but cannot discover, register, clone, configure, or safely remove project records through T3's MCP boundary. Existing project mutations also drop defaultThreadEnvMode and faviconPath along some client/server paths.

Change

  • Add typed t3_project_list, t3_project_read, t3_project_create, t3_project_update, and t3_project_delete tools backed by ProjectService.
  • Support existing directories, explicit missing-directory creation, and mutually exclusive URL or provider/repository clone sources through the existing clone service.
  • Preserve omitted versus explicit-null project settings end to end, including client-runtime commands, events, projections, and websocket mutations.
  • Bound project listing before per-project configuration reads and keep full scripts on t3_project_read.
  • Recover only a completed clone whose canonical repository root and remote match the requested source, while serializing overlapping clone/create attempts.
  • Guard nonempty deletion across active, archived, and app-owned child threads; explicit cascade uses normal thread-delete commands.

Behavior

Project reads expose roots, titles, model defaults, scripts, icons, and project/file/global/effective workspace modes. Clone creation never publishes or adopts unrelated existing contents. Project removal never deletes repository, worktree, or workspace files. Delete counts are per attempt; a retry after deletion returns alreadyDeleted: true and a zero count.

Validation

  • Focused project MCP, clone-retry/overlap, project service, contract, client command, registration, and project env-mode tests.
  • @t3tools/contracts, @t3tools/client-runtime, and server targeted typechecks.
  • Targeted lint for changed project MCP, contract, and client-runtime files.

Dependency

Targets the immutable rollout base agents/mcp-controls/base-490318a at 490318afa505d3d033295eca12d7e62b4b922725. This is the bottom layer of native stack #8710; #8678 is the dependent upper layer.

Implemented by GPT-5.6-Sol via Codex in T3 Code.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: e0847d62-00fe-4f93-ab13-dae073058cb0

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

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Aug 29, 2026
@github-actions github-actions Bot added the size:XL 500-999 changed lines (additions + deletions). label Aug 29, 2026

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Effect service conventions: one violation found in apps/server/src/mcp/ProjectMcpService.ts (standalone service shape interface). The rest of the new MCP service module, toolkit, handlers, and contracts follow the repository's Effect conventions.

Posted via Macroscope — Effect Service Conventions

Comment thread apps/server/src/mcp/ProjectMcpService.ts Outdated
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for 945b99f.

This comment will update automatically after the next completed run.

Comment thread apps/server/src/mcp/ProjectMcpService.ts Outdated
@juliusmarminge
juliusmarminge force-pushed the agents/mcp-projects/management branch 2 times, most recently from 2cb24f5 to c9605e0 Compare August 29, 2026 21:53
Comment thread apps/server/src/mcp/ProjectMcpService.ts
Comment thread apps/server/src/mcp/ProjectMcpService.ts Outdated
Comment thread apps/server/src/mcp/ProjectMcpService.ts Outdated
@juliusmarminge
juliusmarminge force-pushed the agents/mcp-projects/management branch from c9605e0 to db8d3a6 Compare August 29, 2026 22:14
Comment thread apps/server/src/mcp/ProjectMcpService.ts
Comment thread apps/server/src/mcp/ProjectMcpService.ts
Comment thread apps/server/src/sourceControl/SourceControlRepositoryService.ts
Comment thread apps/server/src/mcp/ProjectMcpService.ts Outdated
Comment thread apps/server/src/mcp/toolkits/project/tools.ts Outdated
@juliusmarminge
juliusmarminge force-pushed the agents/mcp-projects/management branch from db8d3a6 to e443710 Compare August 29, 2026 22:28
@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). and removed size:XL 500-999 changed lines (additions + deletions). labels Aug 29, 2026
Comment thread apps/server/src/sourceControl/SourceControlRepositoryService.ts Outdated
@juliusmarminge
juliusmarminge force-pushed the agents/mcp-projects/management branch from e443710 to 56cf046 Compare August 29, 2026 22:40
@juliusmarminge
juliusmarminge marked this pull request as ready for review August 29, 2026 22:44

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but a cloud agent failed to start.

Reviewed by Cursor Bugbot for commit 56cf046. Configure here.

Comment thread apps/server/src/mcp/ProjectMcpService.ts
@macroscopeapp

macroscopeapp Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR adds production MCP tools that can create, clone, update, and delete projects and cascade-delete their thread records, with changes across shared orchestration and source-control paths. It also changes persisted project defaults and effective workspace-mode behavior, making the scope and impact unsuitable for automatic approval.

You can add or adjust custom eligibility rules. Learn more.

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Effect service conventions: one minor import-hygiene issue in the new test module. The service definition itself (inline Context.Service interface, ProjectMcpService["Service"][...] annotations, namespaced module imports, make + layer order) follows the sibling WorktreeMcpService.ts conventions.

Posted via Macroscope — Effect Service Conventions

Comment thread apps/server/src/mcp/ProjectMcpService.test.ts Outdated

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One convention issue found: an aliased layer import in apps/server/src/mcp/ProjectMcpService.test.ts erases the service module namespace (and is shadowed later in the file). The service definition itself (inline Context.Service interface, make, typed layer, Foo["Service"] annotations, dependencies acquired from the environment) follows the conventions.

Posted via Macroscope — Effect Service Conventions

Comment thread apps/server/src/mcp/ProjectMcpService.test.ts Outdated
@juliusmarminge
juliusmarminge changed the base branch from t3code/codex-turn-mapping to agents/mcp-controls/base-490318a August 30, 2026 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant