PDF Memo MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
PDF Memo MCP Server
A Model Context Protocol (MCP) server that lets Claude (or any MCP client) work with your PDFs safely. It can list PDFs, extract highlights with their exact text, return raw notes/annotations, read specific pages, and show metadata—all strictly limited to the directories you allow.
Features
Annotation extraction: parse PDF annotations with sensible filtering (e.g., include
Highlight, Textby default; ignore noisyLink/Popupunless requested).Highlight→text mapping: map highlight quads/rects to the underlying page text.
Flexible page ranges:
first,last,N,S-E, or omit for all.Metadata: title, author, subject, creator/producer, creation/mod dates.
Configurable directories: allow multiple roots via positional args or repeated
--allow-dir.Safety: access limited to allowed directories, file size/extension checks.
Related MCP server: PDF Reader MCP Server
Requirements
Python 3.10+ (3.11 recommended)
pip install -r requirements.txt
PyPDF2>=3.0.0,<4
pdfplumber>=0.11.0,<0.12
mcp>=0.4.0Installation
# 1) Clone this repo
# Windows PowerShell / macOS / Linux
cd <your-workspace>
git clone <this-repo-url> pdf-memo-mcp
cd pdf-memo-mcp
# 2) (Optional) Create a virtualenv
python -m venv .venv
# Windows
. .venv\Scripts\Activate.ps1
# macOS/Linux
source .venv/bin/activate
# 3) Install dependencies
pip install -r requirements.txtRunning the server
You can pass allowed directories either as positional args or with --allow-dir (repeatable). If you pass none, the server falls back to defaults: ~/Downloads, ~/Desktop, ~/Documents, and the current working directory.
# Example: two directories (mixed platforms shown for clarity)
python main.py ~/Downloads C:\\Temp
# Same via explicit flags (repeatable)
python main.py --allow-dir ~/Downloads --allow-dir C:\\Temp
# Optional tuning
python main.py ~/Downloads --max-file-size 52428800 --log-level DEBUGTip (Windows): If you run into import issues while developing, ensure your repo root is on
PYTHONPATH, e.g.set PYTHONPATH=C:\\mcp-servers\\pdf-memo-mcp.
Claude Desktop integration
Create or update your claude_desktop_config.json to register this MCP server. Below is a minimal example.
{
"mcpServers": {
"pdf-memo": {
"command": "C:/Users/yong/AppData/Local/Programs/Python/Python311/python.exe",
"args": [
"C:/mcp-servers/pdf-memo-mcp/main.py",
"~/Downloads",
"C:/Temp"
],
"env": {
"PYTHONPATH": "C:/mcp-servers/pdf-memo-mcp"
}
}
}
}macOS/Linux variant:
{
"mcpServers": {
"pdf-memo": {
"command": "/usr/bin/python3",
"args": [
"/Users/you/mcp-servers/pdf-memo-mcp/main.py",
"~/Downloads",
"/Users/you/PDFs"
],
"env": {
"PYTHONPATH": "/Users/you/mcp-servers/pdf-memo-mcp"
}
}
}
}Notes
The server communicates over STDIO; Claude Desktop will handle transport automatically.
You can add/remove directories later by editing
argsand restarting Claude Desktop.
Available tools (names & typical usage)
extract_annotations(file_path, page_range=None, include_types="Highlight,Text", drop_empty=True)Return raw annotations as JSON. Useinclude_typesto includeLink, Popupif you really need them.extract_highlights_with_context(file_path, page_range=None, drop_empty=True)Return a JSON array of highlight contexts:{page, author, highlighted_text, note, position}.read_pdf_text(file_path, page_range=None)Return JSON withextracted_pages(page text & char counts) and basicmetadata.list_pdf_files(directory="all")Human‑readable list of PDFs under allowed directories.directoryfilters by basename substring.show_accessible_directories()JSON withaccessible_directories,directory_count,max_file_size_mb,allowed_extensions.
Page range examples
"first"→ first page"last"→ last page"3"→ page 3"10-20"→ pages 10 through 20 (inclusive)omit the argument → all pages
Quick start in Claude
Ask natural-language prompts like:
“List the PDFs you can see under C:\Temp.” →
list_pdf_files“What annotations are on page 162 of ‘Foo.pdf’?” →
extract_annotationswithpage_range: "162"“Show me the highlighted text for page 162.” →
extract_highlights_with_contextwithpage_range: "162"“Read the first page text and metadata.” →
read_pdf_textwithpage_range: "first"
Troubleshooting
ModuleNotFoundError: No module named 'pdf_memo'Ensure your repo root is onPYTHONPATH(see examples above) or runmain.pyfrom the repo root. This repo also injectssys.pathinmain.pyfor convenience.No highlights found
extract_highlights_with_contextonly returns Highlight annotations. If your file only has links/popups, useextract_annotationsand adjustinclude_types.Jumbled text in highlights The mapper prefers
QuadPointswhen present and falls back toRect. It first trieswithin_bbox().extract_text()and then a (y,x) word grouping heuristic. Some PDFs with complex layouts may still need tuning.
License
MIT License
Copyright (c) 2025 Yong Choi
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Extract text and metadata from PDFs; convert Markdown or text to PDF
Extract text, pages and metadata from PDFs in bulk, with OCR for scanned files.
Parse, extract, split, and ask over digital PDFs (text layer, no OCR) from Cursor and Claude.
Extract PDFs to Markdown, RAG chunks and cited tables; publish tracked Doc Links with read stats.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to securely read and extract information from PDF files including text content, metadata, and page counts from both local files and URLs within the project context.1529 npmMIT
- AlicenseAqualityDmaintenanceEnables reading, searching, and metadata extraction from PDF files without loading the entire content into the context window. It provides efficient tools for text cleaning, page-specific extraction, and context-aware search results.355 npm1MIT
- AlicenseAqualityAmaintenanceEnables AI agents to inspect and work with PDF files entirely on the local machine, covering page counts, metadata, layout, encryption permissions, scan-vs-text detection, and page rendering. Generated results land in a temporary workspace as short artifact ids that can be chained between tools and exported to real folders on request.1230 PyPI1Apache 2.0
- AlicenseAqualityBmaintenanceEnables a conversational workflow to read local PDFs, propose exact word-level passages, apply colored highlights, and inspect saved annotated copies, plus recolor or remove existing highlights. All PDF and image I/O stays confined to a single workspace directory, with fingerprint verification and atomic saves so originals are never overwritten.10MIT