Skip to content

Commit 3de035d

Browse files
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>
1 parent 47e437b commit 3de035d

File tree

10 files changed

+220
-0
lines changed

10 files changed

+220
-0
lines changed

examples/pdf-server/.mcpbignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Source files (built output in dist/ is what we need)
2+
*.ts
3+
tsconfig*.json
4+
vite.config.ts
5+
src/
6+
7+
# Tests
8+
*.test.*
9+
10+
# Development assets
11+
screenshot.png
12+
grid-cell.png
13+
pdf-icon.svg
14+
15+
# Plugin directory (separate distribution path)
16+
plugin/
17+
18+
# Git and CI
19+
.git/
20+
.github/
21+
.gitignore

examples/pdf-server/icon.png

549 Bytes
Loading

examples/pdf-server/manifest.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"manifest_version": "0.3",
3+
"name": "@modelcontextprotocol/server-pdf",
4+
"display_name": "PDF (By Anthropic)",
5+
"version": "1.0.1",
6+
"description": "Read and interact with PDF files using an interactive viewer with search, navigation, and text extraction",
7+
"author": {
8+
"name": "Anthropic",
9+
"url": "https://www.anthropic.com"
10+
},
11+
"homepage": "https://github.com/modelcontextprotocol/ext-apps/tree/main/examples/pdf-server",
12+
"repository": {
13+
"type": "git",
14+
"url": "https://github.com/modelcontextprotocol/ext-apps"
15+
},
16+
"support": "https://github.com/modelcontextprotocol/ext-apps/issues",
17+
"icon": "icon.png",
18+
"server": {
19+
"type": "node",
20+
"entry_point": "dist/index.js",
21+
"mcp_config": {
22+
"command": "node",
23+
"args": ["${__dirname}/dist/index.js", "--stdio"],
24+
"env": {}
25+
}
26+
},
27+
"tools": [
28+
{
29+
"name": "list_pdfs",
30+
"description": "List available PDF files that can be displayed"
31+
},
32+
{
33+
"name": "display_pdf",
34+
"description": "Display an interactive PDF viewer with search and navigation"
35+
},
36+
{
37+
"name": "read_pdf_bytes",
38+
"description": "Read a range of bytes from a PDF file (max 512KB per request)"
39+
}
40+
],
41+
"keywords": ["pdf", "documents", "viewer", "reading"],
42+
"license": "MIT",
43+
"compatibility": {
44+
"platforms": ["darwin", "win32", "linux"],
45+
"runtimes": { "node": ">=18.0.0" }
46+
},
47+
"privacy_policies": ["https://www.anthropic.com/privacy"]
48+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "pdf-research",
3+
"version": "0.1.0",
4+
"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.",
5+
"author": {
6+
"name": "Anthropic"
7+
}
8+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mcpServers": {
3+
"pdf": {
4+
"command": "npx",
5+
"args": ["@modelcontextprotocol/server-pdf", "--stdio"]
6+
}
7+
}
8+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Connectors
2+
3+
## Local MCP Server
4+
5+
This plugin uses a **local MCP server** instead of a remote connector.
6+
The PDF server runs on your machine via `npx`.
7+
8+
| Category | Server | How it runs |
9+
| ---------- | ---------------------------------- | -------------------------------------- |
10+
| PDF viewer | `@modelcontextprotocol/server-pdf` | Local stdio via `npx` (auto-installed) |
11+
12+
### Requirements
13+
14+
- Node.js >= 18
15+
- Internet access for remote PDFs (arXiv, bioRxiv, etc.)
16+
- No API keys or authentication needed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# PDF Research Plugin
2+
3+
Read and analyze PDF documents using a local MCP server. Designed for
4+
academic paper review, document analysis, and research workflows.
5+
6+
## What It Does
7+
8+
- **Open PDFs** from local files, arXiv, bioRxiv, and other academic sources
9+
- **Interactive viewer** with search, navigation, and zoom
10+
- **AI-powered analysis** -- summarize, extract key points, compare papers
11+
12+
## Commands
13+
14+
| Command | What it does |
15+
| ------------------------- | ---------------------- |
16+
| `/pdf-research:read` | Open a PDF for reading |
17+
| `/pdf-research:summarize` | Summarize a document |
18+
19+
## How It Works
20+
21+
This plugin uses a **local MCP server** (`@modelcontextprotocol/server-pdf`)
22+
that runs on your machine via `npx`. No API keys or remote services needed --
23+
the PDF server starts automatically when the plugin loads.
24+
25+
This is different from other knowledge-work plugins which use remote HTTP
26+
connectors. The local server pattern enables offline PDF access and avoids
27+
the need for a remote deployment.
28+
29+
## Requirements
30+
31+
- Node.js >= 18
32+
- Internet for remote PDFs (arXiv, etc.)
33+
34+
## Supported PDF Sources
35+
36+
- Local files (file paths in your working directory)
37+
- [arXiv](https://arxiv.org) papers
38+
- [bioRxiv](https://biorxiv.org) / [medRxiv](https://medrxiv.org) preprints
39+
- [chemRxiv](https://chemrxiv.org), [Zenodo](https://zenodo.org), [OSF](https://osf.io)
40+
- [HAL Science](https://hal.science), [SSRN](https://ssrn.com)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
description: Open a PDF for reading and analysis
3+
---
4+
5+
# Read PDF
6+
7+
Open a PDF document for interactive reading. Accepts local file paths,
8+
arXiv URLs, or other academic paper URLs.
9+
10+
## Instructions
11+
12+
1. If the user provides a URL or file path, call `display_pdf` with that URL
13+
2. If no URL given, call `list_pdfs` first to show available documents
14+
3. After displaying, offer to summarize, extract key points, or answer questions
15+
16+
## Supported Sources
17+
18+
- Local files (drag-and-drop or file path)
19+
- arXiv papers (arxiv.org/abs/... or arxiv.org/pdf/...)
20+
- bioRxiv, medRxiv, chemRxiv preprints
21+
- Zenodo, OSF, HAL, SSRN
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
description: Summarize the current PDF or a new document
3+
---
4+
5+
# Summarize PDF
6+
7+
Generate a structured summary of a PDF document.
8+
9+
## Instructions
10+
11+
1. If a PDF is already displayed, work with it
12+
2. If user provides a new URL/path, call `display_pdf` first
13+
3. Read through the document and produce:
14+
- **Title and authors** (if academic paper)
15+
- **Key findings** (3-5 bullet points)
16+
- **Methodology** (brief summary)
17+
- **Conclusions**
18+
- **Relevance** — what makes this paper notable
19+
20+
## Notes
21+
22+
- For long documents, focus on abstract, introduction, and conclusion sections
23+
- Ask the user which sections they care most about if the doc is very long
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: pdf-reading
3+
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.
4+
---
5+
6+
# PDF Reading
7+
8+
You have access to a local PDF server that provides interactive document viewing.
9+
10+
## Available Tools
11+
12+
- **list_pdfs** -- Show available PDFs. Call with no arguments.
13+
- **display_pdf** -- Open a PDF in the interactive viewer.
14+
- `url` (string): URL or local file path
15+
- `page` (number, optional): Starting page number
16+
17+
## How to Use
18+
19+
**When the user mentions a PDF, paper, or document:**
20+
1. If they give a URL or path, call `display_pdf` directly
21+
2. If they say "open the paper" without specifying, call `list_pdfs` to show options
22+
3. After displaying, offer to summarize, extract data, answer questions
23+
24+
**arXiv shortcuts:**
25+
- `arxiv.org/abs/2301.12345` is auto-converted to the PDF URL
26+
- Users can just say "open arxiv 2301.12345"
27+
28+
**Supported remote sources:**
29+
arXiv, bioRxiv, medRxiv, chemRxiv, Zenodo, OSF, HAL Science, SSRN
30+
31+
## Best Practices
32+
33+
- Always display the PDF before trying to analyze it
34+
- For multi-page documents, ask which section the user cares about
35+
- When comparing papers, display them one at a time and note key differences

0 commit comments

Comments
 (0)