mcp-pdf-vision
An MCP (Model Context Protocol) server for PDF visual inspection and arXiv source download. It allows LLMs to "see" PDF pages as images and retrieve arXiv paper sources.
Features
get_pdf_metadata— Get basic PDF information (page count, page size)inspect_pdf_visually— Render PDF pages as inline image items; payloads are base64-encoded JPEGs for visual inspectionsave_pdf_pages_locally— Render PDF pages into.mcp-pdf-vision/inside the caller workspace and return the saved image pathsdownload_arxiv_source— Download and extract arXiv paper TeX source by URL or ID
Prerequisites
- Python >= 3.10
- Poppler (required by
pdf2image)
# macOS
brew install poppler
# Ubuntu / Debian
sudo apt-get install poppler-utils
# Windows (via conda)
conda install -c conda-forge poppler
Installation
# Using uv (recommended)
uv pip install mcp-pdf-vision
# Using pip
pip install mcp-pdf-vision
Release
Local publish
# Bump version in pyproject.toml first
rm -rf dist build *.egg-info
python -m pip install -U build twine
python -m build
twine check dist/*
twine upload dist/*
GitHub Actions publish
This repository includes .github/workflows/publish.yml for PyPI Trusted Publishing.
- In PyPI, add this GitHub repository as a trusted publisher for
mcp-pdf-vision. - Bump
versioninpyproject.toml. - Push a tag like
v0.1.1. - GitHub Actions will build and publish the package automatically.
Usage
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"pdf-vision": {
"command": "uv",
"args": ["run", "--directory", "/path/to/pdf-vision", "mcp-pdf-vision"]
}
}
}
MCP Inspector (for testing)
npx @modelcontextprotocol/inspector uv run mcp-pdf-vision
Direct execution
uv run mcp-pdf-vision
Note: The server uses stdio transport. Running it directly in a terminal will show a JSON parsing error — this is expected. Use an MCP client or the Inspector to interact with it.
Environment Variables
| Variable | Description |
|---|---|
MCP_OUTPUT_DIR |
Override output directory when the client does not expose usable MCP roots |
MCP_DEBUG_IMAGE_DIR |
Override debug image directory when the client does not expose usable MCP roots |
MCP_SAVE_DEBUG_IMAGES |
Set to 1 to export debug images of rendered PDF pages |
download_arxiv_source and debug image export now prefer the client-provided MCP roots (roots/list), so files are written into the caller workspace instead of the server process directory. If the client does not expose roots, the server falls back to MCP_OUTPUT_DIR / MCP_DEBUG_IMAGE_DIR, then PWD / process cwd (useful for stdio clients that launch the server in the active workspace).
Visual Inspection Modes
inspect_pdf_visuallyreturns inline MCP image content items. Each item contains a base64-encoded JPEG payload, so the client can inspect the page without creating files.save_pdf_pages_locallywrites PNG files directly into<workspace>/.mcp-pdf-vision/with names likepage-1-20260318T123456789012Z.png, then returns the absolute paths for downstream tools or local image viewing.
License
Metadata
Release files for mcp-pdf-vision 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp_pdf_vision-0.1.3.tar.gz | 7.2 kB | Without provenance | Details for mcp_pdf_vision-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_pdf_vision-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for mcp_pdf_vision-0.1.3-py3-none-any.whl |
Total release size: 15.4 kB
Release files / mcp_pdf_vision-0.1.3.tar.gz
| Download URL | mcp_pdf_vision-0.1.3.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d8e81f9e30ca790317f654bb24db772226a2833e5c27537f23a26ceb57de23e
|
|
BLAKE2b-256 checksum How to use checksums |
7a6b6c6af63af2ea14c45cd88bfc13cf0fde89232ff4945ed73776cc6c848258
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.11
|
Release files / mcp_pdf_vision-0.1.3-py3-none-any.whl
| Download URL | mcp_pdf_vision-0.1.3-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0b5baa2e9948543a84894ee81a9c42b415a6483ae316229764605e197233668a
|
|
BLAKE2b-256 checksum How to use checksums |
622af6a0a22f8fa33e4abe6bb5a78cf0b6cf1e51bb90d7ba293535620ab5dba0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.11
|
Security for mcp-pdf-vision 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.