pdf-action-inspector


Namepdf-action-inspector JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryA Model Context Protocol server for extracting and analyzing JavaScript Actions from PDF files
upload_time2025-08-29 06:49:50
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords pdf security analysis javascript actions mcp model-context-protocol
VCS
bugtrack_url
requirements PyPDF2 fastmcp
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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)

```bash
uvx pdf-action-inspector
```

This automatically downloads and runs the MCP server without permanent installation.

### Traditional Installation

```bash
pip install pdf-action-inspector
```

## Setup for MCP Clients

### Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "pdf-action-inspector": {
      "command": "uvx",
      "args": ["pdf-action-inspector"]
    }
  }
}
```

Or if you installed via pip:

```json
{
  "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

[GitHub Repository](https://github.com/foxitsoftware/PDFActionInspector)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pdf-action-inspector",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "pdf, security, analysis, javascript, actions, mcp, model-context-protocol",
    "author": null,
    "author_email": "\"Foxit Software Inc.\" <security-ml@foxitsoftware.com>",
    "download_url": null,
    "platform": null,
    "description": "# PDF Action Inspector\r\n\r\nA 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.\r\n\r\n## What is PDF Action Inspector?\r\n\r\nPDF 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.\r\n\r\n## Features\r\n\r\n- **PDF Action Extraction**: Extract JavaScript Actions from document, page, annotation, and field levels\r\n- **Structured Analysis**: Apply security policies to identify potentially suspicious patterns\r\n- **Password Support**: Handle encrypted PDF files\r\n- **Comprehensive Coverage**: Analyze forms, annotations, and embedded scripts\r\n\r\n## Installation\r\n\r\n### Quick Start with uvx (Recommended)\r\n\r\n```bash\r\nuvx pdf-action-inspector\r\n```\r\n\r\nThis automatically downloads and runs the MCP server without permanent installation.\r\n\r\n### Traditional Installation\r\n\r\n```bash\r\npip install pdf-action-inspector\r\n```\r\n\r\n## Setup for MCP Clients\r\n\r\n### Claude Desktop\r\n\r\nAdd to your `claude_desktop_config.json`:\r\n\r\n```json\r\n{\r\n  \"mcpServers\": {\r\n    \"pdf-action-inspector\": {\r\n      \"command\": \"uvx\",\r\n      \"args\": [\"pdf-action-inspector\"]\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nOr if you installed via pip:\r\n\r\n```json\r\n{\r\n  \"mcpServers\": {\r\n    \"pdf-action-inspector\": {\r\n      \"command\": \"pdf-action-inspector\",\r\n      \"args\": []\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n### Other MCP Clients\r\n\r\nFor 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.\r\n\r\n## Usage\r\n\r\nAfter setup, you can use natural language to analyze PDFs through your MCP client:\r\n\r\n```\r\nExtract all JavaScript Actions from this PDF: /path/to/document.pdf\r\nAnalyze the security implications of Actions in this file: /path/to/suspicious.pdf\r\n```\r\n\r\n## Available MCP Tools\r\n\r\n| Tool | Purpose |\r\n|------|---------|\r\n| `extract_pdf_actions` | Extract all JavaScript Actions from PDF |\r\n| `analyze_pdf_actions_security` | Analyze Actions using security policies |\r\n| `get_document_overview` | Get PDF structure and metadata |\r\n| `load_all_annotations` | Analyze PDF annotations |\r\n| `get_page_text_content` | Extract text from specific pages |\r\n| `get_fields_by_name` | Search form fields by name |\r\n| `set_pdf_password` | Handle encrypted PDFs |\r\n| `clear_pdf_cache` | Clear cache for specific or all files |\r\n| `get_cache_status` | Get current cache status |\r\n\r\n## Security Analysis\r\n\r\nThe tool applies security policies to identify patterns such as:\r\n\r\n- JavaScript code execution\r\n- Form field manipulation\r\n- Network requests\r\n- File system access attempts\r\n- Suspicious user interactions\r\n\r\n## Use Cases\r\n\r\n- **Security Research**: Extract and analyze PDF Actions for research\r\n- **Document Analysis**: Understand PDF structure and embedded scripts\r\n- **Educational**: Learn about PDF security mechanisms\r\n- **Forensics**: Investigate PDF-based incidents\r\n\r\n## Requirements\r\n\r\n- Python 3.10+\r\n- PyPDF2 for PDF parsing\r\n- FastMCP for MCP protocol support\r\n\r\n## License\r\n\r\nMIT License\r\n\r\n## Support\r\n\r\n[GitHub Repository](https://github.com/foxitsoftware/PDFActionInspector)\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Model Context Protocol server for extracting and analyzing JavaScript Actions from PDF files",
    "version": "0.1.1",
    "project_urls": {
        "Documentation": "https://github.com/foxitsoftware/PDFActionInspector#readme",
        "Homepage": "https://github.com/foxitsoftware/PDFActionInspector",
        "Issues": "https://github.com/foxitsoftware/PDFActionInspector/issues",
        "Repository": "https://github.com/foxitsoftware/PDFActionInspector"
    },
    "split_keywords": [
        "pdf",
        " security",
        " analysis",
        " javascript",
        " actions",
        " mcp",
        " model-context-protocol"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "397115aa6d600065de8ab69343f5c1dfb68a7dcdcd9205e12150276f3cb74aa6",
                "md5": "6ad09e6ae65c06db636258d27fd96b5c",
                "sha256": "2dd4976624ad507fedc0ea233b32e0c6ea6295ed4e5b840f1b50284a93d7f2d5"
            },
            "downloads": -1,
            "filename": "pdf_action_inspector-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6ad09e6ae65c06db636258d27fd96b5c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 26867,
            "upload_time": "2025-08-29T06:49:50",
            "upload_time_iso_8601": "2025-08-29T06:49:50.925353Z",
            "url": "https://files.pythonhosted.org/packages/39/71/15aa6d600065de8ab69343f5c1dfb68a7dcdcd9205e12150276f3cb74aa6/pdf_action_inspector-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-29 06:49:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "foxitsoftware",
    "github_project": "PDFActionInspector#readme",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "PyPDF2",
            "specs": [
                [
                    ">=",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "fastmcp",
            "specs": [
                [
                    ">=",
                    "2.0.0"
                ]
            ]
        }
    ],
    "lcname": "pdf-action-inspector"
}
        
Elapsed time: 1.22842s