Skip to content

refactor: replace MCP tools with session CLI transport - #60

Merged
benvinegar merged 1 commit into
mainfrom
feat/remove-mcp-tools-cli-first
Mar 23, 2026
Merged

refactor: replace MCP tools with session CLI transport#60
benvinegar merged 1 commit into
mainfrom
feat/remove-mcp-tools-cli-first

Conversation

@benvinegar

Copy link
Copy Markdown
Member

Summary

  • remove Hunk's agent-facing MCP tool surface and replace it with a small session-oriented daemon API
  • keep hunk session ... as the stable user/agent interface for live review control
  • update docs, Pi skill guidance, and end-to-end coverage to be CLI-first

What changed

  • added src/session/protocol.ts for the daemon's JSON session API and capabilities endpoint
  • rewrote src/session/commands.ts to talk directly to that session API instead of the MCP SDK client
  • updated src/mcp/server.ts to:
    • serve /session-api
    • serve /session-api/capabilities
    • return a clear 410 error on the old /mcp route telling callers to use hunk session ...
  • removed @modelcontextprotocol/sdk from package.json
  • updated README and bundled Pi skill docs to steer agents toward hunk session ...
  • rewrote the live end-to-end coverage to drive real Hunk sessions through the session CLI
  • added server coverage for capabilities and for rejecting the old MCP endpoint

User impact

From a normal user's CLI perspective, the hunk session ... commands stay the same.

The change is underneath that surface:

  • before: the session CLI was a thin client over Hunk's MCP tools
  • now: the session CLI is a thin client over Hunk's own session API

Validation

  • bun run typecheck
  • bun test
  • bun run check:pack

@benvinegar
benvinegar merged commit 81c14f1 into main Mar 23, 2026
3 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.

1 participant