Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP PDF Serverextract the text from the first 5 pages of annual_report.pdf"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π 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_server.py # Main server entry point
βββ README.md # Project documentationβοΈ Installation
Recommended Python version: 3.9+
pip install pymupdf mcpNote: To use OCR features, you may need a MuPDF build with OCR support or external OCR libraries.
π€ Configuration
{
"mcpServers": {
"pdf-reader": {
"command": "uvx",
"timeout": 60000,
"args": [
"mcp-pdf-reader"
]
}
}
}π¦ Start the Server
Run the following command:
python pdf_server.pyYou should see logs like:
INFO:mcp-pdf-server:Starting MCP PDF Server...π οΈ API Tool List
Tool | Description | Input Parameters | Returns |
| Extracts normal text from PDF pages |
| List of page texts |
| Recognizes text via OCR |
| OCR extracted text |
| Extracts images from a PDF page |
| List 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.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.