Get the FREE Ultimate OpenClaw Setup Guide →

CLDGeminiPDF-Analyzer

MCP server for Claude Desktop allowing sharing files to Google's Gemini AI models via API for analysis and then response retrieval to Claude Desktop for further processing

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio tfll37-cldgeminipdf-analyzer java -jar /path/to/CLDGeminiPDF.v1.0.0.jar \
  --env GEMINI_MODEL="gemini-2.0-flash" \
  --env GEMINI_API_KEY="your_api_key_here"

How to use

The CLDGeminiPDF MCP Server enables Claude Desktop to analyze PDF documents by sending the PDF content to Google Gemini models and returning analyzed insights. It supports multiple Gemini models (e.g., gemini-2.5, gemini-2.0, gemini-1.5, and gemma variants) and can perform either direct PDF processing via Gemini or fallback to text extraction if needed. To use it, configure Claude Desktop to launch the CLDGeminiPDF server using the path to the JAR and provide your Gemini API key through environment variables. Once configured, you can tell Claude to analyze a PDF by referencing a file on the filesystem server or by providing a file URL, and you can request specific models or focus areas (methods, conclusions, risks) as part of your prompt. The server integrates with the existing Filesystem MCP server, so you’ll need both servers available for file access and processing.

How to install

Prerequisites:

  • Java 11 or higher
  • Maven (if building from source)
  • Google Gemini API key
  • Claude Desktop installed
  • Access to the Filesystem MCP server

Option A: Use pre-built JAR (recommended)

  1. Download CLDGeminiPDF.v1.0.0.jar from your releases page
  2. Place the JAR at a convenient path on your system
  3. Configure Claude Desktop to use the CLDGeminiPDF server (see mcp_config example) and set GEMINI_API_KEY and GEMINI_MODEL in the environment

Option B: Build from source

  1. Ensure Java and Maven are installed
  2. Clone the repository and navigate to the CLDGeminiPDF project
  3. Build the project:
git clone <your-repository-url>
cd CLDGeminiPDF
mvn clean compile assembly:single
  1. The JAR will be produced in the target/ directory. Use that JAR in your MCP configuration as shown in the mcp_config example.

Get Your Gemini API Key:

  1. Visit Google AI Studio
  2. Sign in and create a new API key
  3. Copy the key and add it to the CLDGeminiPDF configuration as GEMINI_API_KEY

Additional notes

Tips and common considerations:

  • Ensure the Gemini API key is valid and has access to the chosen models (e.g., gemini-2.0-flash).
  • The CLDGeminiPDF server relies on the Filesystem MCP server to access PDFs; confirm the filesystem path is accessible and permitted.
  • If you need to switch models, update the GEMINI_MODEL environment variable accordingly.
  • If debugging, you can add Java system properties to the command, e.g., "-Djava.util.logging.level=INFO" to increase log verbosity.
  • Keep the JAR and model availability in sync with Claude Desktop and the Gemini API limits in your account (watch RPM/TPM limits per model).
  • Version notes: drag-and-drop support may vary by release; ensure your workflow uses a path accessible by the filesystem server.

Related MCP Servers

Sponsor this space

Reach thousands of developers