Optical Context MCP Server

Compress large OCR-heavy PDFs into dense packed images for agent workflows.

Local serverstdioPython

What is the Optical Context MCP MCP server?

Most developer tooling work still happens through a UI a human drives. Optical Context MCP MCP server moves it into the conversation instead. Compress large OCR-heavy PDFs into dense packed images for agent workflows.

The short version

Compress OCR-heavy PDFs into dense packed images so agents can work with long visual documents.

  • reads a local PDF from the MCP host machine
  • extracts page markdown and embedded images with Mistral OCR
  • packs that content into dense PNGs that preserve visual grouping
  • optionally sizes embedded figures with a bundled technical-document model
  • stores a manifest and temp job artifacts for follow-up retrieval
  • lets an agent pull only the packed images it needs

The tools it exposes

The server publishes 3 tools. What each one is for:

  • compress_pdf — run OCR plus recomposition and create a stored job
  • get_job_manifest — load metadata for an existing job
  • get_packed_images — fetch one or more packed PNGs from an existing job

Getting it running

The server ships on PyPI as optical-context-mcp, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

What it needs from you

Configuration is passed through the environment: MISTRAL_API_KEY, OPTICAL_CONTEXT_ADAPTIVE_MODEL_PATH. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

How it compares

This sits in the developer tooling group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Optical Context MCP's toolset — compress_pdf, get_job_manifest, get_packed_images — is a fair guide to whether it matches your workflow. It is maintained by ChrBoebel; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
compress_pdfrun OCR plus recomposition and create a stored job
get_job_manifestload metadata for an existing job
get_packed_imagesfetch one or more packed PNGs from an existing job

How to install the Optical Context MCP MCP server

{
  "mcpServers": {
    "optical-context": {
      "command": "uvx",
      "args": ["optical-context-mcp"],
      "env": {
        "MISTRAL_API_KEY": "your-value",
        "OPTICAL_CONTEXT_ADAPTIVE_MODEL_PATH": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
MISTRAL_API_KEYCredential the server authenticates with.Yes
OPTICAL_CONTEXT_ADAPTIVE_MODEL_PATHFilesystem location the server is allowed to use.Optional

Example prompts to try

  • Use Optical Context MCP to compress pdf.
  • Use Optical Context MCP to get job manifest.
  • Use Optical Context MCP to get packed images.

Frequently asked questions

It connects Optical Context MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 3 tools (compress_pdf, get_job_manifest, get_packed_images) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Optical Context MCP directly.