Repository navigation
Expose literal OCR data to content-only MCP hosts - #226
Merged
Merged
Conversation
silverstein
marked this pull request as ready for review
October 14, 2026 21:14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
An actual Claude Desktop test found that optional local OCR completed and returned its source-page image, but Claude could not see the recognized words. The words were present only in
structuredContent; the model-facingcontentcontained a summary and image. Claude correctly refused to invent the missing raw OCR output.This projects the same already-bounded payload into the existing text block. Job responses likewise expose the same job identity, progress and review paths to content-only hosts. Source/share implementations remain identical. OCR setup stays explicit and disabled by default; no engine, catalog change, word correction, extra recognition or PDF mutation is added.
Validation
NVOICE QA ONLYmisread, literal whitespace/quotes, 205 observed versus 200 returned and five omitted, empty proposals, image omission, and exact job progress at all stages.d185fd0358157ddeafce0dd43e7e89733e6fdc79and treeb0470187e203650de3180a0d63adb7d23baf2bf8.Installed-host result
Two clean isolated MCPB builds were byte-identical, with pinned consumer verification and actual Darwin/x64 packed smoke exit 0. Candidate archive SHA-256 is
99abaeb5f1de36d13bb601ee62e8eb19f96366d50fd0ec55cf038f7c2be06c72(72,900,700 bytes). All 1,586 installed files matched it exactly.The real installed Claude call completed in a fresh synthetic chat. Claude displayed all six literal strings, preserved
NVOICE QA ONLY, flagged its mismatch against the source image and labelled the words and engine scores unverified. The source PDF remained unchanged. No Claude restart was needed.One post-reinstall attempt in the previous chat timed out before a request appeared in the PDF Tools log. That failed attempt is preserved, not counted as a completed OCR operation. The successful native table readback and screenshot were retained from the original session evidence after the Mac later relocked. Temporary OCR configuration was removed and extension settings matched their preceding bytes.
Scope stays narrow: this qualifies the missing-text fix. It does not establish general OCR accuracy or visible inline image painting in Claude, and the broader visual-review gate remains open under the parent Bead. No public release is made. Private chats, configuration, PDFs and screenshots are not included.
Beads:
pdf-toolkit-mcp-qxoj, discovered frompdf-toolkit-mcp-478i.