- Home
- MCP servers
- PDF Reader
PDF Reader
- python
43
GitHub Stars
python
Language
4 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"trafflux-pdf-reader-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/path/to/pdfs:/pdfs",
"mcp/pdf-reader"
]
}
}
}You can run a MCP server that reads and extracts text from PDF files, whether you point it at local PDFs or PDF URLs. It returns structured JSON data and handles common PDF errors, making it easy to build tools that process documents automatically.
How to use
You interact with the PDF Reader MCP Server by starting it in a way that gives it access to your PDFs and then sending it read requests from your MCP client. Use the local file mode when your PDFs live on the same machine, and use the URL mode to fetch PDFs from remote locations. Each request returns a standardized JSON response with either the extracted text or an error message.
How to install
Prerequisites You need Docker installed on your machine. You also should have access to the path where your PDFs will be stored if you plan to use the local file mode.
Install and run the MCP image locally to expose the server for your MCP client.
Configuration and runtime examples
{
"mcpServers": {
"pdf_reader_local": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v",
"/path/to/pdfs:/pdfs",
"mcp/pdf-reader"
],
"disabled": false,
"autoApprove": []
}
}
}
{
"mcpServers": {
"pdf_reader_remote": {
"command": "docker",
"args": ["run","-i","--rm","mcp/pdf-reader"],
"disabled": false,
"autoApprove": []
}
}
}
How the server handles errors and outputs
If a PDF is invalid or corrupt, missing, or cannot be fetched due to network issues, the server returns a clear error message in JSON. Successful reads include the extracted text under data.text.
Tools and capabilities referenced by this server
The MCP server provides two endpoints for extracting text: read_local_pdf and read_pdf_url. Each returns a JSON payload with a success flag and the extracted text or an error message.
Available tools
read_local_pdf
Read text content from a local PDF file. Returns a JSON object with the extracted text.
read_pdf_url
Read text content from a PDF available at a URL. Returns a JSON object with the extracted text.