PDF Action Inspector
A Model Context Protocol (MCP) server for extracting and analyzing JavaScript Actions from PDF files. This tool provides structured access to PDF Actions data for security analysis and research purposes.
What is PDF Action Inspector?
PDF Action Inspector is an MCP server that extracts JavaScript Actions embedded in PDF documents. It's designed to work with MCP-compatible clients (such as Claude Desktop) and hosts that support the Model Context Protocol, allowing you to analyze PDF files using natural language queries.
Features
- PDF Action Extraction: Extract JavaScript Actions from document, page, annotation, and field levels
- Structured Analysis: Apply security policies to identify potentially suspicious patterns
- Password Support: Handle encrypted PDF files
- Comprehensive Coverage: Analyze forms, annotations, and embedded scripts
Installation
Quick Start with uvx (Recommended)
uvx pdf-action-inspector
This automatically downloads and runs the MCP server without permanent installation.
Traditional Installation
pip install pdf-action-inspector
Setup for MCP Clients
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"pdf-action-inspector": {
"command": "uvx",
"args": ["pdf-action-inspector"]
}
}
}
Or if you installed via pip:
{
"mcpServers": {
"pdf-action-inspector": {
"command": "pdf-action-inspector",
"args": []
}
}
}
Other MCP Clients
For other MCP-compatible hosts and clients, configure the server using the appropriate method for your client. The server uses STDIO transport and requires no additional arguments.
Usage
After setup, you can use natural language to analyze PDFs through your MCP client:
Extract all JavaScript Actions from this PDF: /path/to/document.pdf
Analyze the security implications of Actions in this file: /path/to/suspicious.pdf
Available MCP Tools
| Tool | Purpose |
|---|---|
extract_pdf_actions |
Extract all JavaScript Actions from PDF |
analyze_pdf_actions_security |
Analyze Actions using security policies |
get_document_overview |
Get PDF structure and metadata |
load_all_annotations |
Analyze PDF annotations |
get_page_text_content |
Extract text from specific pages |
get_fields_by_name |
Search form fields by name |
set_pdf_password |
Handle encrypted PDFs |
clear_pdf_cache |
Clear cache for specific or all files |
get_cache_status |
Get current cache status |
Security Analysis
The tool applies security policies to identify patterns such as:
- JavaScript code execution
- Form field manipulation
- Network requests
- File system access attempts
- Suspicious user interactions
Use Cases
- Security Research: Extract and analyze PDF Actions for research
- Document Analysis: Understand PDF structure and embedded scripts
- Educational: Learn about PDF security mechanisms
- Forensics: Investigate PDF-based incidents
Requirements
- Python 3.10+
- PyPDF2 for PDF parsing
- FastMCP for MCP protocol support
License
MIT License
Support
Metadata
Release files for pdf-action-inspector 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pdf_action_inspector-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / pdf_action_inspector-0.1.1-py3-none-any.whl
| Download URL | pdf_action_inspector-0.1.1-py3-none-any.whl |
|---|---|
| Size | 26.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2dd4976624ad507fedc0ea233b32e0c6ea6295ed4e5b840f1b50284a93d7f2d5
|
|
BLAKE2b-256 checksum How to use checksums |
397115aa6d600065de8ab69343f5c1dfb68a7dcdcd9205e12150276f3cb74aa6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for pdf-action-inspector 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.