Add MCPB packaging and Claude Code plugin for pdf-server (#491)

* Add MCPB packaging and Claude Code plugin for pdf-server

Two distribution paths for the pdf-server:

1. **MCPB bundle** (Claude Desktop MCP Directory):
   - manifest.json: v0.3 manifest with tools, compatibility, privacy
   - .mcpbignore: excludes source/tests from bundle
   - icon.png: 64x64 PDF document icon

2. **Claude Code plugin** (plugin/):
   - .mcp.json: declares local stdio server via npx
   - commands: /pdf-research:read, /pdf-research:summarize
   - skills: pdf-reading skill for document navigation
   - Tested end-to-end: MCP server connects, all tools available

The plugin uses a local stdio MCP server pattern — the first known
instance in a knowledge-work plugin (all existing plugins use remote
HTTP connectors).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Run prettier:fix to satisfy CI formatting checks

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bryan Thompson 2026-02-23 18:51:43 -06:00 • committed by GitHub
commit 3de035dc8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 220 additions and 0 deletions

View file

@ -0,0 +1,21 @@
# Source files (built output in dist/ is what we need)
*.ts
tsconfig*.json
vite.config.ts
src/
# Tests
*.test.*
# Development assets
screenshot.png
grid-cell.png
pdf-icon.svg
# Plugin directory (separate distribution path)
plugin/
# Git and CI
.git/
.github/
.gitignore

Binary file not shown.

After

Width:  |  Height:  |  Size: 549 B

View file

@ -0,0 +1,48 @@
{
"manifest_version": "0.3",
"name": "@modelcontextprotocol/server-pdf",
"display_name": "PDF (By Anthropic)",
"version": "1.0.1",
"description": "Read and interact with PDF files using an interactive viewer with search, navigation, and text extraction",
"author": {
"name": "Anthropic",
"url": "https://www.anthropic.com"
},
"homepage": "https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/pdf-server",
"repository": {
"type": "git",
"url": "https://github.com/modelcontextprotocol/ext-apps"
},
"support": "https://github.com/modelcontextprotocol/ext-apps/issues",
"icon": "icon.png",
"server": {
"type": "node",
"entry_point": "dist/index.js",
"mcp_config": {
"command": "node",
"args": ["${__dirname}/dist/index.js", "--stdio"],
"env": {}
}
},
"tools": [
{
"name": "list_pdfs",
"description": "List available PDF files that can be displayed"
},
{
"name": "display_pdf",
"description": "Display an interactive PDF viewer with search and navigation"
},
{
"name": "read_pdf_bytes",
"description": "Read a range of bytes from a PDF file (max 512KB per request)"
}
],
"keywords": ["pdf", "documents", "viewer", "reading"],
"license": "MIT",
"compatibility": {
"platforms": ["darwin", "win32", "linux"],
"runtimes": { "node": ">=18.0.0" }
},
"privacy_policies": ["https://www.anthropic.com/privacy"]
}

View file

@ -0,0 +1,8 @@
{
"name": "pdf-research",
"version": "0.1.0",
"description": "Read, navigate, and analyze PDF documents — academic papers, reports, and local files. Uses a local PDF MCP server for interactive viewing and text extraction.",
"author": {
"name": "Anthropic"
}
}

View file

@ -0,0 +1,8 @@
{
"mcpServers": {
"pdf": {
"command": "npx",
"args": ["@modelcontextprotocol/server-pdf", "--stdio"]
}
}
}

View file

@ -0,0 +1,16 @@
# Connectors
## Local MCP Server
This plugin uses a **local MCP server** instead of a remote connector.
The PDF server runs on your machine via `npx`.
| Category | Server | How it runs |
| ---------- | ---------------------------------- | -------------------------------------- |
| PDF viewer | `@modelcontextprotocol/server-pdf` | Local stdio via `npx` (auto-installed) |
### Requirements
- Node.js >= 18
- Internet access for remote PDFs (arXiv, bioRxiv, etc.)
- No API keys or authentication needed

View file

@ -0,0 +1,40 @@
# PDF Research Plugin
Read and analyze PDF documents using a local MCP server. Designed for
academic paper review, document analysis, and research workflows.
## What It Does
- **Open PDFs** from local files, arXiv, bioRxiv, and other academic sources
- **Interactive viewer** with search, navigation, and zoom
- **AI-powered analysis** -- summarize, extract key points, compare papers
## Commands
| Command | What it does |
| ------------------------- | ---------------------- |
| `/pdf-research:read` | Open a PDF for reading |
| `/pdf-research:summarize` | Summarize a document |
## How It Works
This plugin uses a **local MCP server** (`@modelcontextprotocol/server-pdf`)
that runs on your machine via `npx`. No API keys or remote services needed --
the PDF server starts automatically when the plugin loads.
This is different from other knowledge-work plugins which use remote HTTP
connectors. The local server pattern enables offline PDF access and avoids
the need for a remote deployment.
## Requirements
- Node.js >= 18
- Internet for remote PDFs (arXiv, etc.)
## Supported PDF Sources
- Local files (file paths in your working directory)
- [arXiv](https://arxiv.org) papers
- [bioRxiv](https://biorxiv.org) / [medRxiv](https://medrxiv.org) preprints
- [chemRxiv](https://chemrxiv.org), [Zenodo](https://zenodo.org), [OSF](https://osf.io)
- [HAL Science](https://hal.science), [SSRN](https://ssrn.com)

View file

@ -0,0 +1,21 @@
---
description: Open a PDF for reading and analysis
---
# Read PDF
Open a PDF document for interactive reading. Accepts local file paths,
arXiv URLs, or other academic paper URLs.
## Instructions
1. If the user provides a URL or file path, call `display_pdf` with that URL
2. If no URL given, call `list_pdfs` first to show available documents
3. After displaying, offer to summarize, extract key points, or answer questions
## Supported Sources
- Local files (drag-and-drop or file path)
- arXiv papers (arxiv.org/abs/... or arxiv.org/pdf/...)
- bioRxiv, medRxiv, chemRxiv preprints
- Zenodo, OSF, HAL, SSRN

View file

@ -0,0 +1,23 @@
---
description: Summarize the current PDF or a new document
---
# Summarize PDF
Generate a structured summary of a PDF document.
## Instructions
1. If a PDF is already displayed, work with it
2. If user provides a new URL/path, call `display_pdf` first
3. Read through the document and produce:
- **Title and authors** (if academic paper)
- **Key findings** (3-5 bullet points)
- **Methodology** (brief summary)
- **Conclusions**
- **Relevance** — what makes this paper notable
## Notes
- For long documents, focus on abstract, introduction, and conclusion sections
- Ask the user which sections they care most about if the doc is very long

View file

@ -0,0 +1,35 @@
---
name: pdf-reading
description: Read and navigate PDF documents using the local PDF server. Reference this when the user wants to open, read, search, or interact with any PDF file or academic paper.
---
# PDF Reading
You have access to a local PDF server that provides interactive document viewing.
## Available Tools
- **list_pdfs** -- Show available PDFs. Call with no arguments.
- **display_pdf** -- Open a PDF in the interactive viewer.
- `url` (string): URL or local file path
- `page` (number, optional): Starting page number
## How to Use
**When the user mentions a PDF, paper, or document:**
1. If they give a URL or path, call `display_pdf` directly
2. If they say "open the paper" without specifying, call `list_pdfs` to show options
3. After displaying, offer to summarize, extract data, answer questions
**arXiv shortcuts:**
- `arxiv.org/abs/2301.12345` is auto-converted to the PDF URL
- Users can just say "open arxiv 2301.12345"
**Supported remote sources:**
arXiv, bioRxiv, medRxiv, chemRxiv, Zenodo, OSF, HAL Science, SSRN
## Best Practices
- Always display the PDF before trying to analyze it
- For multi-page documents, ask which section the user cares about
- When comparing papers, display them one at a time and note key differences