Skip to content

feat(mcp): expand MCP toolset (read tools + git write tools with merge threshold)#45

Open
guoyongchang wants to merge 12 commits into
mainfrom
feat/mcp-expand-tools
Open

feat(mcp): expand MCP toolset (read tools + git write tools with merge threshold)#45
guoyongchang wants to merge 12 commits into
mainfrom
feat/mcp-expand-tools

Conversation

@guoyongchang

Copy link
Copy Markdown
Owner

Overview

Expands the MCP server toolset and fixes two P0 framework bugs.

  • P0 fixes: single CallTool dispatcher with an aggregated handler map; capability level is now read from mcp.json (default details instead of core).
  • 9 new tools:
    • Read: get_active_workspace, list_projects, get_branch_status
    • Write: sync_base, pull, push, commit_and_push, merge_to_test, merge_to_base
  • Merge threshold gate: merge_to_test / merge_to_base are guarded by an ahead-count threshold (evaluateMergeGate), with hardened input validation and errorResult handling.
  • Backend start_mcp_server now preserves an existing user-set capability_level (defaulting to details) instead of overwriting it with core.
  • Transport extended with merge/sync/pull, test_branch diff, and write-operation timeouts.
  • Root vitest now excludes packages/** (MCP uses node:test, not vitest).

Trust boundary

The MCP HTTP server binds to 127.0.0.1:42819 only and has no token auth — the trust boundary is loopback-only (any local process can call it). Documented in packages/mcp/README.md.

Verification

  • cargo check ✓, cargo clippy -- -D warnings
  • cd packages/mcp && npm test ✓ (9 passed)
  • npm run build ✓, node scripts/check-i18n.mjs ✓ (798 keys), npm run contracts ✓ (in sync), npx vitest run ✓ (74 passed)

Known pre-existing bug (not introduced here)

  • git_switch_branch payload shape does not match the backend handler — out of scope for this PR.

Plan

docs/superpowers/plans/2026-06-20-mcp-expand-tools.md

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