io.github.R09722akaBennett/nano-pdf-mcp

io.github.R09722akaBennett/nano-pdf-mcp

Enables AI-powered PDF editing and generation via natural language prompts using Google Gemini, with local storage and OCR for searchable text.

Category
Visit Server

README

<!-- 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] Change username to your actual macOS username. Ensure the --directory path is the absolute path to your mcp-server folder.

📖 Usage Guide

For detailed tool descriptions and workflow examples, please refer to the Usage Guide.

Core Workflow

  1. Open PDF: open_pdf(pdf_path="/path/to/document.pdf")
  2. 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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured