Provides tools for reading and extracting text from PDF files, supporting both local files and URLs.
A Model Context Protocol (MCP) server that provides tools for reading and extracting text from PDF files, supporting both local files and URLs.
Philip Van de Walker
Email: philip.vandewalker@gmail.com
GitHub: https://github.com/trafflux
git clone https://github.com/trafflux/pdf-reader-mcp.git cd pdf-reader-mcp
docker build -t mcp/pdf-reader .
To run the server with access to local PDF files:
docker run -i --rm -v /path/to/pdfs:/pdfs mcp/pdf-reader
Replace /path/to/pdfs
with the actual path to your PDF files directory.
If not using local PDF files:
docker run -i --rm mcp/pdf-reader
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": [] } } }
read_local_pdf
{ "path": "/pdfs/document.pdf" }
{ "success": true, "data": { "text": "Extracted content..." } }
read_pdf_url
{ "url": "https://example.com/document.pdf" }
{ "success": true, "data": { "text": "Extracted content..." } }
The server handles various error cases with clear error messages:
Error responses follow the format:
{ "success": false, "error": "Detailed error message" }
.
├── Dockerfile # Container configuration
├── README.md # This documentation
├── requirements.txt # Python dependencies
└── src/
├── __init__.py # Package initialization
└── server.py # Main server implementation
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.0
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.
Contributions are welcome! Please feel free to submit a Pull Request.
For questions, issues, or contributions, please contact Philip Van de Walker:
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!