nano-pdf-mcp
AI-powered PDF editing and generation MCP server using Gemini Pro.
MCP 服务配置
复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用
{
"mcpServers": {
"docker.io/taibennett/nano-pdf-mcp": {
"args": [
"run",
"-i",
"--rm",
"docker.io/taibennett/nano-pdf-mcp:0.1.0"
],
"command": "docker"
}
}
}
可用工具 (5 个)
该服务在 MCP 协议中暴露的工具,AI 可按需调用
tavily_search 14 个参数 需填 1 项
Search the web for current information on any topic. Use for news, facts, or data beyond your knowledge cutoff. Returns snippets and source URLs.
必填参数:query
tavily_extract 6 个参数 需填 1 项
Extract content from URLs. Returns raw page content in markdown or text format.
必填参数:urls
tavily_crawl 11 个参数 需填 1 项
Crawl a website starting from a URL. Extracts content from pages with configurable depth and breadth.
必填参数:url
tavily_map 8 个参数 需填 1 项
Map a website's structure. Returns a list of URLs found starting from the base URL.
必填参数:url
tavily_research 2 个参数 需填 1 项
Perform comprehensive research on a given topic or question. Use this tool when you need to gather information from multiple sources to answer a question or complete a task. Returns a detailed response based on the research findings.
必填参数:input
服务介绍
<!- - mcp-name: io.github.R09722akaBennett/nano-pdf-mcp - ->
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]
Changeusernameto 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