CLDGeminiPDF Analyzer MCP Server for Google LLMs
Share large PDFs to Google LLMs via MCP server for CLDGeminiPDF analysis, enabling API-based deeper insights and response retrieval to Claude Desktop.
Overview
The CLDGeminiPDF Analyzer MCP Server is a lightweight bridge that enables sharing large PDF documents with Google LLMs for deep analysis, and exposing the results back to client tools such as Claude Desktop via the Model Context Protocol (MCP). It is intended for workflows where PDFs exceed prompt/window constraints or where you want an API-based pipeline: upload a PDF, run CLDGeminiPDF-style document parsing and semantic extraction with Google models, then retrieve summarized insights or passages through MCP-compatible clients.
This server is useful for teams that need programmatic PDF ingestion, preprocessing, indexing, and LLM-driven analysis while keeping a simple HTTP API surface. It centralizes storage and analysis, manages context windows, and exposes endpoints that can be polled or pushed to an MCP consumer (for example, Claude Desktop), so you can integrate large-document reasoning into chat assistants, research tooling, or automated QA systems.
Features
- Upload and store large PDFs reliably (chunking and streaming supported)
- Run CLDGeminiPDF-style analysis using Google LLMs (configurable model and parameters)
- Expose analysis results and passages via an HTTP API
- MCP-compatible push or handshake endpoints to send context/results to MCP consumers
- Configurable storage backend and file retention
- Simple auth options (API key / token)
- Docker support for easy deployment
Installation / Configuration
Prerequisites:
- Docker (recommended) or Python/Node runtime depending on the distribution
- Google Cloud credentials or API key for Google LLM access
- Optional: MCP consumer endpoint (e.g., Claude Desktop or another MCP listener)
Clone the repository:
Docker (quick start):
# build
# run (example)
Local (example using Python virtualenv):
# set environment variables
# run server
Example environment variables (replace with your values):
GOOGLE_API_KEY=ya29.your_google_api_key
GOOGLE_MODEL=gpt-4o-mini (or gemini-pro if available)
SERVER_API_KEY=change-this-to-secure-value
STORAGE_PATH=/var/lib/cldgemini/uploads
MCP_CALLBACK_URL=http://localhost:5003/mcp/receive
MAX_FILE_SIZE_MB=500
Security note: store API keys securely (secrets manager or environment injection) and restrict access to the server with network-level controls.
Available Resources
The server exposes a concise REST API to manage uploads, analysis jobs, and MCP interactions. Example endpoints:
| Method | Path | Description |
|---|---|---|
| POST | /upload | Upload a PDF file (multipart/form-data) |
| GET | /documents | List stored documents and metadata |
| GET | /documents/{id} | Download original PDF |
| POST | /analyze | Start analysis job for a document (returns job id) |
| GET | /results/{job_id} | Fetch analysis results, summaries, chunks |
| POST | /mcp/handshake | Optional: register or handshake with MCP consumer |
| POST | /mcp/push | Push generated context or answer to MCP endpoint |
Sample upload (curl):
Start an analysis job:
Fetch results:
Push to MCP consumer:
Use Cases
Researcher summarization: A researcher uploads a 300+ page report. The server breaks the PDF into semantic chunks, runs topic extraction and a hierarchical summary with a Google model, and returns a concise executive summary plus per-chapter highlights. The researcher requests the report via the web UI or fetches a summary via the API.
Claude Desktop integration: An analyst uses Claude Desktop and wants to reference long PDFs during a chat. The MCP server pushes a summarized context or relevant passages into Claude Desktop via MCP so the assistant can answer with document-aware context without re-uploading large files directly to the chat client.
Automated QA and compliance scanning: A compliance pipeline uploads batches of contracts. The server runs clause extraction and risk-flagging tasks, stores structured outputs (clauses, risk scores), and notifies downstream systems via MCP callbacks or webhooks for triage.
Enterprise document search: Index many PDFs using CLDGeminiPDF-style embeddings