
Security News
Frontier AI Is Now Critical Infrastructure
The Fable shutdown shows how quickly model access can become a business continuity risk for AI-dependent engineering teams.
A Model Context Protocol (MCP) server that provides AI assistants with comprehensive PDF manipulation capabilities. This server enables natural language interactions with PDF documents through powerful editing, form filling, page manipulation, and security tools.
Quick Setup (NPX - No Installation Required):
Or Install Globally:
npm install -g mcp-pdf
# Then configure Claude Desktop (see Installation section)
✨ Tip: Use NPX method - no installation required! The package downloads automatically when needed.
Cursor IDE supports MCP servers through its configuration. Follow these steps:
Ensure Node.js (v18 or higher) is installed:
node --version # Should be v18.0.0 or higher
Open Cursor Settings:
Cmd+, (macOS) or Ctrl+, (Windows/Linux) to open settingsCursor → Settings → Features → Model Context ProtocolAdd MCP Server Configuration:
The configuration file location depends on your OS:
~/Library/Application Support/Cursor/User/globalStorage/mcp.json%APPDATA%\Cursor\User\globalStorage\mcp.json~/.config/Cursor/User/globalStorage/mcp.jsonEdit the Configuration File:
Create or edit the mcp.json file and add:
{
"mcpServers": {
"mcp-pdf": {
"command": "npx",
"args": ["-y", "mcp-pdf"]
}
}
}
Alternative (if using global installation):
{
"mcpServers": {
"mcp-pdf": {
"command": "pdf-mcp"
}
}
}
Restart Cursor IDE:
Verify Installation:
Claude Desktop uses a configuration file to connect to MCP servers.
Ensure Node.js (v18 or higher) is installed:
node --version # Should be v18.0.0 or higher
Option A: Use NPX (No Installation Required)
# No installation needed - npx will download and run automatically
Option B: Install Globally
npm install -g mcp-pdf
Locate the Configuration File:
The configuration file location depends on your OS:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.jsonCreate or Edit the Configuration File:
If the file doesn't exist, create it. Then add or update the mcpServers section:
{
"mcpServers": {
"mcp-pdf": {
"command": "npx",
"args": ["-y", "mcp-pdf"]
}
}
}
If you installed globally, use:
{
"mcpServers": {
"mcp-pdf": {
"command": "pdf-mcp"
}
}
}
If you have multiple MCP servers, merge them:
{
"mcpServers": {
"mcp-pdf": {
"command": "npx",
"args": ["-y", "mcp-pdf"]
},
"other-server": {
"command": "npx",
"args": ["-y", "other-package"]
}
}
}
Restart Claude Desktop:
Verify Installation:
You can use this command to quickly add the configuration:
# For Claude Desktop (macOS)
mkdir -p ~/Library/Application\ Support/Claude
cat > ~/Library/Application\ Support/Claude/claude_desktop_config.json << 'EOF'
{
"mcpServers": {
"mcp-pdf": {
"command": "npx",
"args": ["-y", "mcp-pdf"]
}
}
}
EOF
1. MCP server not appearing:
node --version2. "Command not found" errors:
npx method instead (no installation required)mcp-pdf (not pdf-mcp)3. Configuration file not found:
4. Tools not working:
Test the installation:
# Test CLI (if installed globally)
pdf-mcp --version
# Test with npx
npx mcp-pdf --version
Install from source:
git clone https://github.com/nitaiaharoni1/pdf-mcp.git
cd pdf-mcp
npm install
npm run build
npm start
The PDF MCP server provides 30+ powerful tools for PDF manipulation:
open_pdf - Open and read PDF file informationcreate_pdf - Create new blank PDF or from templatesave_pdf - Save PDF to file systemclose_pdf - Close PDF and cleanup resourcesget_pdf_info - Get metadata, page count, size, encryption statuslist_form_fields - List all form fields with types and valuesfill_form_field - Fill a specific form field (text, checkbox, radio, dropdown)fill_form_fields - Fill multiple form fields at once (batch operation)get_form_values - Get all current form valuesflatten_form - Flatten form to make fields non-editableadd_text - Add text to PDF at coordinates with stylingadd_image - Insert image into PDFadd_annotation - Add comments, highlights, notesadd_watermark - Add text or image watermarkmodify_metadata - Update title, author, subject, keywordsget_pages - List all pages with dimensionsmerge_pdfs - Combine multiple PDFssplit_pdf - Split PDF into separate filesrotate_page - Rotate specific pagesdelete_pages - Remove pages from PDFextract_pages - Extract pages to new PDFadd_visual_signature - Add image-based signaturecreate_signature_field - Create signature field in formsign_pdf_digital - Apply digital signature with certificateverify_signature - Verify existing digital signaturesencrypt_pdf - Add password protection and permissionsdecrypt_pdf - Remove password protectionset_permissions - Set printing, copying, editing permissionsget_security_info - Check encryption and permissionsextract_text - Extract all text contentextract_images - Extract embedded imagesexport_form_data - Export form data to JSON/CSVcompress_pdf - Optimize PDF file sizeThe pdf-mcp package provides several command-line tools:
pdf-mcp init [directory] - Initialize PDF working directory
pdf-mcp init ~/my-pdfs
pdf-mcp init # Uses default: ~/pdf-mcp
pdf-mcp status - Show current configuration and active sessions
pdf-mcp status
pdf-mcp test [pdf_path] - Test PDF operations with a sample PDF
pdf-mcp test /path/to/sample.pdf
pdf-mcp --help/-h - Show help informationpdf-mcp --version/-v - Show version information"Open the PDF at /path/to/document.pdf"
"Create a new PDF document"
"Save the PDF to /path/to/output.pdf"
"Get information about the current PDF"
"List all form fields in this PDF"
"Fill the 'name' field with 'John Doe'"
"Fill multiple form fields: name='John Doe', email='john@example.com', agree=true"
"Get all form values"
"Flatten the form to make it non-editable"
"Add text 'DRAFT' at coordinates 100, 100 on page 1"
"Add an image from /path/to/image.png to page 1"
"Add a watermark 'CONFIDENTIAL' to all pages"
"Update the PDF title to 'My Document'"
"List all pages with their dimensions"
"Merge /path/to/file1.pdf and /path/to/file2.pdf"
"Split this PDF into separate files"
"Rotate page 2 by 90 degrees"
"Delete pages 3 and 4"
"Extract pages 1-5 to a new PDF"
"Add a visual signature from /path/to/signature.png to page 1"
"Create a signature field named 'signature' on page 1"
"Export form data to /path/to/output.json as JSON"
"Export form data to /path/to/output.csv as CSV"
"Compress this PDF and save to /path/to/compressed.pdf"
PDF_WORKING_DIR - Working directory for PDF operations (default: ~/pdf-mcp)TEMP_DIR - Temporary directory for PDF operations (default: /tmp/pdf-mcp)All file paths must be absolute paths. Relative paths are not supported for security reasons.
PDF documents are managed through sessions. Each opened or created PDF gets a unique session ID that is used for subsequent operations. Sessions are automatically cleaned up after 1 hour of inactivity.
The PDF MCP server includes testing capabilities:
# Test PDF operations
pdf-mcp test /path/to/sample.pdf
# Run unit tests (if available)
npm test
Clone the repository:
git clone https://github.com/nitaiaharoni1/pdf-mcp.git
cd pdf-mcp
Install dependencies:
npm install
Build the project:
npm run build
Test locally:
npm run dev
MIT License - See the LICENSE file for complete terms and conditions.
Made with ❤️ for the AI and PDF processing community
FAQs
A Model Context Protocol server for PDF manipulation and operations
We found that mcp-pdf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Fable shutdown shows how quickly model access can become a business continuity risk for AI-dependent engineering teams.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.