PDF Extraction MCP Server (Claude Code Fork)

by xraywu

31 stars
597 downloads
Not rated
GitHub

About

MCP server to extract contents from a PDF file

Details

Author
xraywu
GitHub stars
31
Downloads
597
Categories
Other

- Extracts text from local PDF files
- Supports OCR for scanned documents
- Optional page selection with comma-separated numbers
- Supports negative indexing (e.g., -1 for last page)
- Fixed for Claude Code CLI installation
- Runnable as a Python module via python -m pdf_extraction

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name PDF Extraction MCP Server (Claude Code Fork)
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository, install in development mode with pip install -e ., then find the installed command path and add it to Claude Code using claude mcp add pdf-extraction /full/path/to/pdf-extraction. Once added, start a new Claude session and use /mcp to confirm connection; then ask Claude to extract content from a local PDF by specifying the file path and optionally a comma-separated list of pages (e.g., "1-3,-1").

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "pdf extraction mcp server (claude code fork)": {
            "mcp-pdf-extraction-server": {
                "command": "python",
                "args": [
                    "-m",
                    "venv",
                    "venv"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-pdf-extraction-server": {
        "command": "python",
        "args": [
            "-m",
            "venv",
            "venv"
        ]
    }
}

PDF Extraction MCP Server (Claude Code Fork)

MCP server to extract contents from PDF files, with fixes for Claude Code CLI installation.

This fork includes critical fixes for installing and running the server with Claude Code (the CLI version).

What's Different in This Fork

1. Added __main__.py - Enables the package to be run as a module with python -m pdf_extraction
2. Claude Code specific instructions - Clear installation steps that work with Claude Code CLI
3. Tested installation process - Verified working with claude mcp add command

Components

Tools

The server implements one tool:
- extract-pdf-contents: Extract contents from a local PDF file
- Takes pdf_path as a required string argument (local file path)
- Takes pages as an optional string argument (comma-separated page numbers, supports negative indexing like -1 for last page)
- Supports both PDF text extraction and OCR for scanned documents

Installation for Claude Code CLI

Prerequisites

- Python 3.11 or higher
- pip or conda
- Claude Code CLI installed (claude command)

Step 1: Clone and Install

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.