PDF LocalVision MCP
Uses an Ollama vision model server (e.g. llama3.2-vision, qwen2.5-vl) as the OpenAI-compatible vision backend that performs the visual readings of PDF pages, configurable via VISION_BASE_URL/VISION_MODEL.
Connects to any OpenAI-compatible vision endpoint (base URL, model, and API key configurable through OPENAI_BASE_URL/OPENAI_MODEL/OPENAI_API_KEY) to run multimodal page-by-page reading and document synthesis of PDFs.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PDF LocalVision MCPread quarterly-report.pdf and summarize the tables with page citations"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PDF LocalVision MCP
An MCP server that performs native multimodal Visual Readings of PDF documents using local vision-language models (via oMLX on Apple Silicon or any OpenAI-compatible vision endpoint such as Ollama, vLLM, or LM Studio).
Instead of extracting embedded PDF text layers or running separate OCR pre-parsers, pdf-localvision-mcp rasterizes PDF pages in-memory to PNG (pymupdf) with dimensions snapped to multiples of 28 (<= 1792px by default) and processes them through a two-tier grounded reading pipeline:
Grounded Page Breakdown (
## [Page N]): Reading-order Markdown prose, HTML<table>tags (preservingrowspan/colspan), LaTeX equations (\(...\)/\[...\]), linearized chart data tables & diagrams, and verbatim anchor quotes (> "..." [Page N]).Executive Synthesis: A source-grounded document synthesis where every claim carries an inline
[Page N]citation.
Prerequisites: Vision Model Backend
Option A: Local oMLX (Recommended for Apple Silicon)
Install oMLX:
brew tap jundot/omlx && brew install omlx
# or via pip / uv:
uv tool install omlxConfigure the
Q-Visionalias in~/.omlx/model_settings.jsonmapped toQwen2.5-VL-7B-Instruct-8bit:
{
"version": 1,
"models": {
"Qwen2.5-VL-7B-Instruct-8bit": {
"model_alias": "Q-Vision"
}
}
}Start the oMLX server on
http://localhost:8000/v1:
# Option 1: Start the managed background daemon
omlx start
# Option 2: Serve directly
omlx serve mlx-community/Qwen2.5-VL-7B-Instruct-8bit --port 8000Option B: Ollama, vLLM, or any OpenAI-Compatible Vision Server
Run any vision model supporting image inputs (e.g., llama3.2-vision, qwen2.5-vl, etc.):
ollama run llama3.2-visionThen point pdf-localvision-mcp to it via VISION_BASE_URL (or OPENAI_BASE_URL) and VISION_MODEL (or OPENAI_MODEL).
Related MCP server: PDF MCP Flow
Running & Registering the MCP Server
Quick Start with uvx (No clone needed)
# Run directly from GitHub
uvx --from git+https://github.com/majdaleryani/pdf-localvision-mcp pdf-localvision-mcpFrom Local Clone
git clone https://github.com/majdaleryani/pdf-localvision-mcp.git
cd pdf-localvision-mcp
# Run via uv
uv run pdf-localvision-mcpClient Configuration Examples
1. Antigravity (~/.gemini/config/mcp_config.json)
{
"mcpServers": {
"pdf-localvision": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/majdaleryani/pdf-localvision-mcp",
"pdf-localvision-mcp"
],
"env": {
"VISION_BASE_URL": "http://localhost:8000/v1",
"VISION_MODEL": "Q-Vision"
},
"timeout": 300000
}
}
}2. Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json)
{
"mcpServers": {
"pdf-localvision": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/majdaleryani/pdf-localvision-mcp",
"pdf-localvision-mcp"
],
"env": {
"VISION_BASE_URL": "http://localhost:8000/v1",
"VISION_MODEL": "Q-Vision"
}
}
}
}Or via Claude Code CLI:
claude mcp add pdf-localvision -- uvx --from git+https://github.com/majdaleryani/pdf-localvision-mcp pdf-localvision-mcp3. Cursor (~/.cursor/mcp.json or .cursor/mcp.json)
{
"mcpServers": {
"pdf-localvision": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/majdaleryani/pdf-localvision-mcp",
"pdf-localvision-mcp"
],
"env": {
"VISION_BASE_URL": "http://localhost:8000/v1",
"VISION_MODEL": "Q-Vision"
}
}
}
}MCP Tool Reference: read_pdf_vision
Parameter | Type | Default | Description |
|
| (required) | Target Path: path to a single |
|
|
| Optional query or extraction goal. When omitted, performs an exhaustive 5-part Executive Synthesis + Grounded Page Breakdown. |
|
|
| Rasterization resolution in dots per inch before multiple-of- |
|
|
| Optional 1-based page selection expression (e.g., |
Environment Variables
Variable | Fallback Keys | Default | Description |
|
|
| Base URL of the OpenAI-compatible vision server. |
|
|
| Vision model ID or alias. If omitted and endpoint hosts a single model, auto-selects that model. |
|
|
| Bearer token for authorization. |
| — |
| Maximum concurrent 3-page Page Windows processed in multi-window PDFs. |
| — |
| Maximum pixel length of the longest rendered page edge (snapped down to a multiple of |
Running Tests
uv run pytest
uv run pyrightLicense
MIT License. See LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
High-fidelity PDF to structured Markdown conversion and document field extraction.
Convert PDF, Word, Excel and scanned documents to Markdown, tables and RAG chunks. OCR.
Extract PDFs to Markdown, RAG chunks and cited tables; publish tracked Doc Links with read stats.
- LLMtoMDOAuthcom.llmtomd
Convert PDFs, Office docs, websites and audio into AI-ready Markdown, then search and ask your docs.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables reading and extracting content from PDF documents including text (as Markdown), images, tables, and metadata from both local files and URLs, with OCR support for scanned documents.2-
- AlicenseNot gradedqualityCmaintenanceEnables AI-driven PDF document processing including PDF to Markdown conversion, intelligent text and table extraction, image extraction, format conversion between PDF/Word/Markdown, batch processing, and fuzzy search - optimized for LLM context and RAG workflows.2MIT
- AlicenseAqualityDmaintenanceEnables LLMs to read and extract content from PDF files with high-fidelity LaTeX recognition and layout awareness using a Python-based extraction engine. It includes a robust Node.js fallback and supports page range filtering for efficient processing of large documents.117 npmMIT
- AlicenseAqualityDmaintenanceEnables AI agents to process and inspect PDFs by detecting document type, extracting text, and generating Markdown with layout information.71MIT