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
Documentation
CLDGeminiPDF MCP Server
A Model Context Protocol (MCP) server that enables Claude Desktop to analyze PDF documents using Google's AI models. This server sends PDF files & extracts text from PDFs by leveraging Gemini's powerful language understanding to provide intelligent analysis and insights.
Quick Start
1. Download: Get the pre-built JAR from Releases
2. API Key: Get your free Gemini API key from Google AI Studio
3. Configure: Add the server to your Claude Desktop config with the JAR path and API key
4. Analyze: Start analyzing PDFs with Claude!
Features
- PDF Analysis: Extract and analyze PDF content using Gemini AI models
- Multiple Model Support: Choose from various Gemini models (2.5, 2.0, 1.5 series, and Gemma models)
- Dual Processing Methods: Direct PDF upload to Gemini or fallback text extraction
- MCP Integration: Seamless integration with Claude Desktop via Model Context Protocol
- Flexible Configuration: Environment-based configuration for easy deployment
Prerequisites
- Java 11 or higher
- Maven (for building from source)
- Google AI Studio API Key (free at aistudio.google.com)
- Claude Desktop application
- **Filesystem MCP Server** (required dependency)
Installation
Option 1: Download Pre-built JAR (Recommended)
1. Download the latest `CLDGeminiPDF.v1.0.0.jar` from the Releases page
2. Save it to a convenient location on your system
Option 2: Build from Source
git clone
cd CLDGeminiPDF
mvn clean compile assembly:singleThis will create a JAR file with all dependencies included in the `target/` directory.
Get Your Gemini API Key
1. Visit Google AI Studio
2. Sign in with your Google account
3. Click "Get API Key" and create a new key
4. Copy the API key for use in environment variables
Claude Desktop Integration
1. Locate Claude Desktop Configuration
The configuration file location depends on your operating system:
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
- Linux: `~/.config/Claude/claude_desktop_config.json`
2. Update Configuration File
Add both the filesystem server and CLDGeminiPDF server to your `claude_desktop_config.json`:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/path/to/your/documents"
]
},
"CLDGeminiPDF": {
"command": "java",
"args": [
"-jar",
"/path/to/CLDGeminiPDF.v1.0.0.jar"
],
"env": {
"GEMINI_API_KEY": "your_api_key_here",
"GEMINI_MODEL": "gemini-2.0-flash"
}
}
}
}Important:
- Replace `/path/to/your/documents` with the directory containing your PDF files
- Replace `/path/to/CLDGeminiPDF.v1.0.0.jar` with the actual path to your downloaded JAR file
- Replace `your_api_key_here` with your actual Gemini API key
Example Paths:
- Windows: `"C:\\Users\\YourName\\Downloads\\CLDGeminiPDF.v1.0.0.jar"`
- macOS: `"/Users/YourName/Downloads/CLDGeminiPDF.v1.0.0.jar"`
- Linux: `"/home/yourusername/Downloads/CLDGeminiPDF.v1.0.0.jar"`
3. Restart Claude Desktop
Close and restart Claude Desktop for the changes to take effect.
Available Gemini Models
*Data for Free Tier Users of Google API*
| Model | Description | Limits |
|---|---|---|
| `gemini-2.5-flash-preview-05-20` | Latest preview with high performance | 10 RPM, 250K TPM |
| `gemini-2.5-flash-preview-04-17` | Previous preview version | 10 RPM, 250K TPM |
| `gemini-2.5-pro-preview-05-06` | Pro version with advanced capabilities | Limited availability |
| `gemini-2.0-flash` | Stable, fast model (default) | 15 RPM, 1M TPM |
| `gemini-2.0-flash-lite` | Lightweight version | 30 RPM, 1M TPM |
| `gemini-1.5-flash` | Stable general-purpose model | 15 RPM, 250K TPM |
| `gemini-1.5-pro` | Largest context window of 2M tokens | Unavailable for free tier users |
| `gemma-3 models` | Open models, up to 27B parameters | 30 RPM, 15K TPM |
*Model availability depends on your API key and usage tier. Check your Google AI Studio account for available models.*
*Data sourced from https://ai.google.dev/gemini-api/docs/rate-limits#free-tier*
Usage Examples
The CLDGeminiPDF MCP server requires the Filesystem MCP server to access PDF files. It works with complete file paths or by finding files within the allowed directory scope.
Note: Version 1.0.0 does NOT support drag-and-drop files in the chat interface. Files must be accessible through the filesystem server.
Once configured, you can use these commands in Claude Desktop:
Analyze a PDF with Full Path
Please analyze this research paper: file:///Users/username/Documents/research_paper.pdf
Focus on the methodology and conclusions.Find and Analyze a PDF by Name
Find the "research_paper.pdf" file in the Documents directory and analyze it using Gemini.List Available Models
What Gemini models are available for PDF analysis?Use a Specific Model
Analyze this contract using the gemini-2.5-pro model: file:///path/to/contract.pdf
Look for key terms and potential risks.Troubleshooting
Common Issues
1. "GEMINI_API_KEY environment variable is not set!"
2. "PDF file not found or not readable"
3. "Gemini API error: 401"
4. "Gemini API error: 429"
5. Filesystem server not working
Debugging
To enable detailed logging, you can modify the Java command in your configuration:
"args": [
"-Djava.util.logging.level=INFO",
"-jar",
"/path/to/CLDGeminiPDF.v1.0.0.jar"
]Verify Configuration
Test your setup by asking Claude Desktop:
List the available Gemini modelsIf successful, you should see a JSON response with available models and their capabilities.
Development
Building from Source
git clone
cd CLDGeminiPDF
mvn clean compile assembly:singleThe JAR file will be created in the `target/` directory.
Dependencies
- Jackson (JSON processing)
- Apache PDFBox (PDF text extraction)
- MCP Java SDK (Model Context Protocol)
- Java HTTP Client (API communication)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
For issues and questions:
- Check the troubleshooting section above
- Review Claude Desktop MCP documentation
- Check Google AI Studio API documentation
- Open an issue on this repository
Frequently asked questions
What is CLDGeminiPDF-Analyzer?
CLDGeminiPDF-Analyzer is 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
How do I install CLDGeminiPDF-Analyzer?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is CLDGeminiPDF-Analyzer open source?
Yes — it is hosted on GitHub at https://github.com/tfll37/CLDGeminiPDF-Analyzer and has 1 stars.
Related MCP tools
Plugin for JADX to integrate MCP server Java-based implementation. Trusted by 600+ developers. Trusted by 600+ developers.
🤖 The Semantic Engine for Model Context Protocol(MCP) Clients and AI Agents 🔥 Java-based implementation.
A powerful coding agent toolkit providing semantic retrieval and editing capabilities (MCP server & other integrations) Python-based implementation.
Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth! Python-based implementation. Trusted by 11000+ developers.
A middleware to provide an openAI compatible endpoint that can call MCP tools Python-based implementation. Trusted by 800+ developers.
Shell and coding agent on claude desktop app for the Model Context Protocol. Enhance AI assistants with powerful integrations. Python-based implementation.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP