ivanvanderbyl/pdf-reader-mcp
If you are the rightful owner of pdf-reader-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The PDF Reader MCP Server is a tool for reading and analyzing PDF documents using Google's Gemini API, enabling AI assistants to seamlessly interact with PDF 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:
- Read and extract text from PDF files using the
pdf_read
tool - Analyze PDF content with Gemini's powerful vision capabilities using the
pdf_analyze
tool - 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:
- Edit the Claude Desktop MCP config:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
- 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
- Can also be set with the
--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):
-
Set your Gemini API key as an environment variable:
export GEMINI_API_KEY=your-api-key-here
-
Run the server:
pdf-reader-mcp
License
MIT