MCP server tool enabling sharing large PDF files to Google LLMs via API for further/additional analysis and response retrieval to Claude Desktop.
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.
CLDGeminiPDF.v1.0.0.jar
from the Releases pagegit clone <your-repository-url>
cd CLDGeminiPDF
mvn clean compile assembly:single
This will create a JAR file with all dependencies included in the target/
directory.
The configuration file location depends on your operating system:
%APPDATA%\Claude\claude_desktop_config.json
~/Library/Application Support/Claude/claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
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:
/path/to/your/documents
with the directory containing your PDF files/path/to/CLDGeminiPDF.v1.0.0.jar
with the actual path to your downloaded JAR fileyour_api_key_here
with your actual Gemini API key"C:\\Users\\YourName\\Downloads\\CLDGeminiPDF.v1.0.0.jar"
"/Users/YourName/Downloads/CLDGeminiPDF.v1.0.0.jar"
"/home/yourusername/Downloads/CLDGeminiPDF.v1.0.0.jar"
Close and restart Claude Desktop for the changes to take effect.
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
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:
Please analyze this research paper: file:///Users/username/Documents/research_paper.pdf
Focus on the methodology and conclusions.
Find the "research_paper.pdf" file in the Documents directory and analyze it using Gemini.
What Gemini models are available for PDF analysis?
Analyze this contract using the gemini-2.5-pro model: file:///path/to/contract.pdf
Look for key terms and potential risks.
"GEMINI_API_KEY environment variable is not set!"
"PDF file not found or not readable"
"Gemini API error: 401"
"Gemini API error: 429"
Filesystem server not working
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"
]
Test your setup by asking Claude Desktop:
List the available Gemini models
If successful, you should see a JSON response with available models and their capabilities.
git clone <your-repository-url>
cd CLDGeminiPDF
mvn clean compile assembly:single
The JAR file will be created in the target/
directory.
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.
This project is licensed under the MIT License - see the LICENSE file for details.
For issues and questions: