Skip to main content

MCP server for PDF visual inspection and arXiv source download

Project description

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 images for visual inspection of layout, formatting, and figures
  • download_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.

  1. In PyPI, add this GitHub repository as a trusted publisher for mcp-pdf-vision.
  2. Bump version in pyproject.toml.
  3. Push a tag like v0.1.1.
  4. 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, set MCP_OUTPUT_DIR / MCP_DEBUG_IMAGE_DIR explicitly.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_pdf_vision-0.1.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_pdf_vision-0.1.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file mcp_pdf_vision-0.1.1.tar.gz.

File metadata

  • Download URL: mcp_pdf_vision-0.1.1.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.11

File hashes

Hashes for mcp_pdf_vision-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0ff610792858fc7efc05213281c803206ede6b7ab58a1ce72e5efb14461c3b0b
MD5 198875b09b6b11db28e1982507f93d03
BLAKE2b-256 df4c468265e1b52f468ed35ff1b79cc6aa7b7ecb763724bb8ff8083b50c476b2

See more details on using hashes here.

File details

Details for the file mcp_pdf_vision-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_pdf_vision-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e3e1b09fbb8492131b8e4c658e9f5dc330b26cbc7920c79590630e96bc57b219
MD5 066b6d7ffe9dd193cb00c5f20e1541c3
BLAKE2b-256 3eda3eb168771918725bd475c9a4b410badb0cc4f78b2852237b3e5ae229e85e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page