feat: PDF viewer POC — preview panel + MCP Apps inline viewer#78
Draft
SudNitro23 wants to merge 1 commit into
Draft
feat: PDF viewer POC — preview panel + MCP Apps inline viewer#78SudNitro23 wants to merge 1 commit into
SudNitro23 wants to merge 1 commit into
Conversation
- viewer-app/: vanilla JS PDF.js viewer (zoom, rotate, add text, save) - src/viewer/: Express server serving the viewer HTML + PDF bytes - src/tools/viewer.ts: open_in_viewer, get_pdf_for_viewer, save_pdf_edits - mcp-viewer-app/: React/Vite MCP Apps inline viewer (ext-apps pattern) - build.mjs: copies viewer assets into dist/ for mcpb packaging - Taskfile.yml: deploy-viewer shortcut Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
This branch captures a proof-of-concept PDF viewer built on top of the Nitro MCP server, developed during a 2-day sprint. It serves as a reference for future implementation once the Nitro web editor is ready to integrate.
What was built
Preview Panel Viewer (v1)
open_in_viewer) — Claude opens the PDF in a side panel when askedMCP Apps Inline Viewer (v2)
@modelcontextprotocol/ext-appsspec (same pattern as PR #1183)vite-plugin-singlefileui://resource — designed to render inline in the conversation without a side panelcallServerTool— no localhost requiredtext/html;profile=mcp-appinline renderingWhy not merging
The team has decided to integrate the official Nitro web editor (provided by the frontend team) instead of maintaining a custom viewer. This branch is preserved so the patterns, tooling decisions, and implementation details can be referenced during that integration.
Reference
doc-intelligence-api) by @rpalekar — MCP Apps smart redact pattern