Add pdf-viewer plugin with local MCP server#72
Merged
ochafik merged 7 commits intoanthropics:mainfrom Mar 28, 2026
Merged
Conversation
First knowledge-work plugin to use a local stdio MCP server instead of a remote HTTP connector. The pdf-server runs locally via npx and provides interactive PDF viewing for academic papers and local files. Tested end-to-end in Claude Code: plugin validation, MCP server connection, tool availability (list_pdfs, display_pdf), and command/skill registration all confirmed working. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The underlying @modelcontextprotocol/server-pdf gained an `interact` tool with 10 annotation types (highlight, underline, strikethrough, note, rectangle, circle, line, freetext, stamp, image), form filling, auto-highlight-text, page extraction, and annotated-PDF download. This reshapes the plugin around interactive workflows: - Rename plugin: pdf-research → pdf - Rename skill: pdf-reading → pdf (unified, covers all capabilities) - Commands: drop /summarize, rename /read → /open, add /annotate, /fill-form, /sign - SKILL.md: document interact tool, all annotation types, coordinate system, interactive workflows (AI-driven annotate, form filling, visual signing) - Positioning: explicitly steer AWAY from viewer for pure ingestion (use native Read instead) — the viewer's value is user interactivity - /sign disclaimer: visual signature image, not certified digital sig Out of scope (documented): summarization, cert signing, PDF generation.
Accuracy: - list_pdfs: 'remote origins' → 'local directories' (server has no remote allowlist, any HTTPS works) - get_screenshot: 'PNG' → 'image' (server returns JPEG) - Supported sources: clarify only arXiv auto-converts /abs/→PDF; others need direct PDF URLs Conventions (matching legal/, productivity/ patterns): - Add argument-hint frontmatter to all 4 commands - Add CONNECTORS.md callout to all commands Positioning — form filling: - Emphasize this is VISUAL form filling (vs programmatic tools) - Document the unnamed-field workflow: screenshot → match bounding boxes to visual labels → fill by name. Many real PDFs have fields named 'Text1', 'Field_7' with labels only on the rendered page. - User gets live feedback and can edit directly in viewer
Plugin name: pdf → pdf-viewer - 'Viewer' makes the interactive/visual modality self-evident - Naturally explains why NOT to use for summarization - Matches enterprise-search precedent (capability-named, not job-function) Skill name: pdf → view-pdf - Verb-noun matches repo convention (review-contract, triage-nda) Trigger description (SKILL.md frontmatter): - Hybrid style: situation framing + verb list for keyword matching - Includes 'open, show, view' so bare 'open this PDF' triggers the skill — SKILL body then disambiguates viewer vs Read - Keeps 'Not for summarization (use Read)' guard Marketplace/plugin.json description: - Marketing-oriented (benefits-first) to match other plugins' style - 'View, annotate, sign... Mark up contracts, fill forms with visual feedback, stamp approvals, place signatures — download annotated copy' Updated all /pdf:* cross-references → /pdf-viewer:*
ochafik
added a commit
to modelcontextprotocol/ext-apps
that referenced
this pull request
Mar 24, 2026
…owledge-work-plugins This directory duplicated the Claude Code plugin that's being added to the knowledge-work plugin marketplace (anthropics/knowledge-work-plugins#72). Keeping a copy here meant two sources of truth drifting apart — this one is already stale vs. the server's interact/annotation capabilities from #506. The MCPB packaging (manifest.json) remains — that's the distributable server artifact. The Claude Code plugin wrapper belongs in the plugin marketplace repo where it can be versioned and discovered alongside other plugins. Note: committed with --no-verify because the pre-commit hook's 'xargs git add $STAGED' step fails on deletion-only commits (the paths no longer exist). Hook fix tracked separately.
ochafik
added a commit
to modelcontextprotocol/ext-apps
that referenced
this pull request
Mar 25, 2026
…owledge-work-plugins (#565) This directory duplicated the Claude Code plugin that's being added to the knowledge-work plugin marketplace (anthropics/knowledge-work-plugins#72). Keeping a copy here meant two sources of truth drifting apart — this one is already stale vs. the server's interact/annotation capabilities from #506. The MCPB packaging (manifest.json) remains — that's the distributable server artifact. The Claude Code plugin wrapper belongs in the plugin marketplace repo where it can be versioned and discovered alongside other plugins. Note: committed with --no-verify because the pre-commit hook's 'xargs git add $STAGED' step fails on deletion-only commits (the paths no longer exist). Hook fix tracked separately.
Without -y, npx prompts 'Ok to proceed? (y)' on first install of a package, which hangs the stdio MCP connection (no TTY to answer). Keeping version unpinned (auto-latest) — currently pulls 1.3.1 which has the interact/annotation capabilities. Tested end-to-end via 'claude --plugin-dir pdf-viewer/'.
Rescope pdf-research → pdf-viewer: expose annotation, form-filling, signing
Upstream added 28 plugins since February (partners, URL-source). Keep all upstream entries, append pdf-viewer. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ochafik
approved these changes
Mar 27, 2026
Contributor
ochafik
left a comment
There was a problem hiding this comment.
Thanks @bryan-anthropic !
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
pdf-viewerplugin that uses a local stdio MCP server (@modelcontextprotocol/server-pdf) instead of a remote HTTP connectortype: "http"remote connectorsinteracttool: 10 annotation types, form filling, visual signatures, stamps, page extractionmarketplace.jsonWhat's in the plugin
.mcp.jsonnpx -y @modelcontextprotocol/server-pdf --stdiocommands/open.md/pdf-viewer:open— open a PDF in the interactive viewercommands/annotate.md/pdf-viewer:annotate— propose markup, review together, iteratecommands/fill-form.md/pdf-viewer:fill-form— fill form fields with live visual feedbackcommands/sign.md/pdf-viewer:sign— place signature/initials imagesskills/view-pdf/SKILL.mdCONNECTORS.mdPositioning
The viewer's value is interactivity with the user — showing the document, collaborating on markup, live form feedback. The SKILL.md explicitly steers Claude toward native Read for pure summarization/extraction and toward the viewer for annotate/fill/sign/stamp workflows.
.mcp.json(the key difference){ "mcpServers": { "pdf": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-pdf", "--stdio"] } } }Instead of
"type": "http"+"url", this uses"command"+"args"to start a local process. Unpinned version pulls latest (currently 1.3.1, which includes theinteracttool from ext-apps#506).Test results
Tested end-to-end via
claude --plugin-dir pdf-viewer/:claude plugin validate)list_pdfs,display_pdf,interacttools/pdf-viewer:{open,annotate,fill-form,sign})pdf-viewer:view-pdf)Tool namespacing:
mcp__plugin_pdf-viewer_pdf__<tool_name>Open question: Cowork VM support
This works in Claude Code (desktop CLI). Unknown whether Cowork VMs support local stdio servers — all existing plugins use remote connectors, which may be a Cowork constraint or simply the pattern that's been used so far.
Test plan
claude --plugin-dir pdf-viewer/interacttool appears/pdf-viewer:openwith an arXiv URL/pdf-viewer:annotate— verify propose→review loop works/pdf-viewer:fill-formon a PDF with form fields/pdf-viewer:signwith a signature imageRelated
plugin/dir from the server example; this repo is canonical