Skip to content

[codex] Add MCP progress notifications#36

Merged
brianmeyer merged 1 commit into
masterfrom
codex/rec-61-mcp-progress-streaming
May 17, 2026
Merged

[codex] Add MCP progress notifications#36
brianmeyer merged 1 commit into
masterfrom
codex/rec-61-mcp-progress-streaming

Conversation

@brianmeyer
Copy link
Copy Markdown
Owner

Summary

  • Emit MCP notifications/progress for long-running tool calls when clients provide _meta.progressToken.
  • Cover search/explain phases, vector/FTS search, ingest, memory writes, batch, search_batch, and FTS rebuild.
  • Add per-query partial-progress callbacks for search_batch before the final merged response.
  • Document progress behavior in README, architecture, MCP tool reference, changelog, and roadmap.

Validation

  • python3 -m pytest -q -> 557 passed, 18 skipped, 18 subtests passed
  • python3 -m compileall -q src tests
  • git diff --check
  • bash tests/uat/test_mcp_server.sh -> PASS 63 / FAIL 0
  • .venv/bin/python -m pip wheel . -w /tmp/recallforge-wheel-rec61
  • PYTHONPATH=/tmp/recallforge-twine .venv/bin/python -m twine check /tmp/recallforge-wheel-rec61/recallforge-0.3.0-py3-none-any.whl

Research Notes

  • Implemented against the official MCP Python SDK progress callback/request metadata behavior and the MCP progress notification spec.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d5d5c9734d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/recallforge/server.py
tool_name = op.get("tool", "")
op_args = op.get("arguments", {})
await progress.report(
i,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make batch progress strictly increase

When batch is called with _meta.progressToken, this emits 0 at batch start and then immediately emits 0 again for the first operation (progress=i), and later repeats values at operation boundaries. MCP progress requires the progress value to increase with each notification, so strict clients may treat these updates as invalid or drop them, which breaks interoperability for progress-aware tooling.

Useful? React with 👍 / 👎.

Comment thread src/recallforge/server.py
],
}

await progress.report(len(queries), len(queries), "Batch search response ready")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid duplicate terminal progress in search_batch

search_batch sends two consecutive terminal progress notifications with the same value (len(queries)): one for merge completion and one for response readiness. Under MCP, progress notifications must be strictly increasing, so this final duplicate can be considered protocol-invalid by strict clients when a progressToken is provided.

Useful? React with 👍 / 👎.

@brianmeyer brianmeyer merged commit 6f250ed into master May 17, 2026
4 checks passed
@brianmeyer brianmeyer deleted the codex/rec-61-mcp-progress-streaming branch May 17, 2026 20:29
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