MCP ExplorerExplorer

Pdf Reader Mcp

@ivanvanderbylon 22 days ago
1 MIT
FreeCommunity
AI Systems
A simple MCP server for reading PDFs in Claude Code

Overview

What is Pdf Reader Mcp

pdf-reader-mcp is a Model Context Protocol (MCP) server designed for reading and analyzing PDF documents using Google’s Gemini API. It facilitates AI assistants like Claude and Cursor to read, extract, and analyze PDF content directly from their interfaces.

Use cases

Use cases include extracting text from legal documents, analyzing research papers for specific data, searching for keywords in educational materials, and enabling AI assistants to provide insights from PDF reports.

How to use

To use pdf-reader-mcp, install it via Homebrew, from source, or download pre-built binaries. Once installed, integrate it with Claude Code by following the setup instructions provided in the README.

Key features

Key features include direct PDF access without manual conversion, advanced AI analysis using Gemini’s vision capabilities, text extraction from PDFs, content search within documents, seamless integration with AI assistants, and simple installation methods.

Where to use

pdf-reader-mcp can be used in various fields such as education for document analysis, legal for reviewing contracts, research for extracting data from academic papers, and any domain requiring PDF content extraction and analysis.

Content

PDF Reader MCP Server

A Model Context Protocol (MCP) server for reading and analyzing PDF documents using Google’s Gemini API, written in Go. This server enables AI assistants like Claude (Code and Desktop) and Cursor to seamlessly read, extract, and analyze PDF content directly from their interfaces.

Description

The PDF Reader MCP Server acts as a bridge between AI assistants and PDF documents, allowing them to:

  1. Read and extract text from PDF files using the pdf_read tool
  2. Analyze PDF content with Gemini’s powerful vision capabilities using the pdf_analyze tool
  3. Search within PDF documents for specific information using the pdf_search tool

This integration lets AI assistants like Claude access and understand PDF content without leaving their interface, creating a seamless experience for document analysis and information extraction.

Key Benefits

  • Direct PDF access: Read and analyze PDF documents without manual conversion
  • Advanced AI analysis: Leverage Gemini’s vision and language models for deep document understanding
  • Text extraction: Extract structured and unstructured text from PDFs
  • Content search: Search for specific information within PDF documents
  • Seamless integration: Works natively with Claude Code, Claude Desktop, and Cursor
  • Simple installation: Quick setup with Homebrew, Go, or pre-built binaries

Installation

Using Homebrew (macOS and Linux)

brew tap alcova-ai/tap
brew install pdf-reader-mcp

From Source

Clone the repository and build manually:

git clone https://github.com/Alcova-AI/pdf-reader-mcp.git
cd pdf-reader-mcp
go build -o pdf-reader-mcp-server .

From Binary Releases (Other platforms)

Download pre-built binaries from the releases page.

Usage

This server supports only the stdio protocol for MCP communication.

Setup with Claude Code

Adding to Claude Code:

claude mcp add-json --scope user pdf-reader-mcp '{"type":"stdio","command":"pdf-reader-mcp","env":{"GEMINI_API_KEY":"YOUR-GEMINI-API-KEY-HERE"}}'

That’s it! You can now read and analyze PDFs in Claude Code.

Setup with Claude Desktop

Adding to Claude Desktop:

  1. Edit the Claude Desktop MCP config:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
  1. Add the PDF Reader MCP server:
  {
    "mcpServers": {
+        "pdf-reader-mcp": {
+            "command": "pdf-reader-mcp",
+            "args": [
+                "--model",
+                "gemini-1.5-flash"
+            ],
+            "env": {
+                "GEMINI_API_KEY": "YOUR-GEMINI-API-KEY-HERE"
+            }
+        }
    }
  }

Command Line Options

  • --model, -m: Specify the Gemini model to use for PDF analysis (default: “gemini-1.5-flash”)
    • Can also be set with the GEMINI_MODEL environment variable
  • --max-pages: Maximum number of pages to process at once (default: 10)
  • --temp-dir: Directory for temporary file storage (default: system temp)

Example:

pdf-reader-mcp --model gemini-1.5-pro --max-pages 20

Direct Execution

If you want to run the server directly (not recommended for most users):

  1. Set your Gemini API key as an environment variable:

    export GEMINI_API_KEY=your-api-key-here
    
  2. Run the server:

    pdf-reader-mcp
    

License

MIT

Tools

No tools

Comments