Runs as a containerized service with volume mounting capabilities to access local PDF files, allowing for isolated and portable deployment.
Provides tools for reading and extracting text from local PDF files stored in a mounted directory, with support for auto-detection of PDF encoding.
PDF Reader MCP Server
A Model Context Protocol (MCP) server that provides tools for reading and extracting text from PDF files, supporting both local files and URLs.
Author
Philip Van de Walker
Email: philip.vandewalker@gmail.com
GitHub: https://github.com/trafflux
Features
Read text content from local PDF files
Read text content from PDF URLs
Error handling for corrupt or invalid PDFs
Volume mounting for accessing local PDFs
Auto-detection of PDF encoding
Standardized JSON output format
Installation
Clone the repository:
Build the Docker image:
Usage
Running the Server
To run the server with access to local PDF files:
Replace /path/to/pdfs
with the actual path to your PDF files directory.
If not using local PDF files:
MCP Configuration
Add to your MCP settings configuration:
Without local file PDF files:
Available Tools
read_local_pdf
Purpose: Read text content from a local PDF file
Input:
{ "path": "/pdfs/document.pdf" }Output:
{ "success": true, "data": { "text": "Extracted content..." } }
read_pdf_url
Purpose: Read text content from a PDF URL
Input:
{ "url": "https://example.com/document.pdf" }Output:
{ "success": true, "data": { "text": "Extracted content..." } }
Error Handling
The server handles various error cases with clear error messages:
Invalid or corrupt PDF files
Missing files
Failed URL requests
Permission issues
Network connectivity problems
Error responses follow the format:
Dependencies
Python 3.11+
PyPDF2: PDF parsing and text extraction
requests: HTTP client for fetching PDFs from URLs
MCP SDK: Model Context Protocol implementation
Project Structure
License
Copyright 2025 Philip Van de Walker
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Contact
For questions, issues, or contributions, please contact Philip Van de Walker:
Email: philip.vandewalker@gmail.com
GitHub: https://github.com/trafflux
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Provides tools for reading and extracting text from PDF files, supporting both local files and URLs.
- Author
- Features
- Installation
- Usage
- Error Handling
- Dependencies
- Project Structure
- License
- Contributing
- Contact
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityEnables text extraction from web pages and PDFs, and execution of predefined commands, enhancing content processing and automation capabilities.
- AsecurityFlicenseAqualityAn MCP server that provides a tool to extract text content from local PDF files, supporting both standard PDF reading and OCR capabilities with optional page selection.Last updated -118
- AsecurityAlicenseAqualityA reliable server for extracting text from PDF documents using the poppler-utils' pdftotext utility, compatible with any Model Context Protocol client.Last updated -13MIT License
- -securityAlicense-qualityA server that provides tools for reading and processing PDF documents, allowing users to list available PDFs and extract their content in Markdown format.Last updated -1MIT License