apud MCP server
Commit Oct 27, 2026Enables AI agents to fetch high-resolution image regions from IIIF collections and generate W3C Web Annotations for citable historical document analysis.
Also known as cadeos/apud
- Stars
- 0
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Oct 27, 2026
- License
- Apache-2.0
What is apud MCP?
apud enables AI agents to fetch high-resolution image regions from IIIF collections and generate W3C Web Annotations for citable historical document analysis.
Summary generated from the project's README
About apud MCP server
Scholars and developers analyzing historical manuscripts can use this tool to provide vision-language models with precise visual evidence. By connecting AI agents to IIIF collections, the server allows models to fetch high-resolution image regions from Image API v2 or v3 servers. It handles complex tasks like stitching regions from tiles on Level 0 static servers to ensure the model sees the specific area of interest at the best possible resolution.
Users interact with the server through three primary tools: describe_manifest, view_region, and annotate_transcription. The system maintains accuracy by anchoring model outputs to canvas coordinates, even when image sizes vary. It generates W3C Web Annotations using xywh fragment selectors and provides IIIF Content State links. This ensures that every transcription or observation can be instantly opened at the exact location within viewers like Mirador, making AI-generated insights verifiable for philologists.
What you can do with it
- 1Extracting high-resolution manuscript detailsAn AI agent can request a specific area of a historical document to see fine details that a standard low-resolution view might miss.
Written from the project's README. Every use case is checked against a quote from it.
README
View on GitHubapud
IIIF-grounded, citable vision for historical documents.
Vision-language models can read manuscripts, but they cannot say where they read what they
report, and their answers cannot be checked by a scholar. apud sits between IIIF collections
and models:
- fetches canvas regions from any IIIF Image API server at the best resolution the server and the model allow (Image API v2/v3, Presentation v2/v3, lenient parsing of real-world manifests), including Level 0 static servers, where the region is stitched from the covering tiles (or cut from the closest declared size) on the client;
- keeps every model output anchored to canvas coordinates, even when the served image size differs from the canvas;
- emits W3C Web Annotations (
xywhfragment selectors) and IIIF Content State links, so every transcription can be opened at the exact spot in Mirador or any IIIF viewer.
apud (Latin, "in the work of") is how philologists cite a source they read in someone else's text.
Status: pre-alpha.
Packages
| Package | Path | What it is |
|---|---|---|
apud |
packages/core |
Python library: IIIF parsing, region requests, annotations, citations |
apud-mcp |
packages/mcp |
MCP server exposing apud to agents |
The benchmark lives in a separate repository: apud-bench.
Quick look
from apud.client import IIIFClient
from apud.iiif import Region, canvas_to_image
with IIIFClient() as iiif:
manifest = iiif.manifest("https://www.e-codices.unifr.ch/metadata/iiif/csg-0390/manifest.json")
canvas = manifest.canvases[10]
service = iiif.image_service(canvas.image_service)
region = canvas_to_image(Region(200, 300, 800, 400), service.width, service.height, canvas)
request, jpeg = iiif.region(service, region, max_side=1568)
MCP server
uvx apud-mcp
Tools: describe_manifest, view_region, annotate_transcription.
Development
uv sync
uv run pytest
uv run ruff check . && uv run ruff format --check .
License
Apache-2.0. See CITATION.cff for how to cite.
apud MCP questions
What tools does the MCP server provide?
The MCP server exposes tools for describing manifests, viewing specific image regions, and annotating transcriptions.
How does apud handle image regions from different IIIF versions?
It supports Image API v2/v3 and Presentation v2/v3, including lenient parsing of real-world manifests and handling Level 0 static servers.
Can the model outputs be used in standard IIIF viewers?
Yes, it emits W3C Web Annotations and IIIF Content State links so transcriptions can be opened at the exact spot in Mirador or other IIIF viewers.