Skip to main content
Glama

PDF MCP Server

An MCP server that enables reading PDF file contents, allowing PDF documents to be used as a knowledge base for LLMs.

Features

  • High-Quality Extraction: Uses marker-pdf (via a Python backend) to extract text with layout awareness and high-fidelity LaTeX equation recognition.

  • Robust Fallback: Automatically switches to a Node.js-based parser (pdf-parse) if the Python environment is unavailable or fails, ensuring extraction always succeeds (albeit with lower formatting quality).

  • Smart Filtering: Supports page range extraction to process only relevant sections of large documents.

Related MCP server: PDF Reader MCP Server

Installation

Prerequisites

  • Node.js (v18+)

  • Python (v3.10+) and pip (for high-quality extraction)

Setup

  1. Install Node.js dependencies:

    npm install
  2. Install Python dependencies (Recommended): To enable high-quality extraction (especially for scientific papers with math), install the Python dependencies.

    # Create or activate a virtual environment if desired
    python3 -m pip install -r python/requirements.txt

    Note: The first time you run the tool with the Python backend, it will download necessary AI models (OCR, layout analysis, etc.) to a local cache. This download is approximately 3.3GB. Ensure you have a stable internet connection.

  3. Build the server:

    npm run build

Usage

Configuration for Claude/MCP Clients

Add this to your MCP settings configuration:

{
  "mcpServers": {
    "pdf-reader": {
      "command": "node",
      "args": ["/absolute/path/to/mcpPdf/dist/index.js"],
      "env": {
         // Optional: Override where python is found if not in venv or path
         // "PYTHON_PATH": "/path/to/python" 
      }
    }
  }
}

Tool: read_pdf

Reads and extracts text content from a PDF file.

Inputs:

  • path (string): Absolute path to the PDF file.

  • start_page (number, optional): Starting page number (1-based).

  • end_page (number, optional): Ending page number (1-based).

How it works:

  1. Attempt 1 (Python/Marker): The server tries to run the internal convert.py script.

    • If successfully configured, this loads the marker models from the local cache (.cache directory in the project).

    • It accurately converts equations to LaTeX and preserves document structure.

  2. Attempt 2 (Fallback): If the Python script fails (e.g., missing dependencies, runtime error), the server catches the error and uses pdf-parse (a native Node.js library).

    • This extracts raw text. Equations may appear as linearized text, and layout may be less preserved.

Troubleshooting

  • Permission Errors: The project is configured to use a local .cache directory for models to avoid system permission issues. If you encounter errors, ensure the project directory is writable.

  • Slow Performance: The high-quality extraction uses deep learning models. It can be slow on large documents without a GPU. Use the start_page and end_page arguments to extract only what you need.

Available Tools

1 tool
read_pdfRead PDF ContentA

Read and extract text content from a PDF file. Uses a Python backend (marker-pdf) to preserve mathematical notations (LaTeX) and layout structure. Best for scientific papers.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the PDF file
start_pageNoStart page (1-based)
end_pageNoEnd page (1-based)

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds valuable context about the backend ('Uses a Python backend (marker-pdf)') and its capabilities ('preserve mathematical notations (LaTeX) and layout structure'), which helps the agent understand the tool's behavior beyond basic functionality. However, it does not mention error handling, performance characteristics, or output format details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, with three concise sentences that each add value: the core functionality, technical details, and usage context. There is no wasted text, and it efficiently communicates essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 parameters, no output schema, no annotations), the description is somewhat complete but has gaps. It covers purpose and backend details but lacks information on output format, error conditions, or performance limits. Without an output schema, the agent is left uncertain about what the tool returns, which is a significant omission for a read operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description does not add any additional meaning or context about the parameters beyond what the schema provides, such as explaining the significance of page ranges or path requirements. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Read and extract text content') and resource ('from a PDF file'), with additional detail about the backend and target use case ('Best for scientific papers'). It distinguishes itself by mentioning preservation of mathematical notations and layout structure, which is valuable even without sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context ('Best for scientific papers') but does not provide explicit guidance on when to use this tool versus alternatives, nor does it mention any prerequisites or exclusions. With no sibling tools, the bar is lower, but it lacks comprehensive usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A3.8/5.0
Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools, as there are no other tools to compare it to. The tool's purpose is clearly defined and distinct by default.

Naming Consistency5/5

The single tool name follows a clear verb_noun pattern (read_pdf), and since there is only one tool, consistency is inherently perfect with no deviations or mixing of conventions.

Tool Count2/5

A single tool is too few for a server named 'PDF MCP Server', which suggests a broader scope for PDF operations. While the tool is useful, the server lacks basic operations like merging, splitting, or converting PDFs, making it feel incomplete and under-scoped.

Completeness2/5

The server is severely incomplete for PDF processing; it only offers text extraction but misses essential operations such as creating, editing, merging, splitting, or converting PDFs. This creates significant gaps that will limit agent capabilities in handling PDF workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables processing and analysis of large PDF files through text extraction, search functionality, and intelligent chunking strategies. Provides comprehensive PDF operations including metadata retrieval, page-range text extraction, and content search with contextual results.
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI-driven PDF document processing including PDF to Markdown conversion, intelligent text and table extraction, image extraction, format conversion between PDF/Word/Markdown, batch processing, and fuzzy search - optimized for LLM context and RAG workflows.
    2
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI applications to read and process PDF files with intelligent file search, text extraction, image processing, and optional OCR support for scanned documents.
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wowuz/mcpPdf'

If you have feedback or need assistance with the MCP directory API, please join our Discord server