NanoPDF
AI-powered PDF editing and generation MCP server using Gemini Pro.
Que pouvez-vous faire avec NanoPDF ?
- AI-Driven Editing: Modify PDF slides using natural language prompts.
- Smart Generation: Create new, visually consistent slides after any page.
- Visual Previews: View specific PDF pages as high-quality images.
- Privacy First: All versioning and temporary files are stored locally on your machine.
- State Preservation: Uses Tesseract OCR to maintain searchable text layers in AI-generated pages.
- Version Control: Built-in undo functionality for safe experimentation.
Installation
Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).
docker.io/taibennett/nano-pdf-mcp:0.1.0claude mcp add nanopdf -e 'GEMINI_API_KEY=<your gemini_api_key>' -- docker run -i --rm docker.io/taibennett/nano-pdf-mcp:0.1.0
{
"mcpServers": {
"nanopdf": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/taibennett/nano-pdf-mcp:0.1.0"
],
"env": {
"GEMINI_API_KEY": "<your gemini_api_key>"
}
}
}
}
Variables d'environnement
GEMINI_API_KEYobligatoire secret Google AI Studio API key for Gemini Pro
Documentation
Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.
Sommaire
NanoPDF MCP Server
NanoPDF MCP Server is a Model Context Protocol (MCP) implementation that brings AI-powered PDF editing and generation capabilities directly to Claude Desktop. It enables users to modify existing PDF pages or generate new ones using Google's Gemini 3 Pro model, all within a privacy-focused local environment.
🚀 Key Features
- AI-Driven Editing: Modify PDF slides using natural language prompts.
- Smart Generation: Create new, visually consistent slides after any page.
- Visual Previews: View specific PDF pages as high-quality images.
- Privacy First: All versioning and temporary files are stored locally on your machine.
- State Preservation: Uses Tesseract OCR to maintain searchable text layers in AI-generated pages.
- Version Control: Built-in undo functionality for safe experimentation.
📋 Prerequisites
System Dependencies
The server requires poppler (for PDF rendering) and tesseract (for OCR) installed on your system.
- macOS (Homebrew):
brew install poppler tesseract - Ubuntu/Debian:
sudo apt-get install poppler-utils tesseract-ocr
Environment Variables
A Google Gemini API key is required to power the AI features.
GEMINI_API_KEY: Your Google AI Studio API key.
🛠️ Installation & Setup
1. Development Environment
This project uses uv for lightning-fast Python package management.
# Navigate to the server directory
cd mcp-server
# Install dependencies
uv sync
2. Configure Claude Desktop
Add the NanoPDF server to your Claude Desktop configuration:
Path: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"nanopdf": {
"command": "/Users/username/.local/bin/uv", # replace with your uv path
"args": [
"run",
"--directory",
"/Users/username/nano-pdf-mcp/mcp-server", # replace with your mcp-server path
"server.py"
]
}
}
}
[!IMPORTANT] Change
usernameto your actual macOS username. Ensure the--directorypath is the absolute path to yourmcp-serverfolder.
📖 Usage Guide
For detailed tool descriptions and workflow examples, please refer to the Usage Guide.
Core Workflow
- Open PDF:
open_pdf(pdf_path="/path/to/document.pdf") - Edit/Add:
edit_pdf_page(session_id="...", page_number=1, prompt="...")
📂 Project Structure
mcp-server/: Core MCP server implementation.server.py: Main entry point and tool definitions.mcp_pdf_utils.py: PDF processing, OCR, and rendering logic.mcp_ai_utils.py: Gemini Pro Vision API integration.history_manager.py: Local session and version history tracker.output/: Local storage for sessions and previews.
LICENSE: Project license (MIT).USAGE.md: Detailed usage instructions and examples.
🤝 Acknowledgements
Based on the original NanoPDF project. Adapted for the Model Context Protocol.
📄 License
MIT License
Questions fréquentes
Qu'est-ce que NanoPDF ?
AI-powered PDF editing and generation MCP server using Gemini Pro.
Comment installer NanoPDF ?
Il s'exécute sur votre machine. Dans Claude Code : claude mcp add nanopdf -e 'GEMINI_API_KEY=<your gemini_api_key>' -- docker run -i --rm docker.io/taibennett/nano-pdf-mcp:0.1.0. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.
Faut-il une clé API pour NanoPDF ?
Oui. Il attend GEMINI_API_KEY, à renseigner dans sa configuration.
NanoPDF est-il open source ?
Son code est public sur GitHub, mais le dépôt ne déclare pas de licence standard.
Qui maintient NanoPDF ?
Il est publié par R09722akaBennett. AI.tn le référence sans le maintenir ni le recommander.
Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.