JUHE API Marketplace
DeepSeekMine avatar
MCP Server

MCP PDF Server

A PDF processing server that extracts text via normal parsing or OCR, and retrieves images from PDF files through the MCP protocol with a built-in web debugger.

31
GitHub Stars
11/22/2025
Last Updated
No Configuration
Please check the documentation below.
  1. Home
  2. MCP Servers
  3. mcp-pdf-reader

README Documentation

šŸ“„ MCP PDF Server

A PDF file reading server based on FastMCP.

Supports PDF text extraction, OCR recognition, and image extraction via the MCP protocol, with a built-in web debugger for easy testing.


šŸš€ Features

  • read_pdf_text
    Extracts normal text from a PDF (page by page).

  • read_by_ocr
    Uses OCR to recognize text from scanned or image-based PDFs.

  • read_pdf_images
    Extracts all images from a specified PDF page (Base64 encoded output).


šŸ“‚ Project Structure

mcp-pdf-server/
ā”œā”€ā”€ pdf_resources/        # Directory for uploaded and processed PDF files
ā”œā”€ā”€ txt_server.py         # Main server entry point
└── README.md             # Project documentation

āš™ļø Installation

Recommended Python version: 3.9+

pip install pymupdf mcp

Note: To use OCR features, you may need a MuPDF build with OCR support or external OCR libraries.


šŸ”¦ Start the Server

Run the following command:

python txt_server.py

You should see logs like:

Serving on http://127.0.0.1:6231

🌐 Web Debugging Interface

Open your browser and visit:

http://127.0.0.1:6231
  • Select a tool from the left panel
  • Fill in parameters on the right panel
  • Click "Run" to test the tool

No coding required — easily debug and test via the web UI.


šŸ› ļø API Tool List

ToolDescriptionInput ParametersReturns
read_pdf_textExtracts normal text from PDF pagesfile_path, start_page, end_pageList of page texts
read_by_ocrRecognizes text via OCRfile_path, start_page, end_page, language, dpiOCR extracted text
read_pdf_imagesExtracts images from a PDF pagefile_path, page_numberList of images (Base64 encoded)

šŸ“ Example Usage

Extract text from pages 1 to 5:

mcp run read_pdf_text --args '{"file_path": "pdf_resources/example.pdf", "start_page": 1, "end_page": 5}'

Perform OCR recognition on page 1:

mcp run read_by_ocr --args '{"file_path": "pdf_resources/example.pdf", "start_page": 1, "end_page": 1, "language": "eng"}'

Extract all images from page 3:

mcp run read_pdf_images --args '{"file_path": "pdf_resources/example.pdf", "page_number": 3}'

šŸ“¢ Notes

  • Files must be placed inside the pdf_resources/ directory, or an absolute path must be provided.
  • OCR functionality requires appropriate OCR support in the environment.
  • When processing large files, adjust memory and timeout settings as needed.

šŸ“œ License

This project is licensed under the MIT License.
For commercial use, please credit the original source.


Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.ai
Copyright Ā© 2025 - All rights reserved