Skip to content

fix(mcp): honor --dry-run for remove (#900) - #937

Merged
jeff-r2026 merged 2 commits into
Tencent:mainfrom
ydflow:fix/mcp-remove-dry-run
Oct 1, 2026
Merged

jeff-r2026 merged 2 commits into
Tencent:mainfrom
ydflow:fix/mcp-remove-dry-run

Conversation

@ydflow

@ydflow ydflow commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Summary

teamai mcp remove --dry-run currently removes managed MCP servers because the global preview flag never reaches the remove handler. Forward it through config loading and the existing MCP reconciler, skip git-exclude cleanup during a preview, and label the output as a dry run.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Test Plan

  • npm run build
  • npm run typecheck
  • npm run lint
  • npx vitest run src/__tests__/mcp-cmd.test.ts — 11 passed
  • npx vitest run --config vitest.e2e.config.ts src/__tests__/e2e/mcp-uninstall.test.ts — 1 passed; exercises dist/index.js and verifies MCP config and ownership manifest remain byte-for-byte unchanged after mcp remove --dry-run

The full unit suite was attempted on Windows but did not pass: unrelated tests hit POSIX file-mode expectations, shell differences, file locks, and timeouts. Linux CI is needed for the full-suite result.

Related Issues

Refs #900 (mcp remove row).

Notes for Reviewers

The underlying MCP reconciler already supported dryRun; this change only connects the command to it and avoids the separate git-exclude cleanup on a preview.

@jeff-r2026 jeff-r2026 self-assigned this Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
  • [P2 non-blocking] docs/usage-guide.md:1270 documents the new preview workflow, but the agent-facing instructions at skill-data/setup/references/manage-admin.md:34 still omit mcp remove --dry-run. The repository rules require behavior changes to update affected skill-data/; synchronize that command example.

The PR description includes a representative real-CLI E2E verification, so testing documentation is sufficient.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

No findings.

  • Previous [P2 non-blocking] documentation issue is resolved: skill-data/setup/references/manage-admin.md:34 now documents teamai mcp remove --dry-run.
  • The PR description includes a representative real-CLI E2E verification, so testing documentation is sufficient.

@jeff-r2026
jeff-r2026 merged commit daa624a into Tencent:main Oct 1, 2026
13 checks passed
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