MCP server for analyzing PDF documents using Gemini API
npm install @intelligentelectron/pdf-analyzerThe PDF Analyzer MCP Server gives AI agents the ability to read and
analyze PDF documents, enabling document Q&A through natural conversations.
Powered by Google's Gemini API. You'll need a free API key from Google AI Studio.
macOS / Linux:
``bash`
curl -fsSL https://raw.githubusercontent.com/IntelligentElectron/pdf-analyzer/main/install.sh | bash
Windows (PowerShell):
`powershell`
irm https://raw.githubusercontent.com/IntelligentElectron/pdf-analyzer/main/install.ps1 | iex
Why use the native installer:
- No dependencies — standalone binary, no Node.js required
- Auto-updates — checks for updates on startup
- Signed binaries — macOS binaries are notarized by Apple
| Platform | Install Directory |
|----------|-------------------|
| macOS | ~/Library/Application Support/pdf-analyzer/ |~/.pdf-analyzer/
| Linux | |%LOCALAPPDATA%\pdf-analyzer\
| Windows | |
The server checks for updates on startup. To update manually:
`bash`
pdf-analyzer --update
For developers who prefer npm:
`bash`
npm install -g @intelligentelectron/pdf-analyzer
Or use with npx (no installation required):
`bash`
npx @intelligentelectron/pdf-analyzer --help
Requires Node.js 20+.
To update:
`bash`
npm update -g @intelligentelectron/pdf-analyzer
1. Go to Google AI Studio
2. Create a new API key (free tier available)
3. Copy your API key, we will use it to setup the MCP in the next section
After installing the MCP with one of the methods above, you can connect it to your AI agent of choice.
Install Claude Code, then run:
`bash`
claude mcp add --scope user --env GEMINI_API_KEY=your-key pdf-analyzer -- pdf-analyzer
Install OpenAI Codex, then run:
`bash`
codex mcp add pdf-analyzer --env GEMINI_API_KEY=your-key -- pdf-analyzer
Install Gemini CLI, then run:
`bash`
gemini mcp add --scope user -e GEMINI_API_KEY=your-key pdf-analyzer pdf-analyzer
Download VS Code
Add to .vscode/mcp.json in your project:
`json`
{
"servers": {
"pdf-analyzer": {
"type": "stdio",
"command": "pdf-analyzer",
"env": {
"GEMINI_API_KEY": "your-key"
}
}
}
}
Then enable it in Configure Tools (click the tools icon in Copilot chat).
> Warning: Do not commit .vscode/mcp.json to version control — it contains your API key. Add it to your .gitignore.
Once connected, ask your AI assistant to analyze any PDF:
- "Analyze /path/to/document.pdf and summarize the key points"
- "What tables are in this PDF? Extract the data from table 2"
- "Compare the findings in sections 3 and 5 of this report"
The server accepts:
- Local file paths: /Users/name/docs/report.pdfhttps://example.com/document.pdf
- URLs:
| Platform | Binary |
|----------|--------|
| macOS (Apple Silicon) | pdf-analyzer-darwin-arm64 |pdf-analyzer-darwin-x64
| macOS (Intel) | |pdf-analyzer-linux-x64
| Linux (x64) | |pdf-analyzer-linux-arm64
| Linux (ARM64) | |pdf-analyzer-windows-x64.exe` |
| Windows (x64) |
See CONTRIBUTING.md for development guidelines.
---
Created by Valentino Zegna
This project is hosted on GitHub under the IntelligentElectron organization.
Apache License 2.0 - see LICENSE