Skip to content

feat(docx-mcp): add MCP Apps preview with zero-residue isolation#45

Draft
stevenobiajulu wants to merge 3 commits intomainfrom
feat/mcp-app-preview
Draft

feat(docx-mcp): add MCP Apps preview with zero-residue isolation#45
stevenobiajulu wants to merge 3 commits intomainfrom
feat/mcp-app-preview

Conversation

@stevenobiajulu
Copy link
Copy Markdown
Member

Summary

  • Self-contained MCP Apps preview in src/app/ — interactive document preview with get_document_view tool, resource handlers, and HTML preview app
  • Zero-residue removal: delete src/app/ + remove 3 lines from server.ts to fully remove the feature
  • registerPreviewApp() owns all preview concerns: capabilities, ListTools/CallTool overrides, ListResources/ReadResource handlers
  • No @modelcontextprotocol/ext-apps dependency (CDN-only in HTML)
  • Build copy step no-ops when src/app/ is absent

Peer review

Reviewed by Codex (gpt-5.3) and Gemini with full repo access. Findings addressed:

  • Options object signature (was 4 positional args)
  • String literal dedup via GET_DOCUMENT_VIEW_TOOL.name
  • Integration tests via InMemoryTransport + Client

Test plan

  • npm run build -w @usejunior/docx-mcp passes
  • 621/621 tests pass (5 unit + 5 integration tests added)
  • Removal simulation: delete src/app/ + remove lines → build passes
  • MCP Inspector: Resources tab lists ui://safe-docx/preview, Apps tab renders preview

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
site Ready Ready Preview, Comment Mar 11, 2026 3:43pm

Request Review

Self-contained preview app in src/app/ — delete the directory + 2 lines
from server.ts to fully remove. Includes interactive document preview
(preview.html), get_document_view tool, resource handlers, and build
copy step that no-ops when src/app/ is absent.
…gration tests

Peer review by Codex (gpt-5.3) and Gemini surfaced 2 medium findings:
- registerPreviewApp now takes a named options object instead of 4
  positional args (reduces misuse risk)
- Uses GET_DOCUMENT_VIEW_TOOL.name instead of string literal in routing
- Adds 5 integration tests via InMemoryTransport + Client that verify
  tools/list, tools/call, resources/list, resources/read with and
  without preview registered
@github-actions github-actions bot added the feat label Mar 11, 2026
@stevenobiajulu stevenobiajulu changed the title feat(docx-mcp): MCP Apps preview with zero-residue isolation feat(docx-mcp): add MCP Apps preview with zero-residue isolation Mar 11, 2026
- Use 'Document Reading' epic instead of new 'MCP Apps' epic
- Narrow content union type for resources/read assertion
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 11, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant