Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/build-pdf-mcpb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build PDF Server MCPB

on:
push:
paths:
- 'examples/pdf-server/**'
tags:
- 'pdf-server-v*'
workflow_dispatch:

defaults:
run:
working-directory: examples/pdf-server

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Remove dev dependencies
run: npm prune --production

- name: Pack MCPB
run: npx @anthropic-ai/mcpb@latest pack .

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: pdf-server-mcpb
path: examples/pdf-server/*.mcpb
retention-days: 30

- name: Attach to release
if: startsWith(github.ref, 'refs/tags/pdf-server-v')
uses: softprops/action-gh-release@v2
with:
files: examples/pdf-server/*.mcpb
33 changes: 33 additions & 0 deletions examples/pdf-server/.mcpbignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Source (dist/ has bundled output)
src/
*.ts
tsconfig*.json
vite.config.*

# Root-level HTML template (dist/mcp-app.html is the built version)
/mcp-app.html

# Dev/test
*.test.*
*.spec.*
__tests__/
jest.config.*
vitest.config.*
.eslintrc*
.prettierrc*

# Screenshots and non-icon images
screenshot.*
grid-cell.*
pdf-icon.svg
*.svg

# Docs (README stays for directory listing)
CHANGELOG*
CONTRIBUTING*
docs/

# Build artifacts
*.tsbuildinfo
coverage/
node_modules/
Binary file added examples/pdf-server/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions examples/pdf-server/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"manifest_version": "0.3",
"name": "@modelcontextprotocol/server-pdf",
"display_name": "PDF",
"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"]
}
Loading