NanoPDF

AI 与智能体

by r09722akabennett

基于 Gemini Pro 的 AI PDF 编辑与生成 MCP Server,适合文档处理与内容创建。

什么是 NanoPDF

基于 Gemini Pro 的 AI PDF 编辑与生成 MCP 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):
    bash
    brew install poppler tesseract
    
  • Ubuntu/Debian:
    bash
    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.

bash
# 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

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

常见问题

NanoPDF 是什么?

基于 Gemini Pro 的 AI PDF 编辑与生成 MCP Server,适合文档处理与内容创建。

相关 Skills

Claude接口

by anthropics

Universal
热门

面向接入 Claude API、Anthropic SDK 或 Agent SDK 的开发场景,自动识别项目语言并给出对应示例与默认配置,快速搭建 LLM 应用。

想把Claude能力接进应用或智能体,用claude-api上手快、兼容Anthropic与Agent SDK,集成路径清晰又省心

AI 与智能体
未扫描171.4k

RAG架构师

by alirezarezvani

Universal
热门

聚焦生产级RAG系统设计与优化,覆盖文档切块、检索链路、索引构建、召回评估等关键环节,适合搭建可扩展、高准确率的知识库问答与检索增强应用。

面向RAG落地,把知识库、向量检索和生成链路系统串联起来,做架构设计时更清晰,也更少踩坑。

AI 与智能体
未扫描24.9k

多智能体架构

by alirezarezvani

Universal
热门

聚焦多智能体系统架构设计,梳理 Supervisor、Swarm、分层和 Pipeline 等模式,覆盖角色定义、通信协作与性能评估,适合规划稳健可扩展的 AI agent 编排方案。

帮你系统解决多智能体应用的架构设计与协同编排难题,适合构建复杂 AI 工作流,成熟度高、社区认可也很亮眼。

AI 与智能体
未扫描24.9k

相关 MCP Server

知识图谱记忆

编辑精选

by Anthropic

热门

Memory 是一个基于本地知识图谱的持久化记忆系统,让 AI 记住长期上下文。

帮 AI 和智能体补上“记不住”的短板,用本地知识图谱沉淀长期上下文,连续对话更聪明,数据也更可控。

AI 与智能体
89.7k

顺序思维

编辑精选

by Anthropic

热门

Sequential Thinking 是让 AI 通过动态思维链解决复杂问题的参考服务器。

这个服务器展示了如何让 Claude 像人类一样逐步推理,适合开发者学习 MCP 的思维链实现。但注意它只是个参考示例,别指望直接用在生产环境里。

AI 与智能体
89.2k

by deusdata

热门

持久化的代码库知识图谱,可跨会话保留上下文,在 session 重启或上下文压缩后仍能继续使用。

专治 AI 编程助手“会话失忆”,把代码库沉淀为持久知识图谱,重启或压缩上下文后也能无缝续上开发状态。

AI 与智能体
37.3k

评论