PDF Reader MCP Server
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.
Click on "Deploy 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., "@PDF Reader MCP Serverread the PDF at /pdfs/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.
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
Related MCP server: PDF Reader MCP Server
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:
git clone https://github.com/trafflux/pdf-reader-mcp.git
cd pdf-reader-mcpBuild the Docker image:
docker build -t mcp/pdf-reader .Usage
Running the Server
To run the server with access to local PDF files:
docker run -i --rm -v /path/to/pdfs:/pdfs mcp/pdf-readerReplace /path/to/pdfs with the actual path to your PDF files directory.
If not using local PDF files:
docker run -i --rm mcp/pdf-readerMCP Configuration
Add to your MCP settings configuration:
{
"mcpServers": {
"pdf-reader": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/path/to/pdfs:/pdfs",
"mcp/pdf-reader"
],
"disabled": false,
"autoApprove": []
}
}
}Without local file PDF files:
{
"mcpServers": {
"pdf-reader": {
"command": "docker",
"args": ["run", "-i", "--rm", "mcp/pdf-reader"],
"disabled": false,
"autoApprove": []
}
}
}Available Tools
read_local_pdfPurpose: Read text content from a local PDF file
Input:
{ "path": "/pdfs/document.pdf" }Output:
{ "success": true, "data": { "text": "Extracted content..." } }
read_pdf_urlPurpose: 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:
{
"success": false,
"error": "Detailed error message"
}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
.
├── Dockerfile # Container configuration
├── README.md # This documentation
├── requirements.txt # Python dependencies
└── src/
├── __init__.py # Package initialization
└── server.py # Main server implementationLicense
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
http://www.apache.org/licenses/LICENSE-2.0Unless 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 deployed
Maintenance
Related MCP Connectors
PDF URLs to per-page text, tables as rows, Markdown, metadata and OCR for scanned pages.
Extract text, tables and metadata from every PDF linked in a dataset, CSV or Google Sheet.
Extract tables, text and formulas from PDFs, including scanned pages and broken text layers.
Generate and read PDFs for AI agents: a generate_pdf and a read_pdf tool, priced per document.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables reading and extracting text content from PDF files, supporting both local file system access and remote PDF URLs with automatic encoding detection.2-
- FlicenseAqualityDmaintenanceEnables reading and extracting content from PDF documents including text (as Markdown), images, tables, and metadata from both local files and URLs, with OCR support for scanned documents.2-
- AlicenseAqualityDmaintenanceEnables AI agents to securely read and extract information from PDF files including text content, metadata, and page counts from both local files and URLs within the project context.11,813 npmMIT
- AlicenseAqualityDmaintenanceEnables reading, searching, and metadata extraction from PDF files without loading the entire content into the context window. It provides efficient tools for text cleaning, page-specific extraction, and context-aware search results.344 npm1MIT