Skip to content

refactor(plugin)!: migrate from MCP server to CLI dispatch (v0.3.0)#191

Merged
onlycastle merged 6 commits intomainfrom
refactor/mcp-to-cli-migration-20260326
Mar 27, 2026
Merged

refactor(plugin)!: migrate from MCP server to CLI dispatch (v0.3.0)#191
onlycastle merged 6 commits intomainfrom
refactor/mcp-to-cli-migration-20260326

Conversation

@onlycastle
Copy link
Copy Markdown
Owner

Summary

  • Remove MCP server layer: Drop mcp/ directory (server + 14 tool handlers), @modelcontextprotocol/sdk dependency, and 13 deprecated analysis/domain skills that were consolidated in prior PRs
  • Add CLI dispatch: Lightweight Node CLI (cli/index.ts + 14 command modules) wrapping the same lib/ functions — skills invoke via node dist/cli/index.js <command> through Bash instead of MCP tool calls
  • Migrate all skills: 19 skill prompts and 2 hook handlers updated from MCP references to CLI dispatch; no logic changes

Changes

  1. refactor(plugin)!: remove MCP server, tools, and deprecated skills — 47 files deleted (~58k lines)
  2. feat(plugin): add CLI dispatch layer replacing MCP server (v0.3.0) — CLI source, dist artifacts, config, version bump
  3. refactor(plugin): migrate all skills and hooks from MCP to CLI dispatch — 19 skills, 2 hooks, 1 lib comment
  4. chore: update lockfiles after MCP SDK removal

Test Plan

  • node dist/cli/index.js help shows all 14 commands
  • node dist/cli/index.js scan-sessions returns valid JSON
  • Full /bp analyze run completes using CLI dispatch
  • Plugin install from clean state works end-to-end

Generated with Claude Code using /ship-it

onlycastle and others added 6 commits March 26, 2026 22:04
Drop the entire MCP server layer (server.ts, 14 tool handlers,
@modelcontextprotocol/sdk) and 13 deprecated analysis skills that
were consolidated into the current domain model. This clears the
path for the lighter CLI dispatch layer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Introduce a lightweight Node CLI (cli/index.ts + 14 command modules)
that wraps the same lib/ functions the MCP tools used. Skills now
invoke commands via Bash instead of MCP tool calls, eliminating the
@modelcontextprotocol/sdk dependency and JSON-RPC overhead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update 19 skill prompts and 2 hook handlers to invoke the CLI
(node dist/cli/index.js <command>) via Bash instead of calling
MCP tools. No logic changes — purely a transport-layer migration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Bugs: fix hasArtifact null-check (loose equality), remove stale-file
fallback in classify-developer-type (data integrity), move
markAnalysisComplete after serve path resolves, unref HTTP server so
process can exit.

No Fallback Policy: surface JSON.parse errors in save-stage-output,
remove silent fallback in generate-report HTTP handler.

Schema: create dedicated ToolMasteryDataSchema replacing mismatched
CommunicationPatternsDataSchema, align SKILL.md data mapping.

CLI: add duplicate flag detection, bump package.json to 0.3.0,
re-export REQUIRED_STAGE_SEQUENCE, restore distribution in
classify-developer-type message.

Docs: fix inaccurate comments, remove Cursor mention, standardize
--includeProjects casing, add bp-setup retry logic, deprecate Cursor
mappings in tool-mapping.ts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@onlycastle onlycastle merged commit 826c98b into main Mar 27, 2026
@onlycastle onlycastle deleted the refactor/mcp-to-cli-migration-20260326 branch March 27, 2026 06:02
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