Skip to content

feat(mcp): Phase 1 — tool spec + src/mcp skeleton (Refs #292)#346

Merged
erishforG merged 1 commit into
release/1.0from
feat/auto-mcp-spec-phase1
Jun 4, 2026
Merged

feat(mcp): Phase 1 — tool spec + src/mcp skeleton (Refs #292)#346
erishforG merged 1 commit into
release/1.0from
feat/auto-mcp-spec-phase1

Conversation

@erishforG

Copy link
Copy Markdown
Owner

무엇

v1.0 MCP 서버의 첫 번째 Phase: tool catalogue spec 문서 + src/mcp/ 모듈 skeleton.

변경 내용

  • docs/mcp/spec.md: 10개 MCP 도구의 완전한 JSON Schema 설계 문서
    • worktree_list, worktree_start, worktree_status, worktree_ship
    • smartlog, ci_status, pr_status, health_check, reviews, sync
    • 각 도구별 inputSchema (JSON Schema draft-07), response shape, error codes
    • 설계 원칙 (worktree-native, dry_run first-class, PAT delegation, CLI surface 불변)
  • src/mcp/mod.rs: McpContext, ToolDef, TOOLS 상수 registry
  • src/mcp/tools/: 7개 stub 모듈 (worktree, smartlog, ci, pr, health, reviews, sync)
  • 5개 unit test: registry 유효성, snake_case+unique, 설명 비어있지 않음, McpContext 생성

Refs #292 (v1.0 MCP tool spec), Refs #241 (MCP server meta-issue)

v1.0 MCP 서버 구현의 가장 중요한 사전 작업: Phase 2 (stdio JSON-RPC) 시작 전에 어떤 도구를 어떤 스키마로 노출할지 확정 필요. 이 스펙 문서가 Phase 2~6의 설계 기준점 역할을 함.

변경 파일 요약

파일 타입
docs/mcp/spec.md 신규 — 설계 문서
src/mcp/mod.rs 신규 — McpContext + TOOLS registry
src/mcp/tools/*.rs 신규 — Phase 1 stubs (9개 파일)
src/main.rs 수정 — mod mcp; 추가 (알파벳 순 위치)

다음 Phase 힌트

리스크

  • 없음 — 신규 모듈 전용, 기존 CLI/worktree/git2 코드 미수정
  • #[allow(dead_code)]src/mcp 모듈 전체에만 적용 (Phase 2에서 제거)

롤백

이 PR을 revert하면 src/mcp/ 디렉터리와 docs/mcp/ 가 완전히 제거되어 깔끔하게 롤백됨.

Test plan

cargo build --quiet        # ✅ clean
cargo fmt --check          # ✅ pass
cargo clippy --all-targets -- -D warnings  # ✅ clean
cargo test --quiet         # ✅ 71+5+67 = 143 tests pass (5개 신규 mcp:: tests 포함)

@erishforG 검토 부탁드립니다 🙏

- docs/mcp/spec.md: full MCP tool catalogue with JSON schemas for
  10 tools: worktree_list/start/status/ship, smartlog, ci_status,
  pr_status, health_check, reviews, sync
- src/mcp/mod.rs: McpContext struct, ToolDef, TOOLS registry constant
- src/mcp/tools/{worktree,smartlog,ci,pr,health,reviews,sync}.rs:
  Phase 1 stubs with #[allow(dead_code)] pending Phase 2 dispatcher
- 5 unit tests: registry non-empty, snake_case+unique names,
  descriptions non-empty, McpContext construction
- #[allow(dead_code)] scoped to mcp module (Phase 1 intentional)

No new external dependencies. No CLI surface changes.
Phase 2 (#293): parsec mcp serve stdio JSON-RPC echo server.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@erishforG erishforG added the auto-improvement Daily auto-generated improvement PR/issue label Jun 4, 2026
@erishforG erishforG merged commit 338b1cf into release/1.0 Jun 4, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-improvement Daily auto-generated improvement PR/issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant