✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more

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

  1. Clone the repository:
git clone https://github.com/trafflux/pdf-reader-mcp.git
cd pdf-reader-mcp
  1. Build 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-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

MCP 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

  1. read_local_pdf

    • Purpose: Read text content from a local PDF file
    • Input:
      {
        "path": "/pdfs/document.pdf"
      }
      
    • Output:
      {
        "success": true,
        "data": {
          "text": "Extracted content..."
        }
      }
      
  2. 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:

{
  "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 implementation

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

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.

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

PDF Reader

Project Details

Recomended MCP Servers

Kubernetes Operations Manager
Kubernetes Operations Manager

kom 是一个用于 Kubernetes 操作的工具,SDK级的kubectl、client-go的使用封装。并且支持作为管理k8s 的 MCP server。 它提供了一系列功能来管理 Kubernetes 资源,包括创建、更新、删除和获取资源,甚至使用SQL查询k8s资源。这个项目支持多种 Kubernetes 资源类型的操作,并能够处理自定义资源定义(CRD)。 通过使用 kom,你可以轻松地进行资源的增删改查和日志获取以及操作POD内文件等动作。

🧩
NS Travel Information Server

A Model Context Protocol (MCP) server that provides access to NS (Dutch Railways) travel information through Claude AI....

TikTok Integration
TikTok Integration

Model Context Protocol (MCP) with TikTok integration

Oxylabs MCP
Oxylabs MCP

Official Oxylabs MCP integration

🧩
MCP Montano Server

Simple MCP Server Implementation

🧩
HubSpot CRM Integration Server

A Model Context Protocol (MCP) server that enables AI assistants to interact with HubSpot CRM data, providing built-in...

Ghost MCP Server
Ghost MCP Server

A Model Context Protocol (MCP) server for interacting with Ghost CMS through LLM interfaces like Claude. Allow you...

🧩
mcp-omnisearch

🔍 A Model Context Protocol (MCP) server providing unified access to multiple search engines (Tavily, Brave, Kagi), AI...

Atlassian Integration Server
Atlassian Integration Server

MCP server for Atlassian tools (Confluence, Jira)

Trieve
Trieve

All-in-one infrastructure for search, recommendations, RAG, and analytics offered via API

Memory Bank Server
Memory Bank Server

A Model Context Protocol (MCP) server implementation for remote memory bank management, inspired by Cline Memory Bank.

OpenAI WebSearch Server
OpenAI WebSearch Server

openai websearch tool as mcp server

Featured Templates

View More
Customer service
Multi-language AI Translator
136 921
Verified Icon
AI Agents
AI Chatbot Starter Kit
1336 8300 5.0
AI Engineering
Python Bug Fixer
119 1433
AI Assistants
Image to text with Claude 3
151 1366

Start your free trial

Build your solution today. No credit card required.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.