A Model Context Protocol (MCP) server for reading and searching PDF files.
pip install git+https://github.com/bencode/pdf-reader-mcp.git@stable
claude mcp add pdf-reader pdf-reader-mcp
git clone https://github.com/bencode/pdf-reader-mcp.git
cd pdf-reader-mcp
./install.sh
# Run all tests
pytest tests/ -v
# Run tests with coverage
pytest tests/ --cov=pdf_reader_server
# Using uv
uv run pytest tests/ -v
# Using pip installation
mcp dev pdf_reader_server.py
# Or using the installed script
pdf-reader-mcp
Based on the Claude Code MCP documentation:
# For Option 1 (quick install) - already configured above ✅
# For Option 2 (development setup) - replace /absolute/path with your actual path
claude mcp add pdf-reader /absolute/path/increa-pdf-reader/.venv/bin/python /absolute/path/increa-pdf-reader/pdf_reader_server.py
The server provides these tools that Claude can use:
- open_pdf(path) - Open PDF and return doc_id
- page_count(doc_id) - Get number of pages
- extract_text(doc_id, page) - Extract text from page
- render_page_png(doc_id, page, dpi) - Render page as PNG
- search_text(doc_id, query, max_hits) - Search for text
- close_pdf(doc_id) - Close document