Skip to content

feat: forward live progress from research and get_example - #500

Merged
skvark merged 1 commit into
mainfrom
skvark/mcp-progress-receiver
Oct 20, 2026
Merged

skvark merged 1 commit into
mainfrom
skvark/mcp-progress-receiver

Conversation

@skvark

@skvark skvark commented Oct 20, 2026

Copy link
Copy Markdown
Member

Summary

Long-running research and get_example calls gave MCP hosts no feedback until the final result. When a host sends a progress token, the MCP server now forwards GitHits status updates as notifications/progress while the call runs. Hosts that display progress, such as Claude Code, show the current stage under the running tool call.

  • @githits/mcp
    • New optional progress server option, also available on registerMcpTools and the local server.
    • New credential-free RelayReceiver. It receives operation progress over one shared WebSocket, authorized either by the caller's own token or by a service credential supplied at runtime, and routes each update to the call that started it.
    • The package ships no credentials.
  • Best effort: every failure means no progress for that call, never a different result.
    • Relay setup failures back off, using Retry-After on 429.
    • Dropped sockets reconnect to the same relay, and renewal swaps sockets only after the new one opens.
    • Stale or duplicate updates are dropped, and updates stop before the tool returns.
    • A request whose progress headers are rejected before execution is resent once without them.
  • githits mcp: enables progress with the stored token, read only on the first call that asks for it, and closes the socket when the client disconnects.
  • Project API keys: gh-proj- keys no longer trigger a credential refresh, matching ghi- tokens.
  • Dependencies: adds ws (8.22.0), kept external in the bundle so Node 20 keeps working.

Change fragments are in changes/, and the package README documents the new option.

Test plan

  • bun test: all pass except the existing eval/agentic/upgrade-review/score.test.ts, which needs Python tomllib and also fails on main locally.
  • New coverage:
    • receiver: routing, deduplication, backoff, reconnect, renewal swap, idle close, service and caller auth;
    • request services: rejection fallback;
    • real MCP client and server over the in-memory transport: progress before the result, progress token 0, no-token calls unchanged, failures end progress.
  • bun run typecheck, bun run lint
  • Live staging check: the local MCP server forwarded every stage for get_example and research before the result, and a rejected progress request fell back to a normal result.
  • Real hosts, interactive:
    • Claude Code 2.1.304 shows the stage text under the running call.
    • Codex 0.163.0 sends a progress token and receives the updates but doesn't display them.

🤖 Generated with Claude Code

Long-running research and get_example calls gave MCP hosts no feedback until
the final result. When a host sends a progress token, the MCP server now
forwards GitHits status updates as notifications/progress while the call runs.

- @githits/mcp adds an optional `progress` server option and a credential-free
  RelayReceiver. It receives operation progress over one shared WebSocket,
  authorized by the caller's own token or by a service credential supplied at
  runtime, and routes each update to the call that started it.
- Progress is best effort. Relay setup failures back off, dropped sockets
  reconnect with the same relay, renewals swap sockets only after the new one
  opens, and stale or duplicate updates are dropped. A request whose progress
  headers are rejected before execution is resent once without them, so tool
  results never depend on progress.
- `githits mcp` enables progress with the stored token, resolved only on the
  first call that asks for it, and closes the socket when the client leaves.
- Project API keys (gh-proj-) no longer trigger a credential refresh, matching
  personal ghi- tokens.

Adds a ws dependency, kept external in the bundle, to preserve Node 20 support.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@skvark
skvark merged commit da2759d into main Oct 20, 2026
10 checks passed
@skvark skvark mentioned this pull request Oct 20, 2026
4 of 5 tasks
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