Skip to main content
Glama

adfontes

Full-text academic and technical literature reader CLI and stdio Model Context Protocol (MCP) server for coding agents.

Given a paper identifier (arXiv, DOI, PMCID, PMID), specification (IETF RFC), or URL, adfontes fetches open-access full text, stages it locally, and prints a compact provenance header with a line- or page-indexed Table of Contents. Paywalled works return bibliographic metadata and an abstract without fabricating full text.


Installation

Python (uv)

uv tool install --managed-python adfontes

Standalone Binary

Install with cargo-binstall, or compile from crates.io:

cargo binstall adfontes          # prebuilt GitHub Release binary
cargo install adfontes --locked  # compile from source

Related MCP server: paper-search-mcp

Quickstart

Fetch a paper, specification, or web article:

adfontes fetch 2409.13740                          # arXiv paper
adfontes fetch 10.1038/s41586-025-10072-4          # DOI
adfontes fetch PMC11456789                         # PubMed Central (or PMID:38123456)
adfontes fetch "RFC 9110"                          # IETF RFC
adfontes fetch https://example.org/article         # web page, Markdown, GitHub blob, or PDF
adfontes fetch 2409.13740 -o /tmp/lit              # custom staging directory

Extract a lossless 1–8-page vector slice from a staged PDF:

adfontes slice-pdf /tmp/adfontes/paper.pdf -p 8-10

Start the stdio MCP server:

adfontes mcp

Register adfontes in mcp_config.json to expose the fetch and slice_pdf tools:

{
  "mcpServers": {
    "adfontes": {
      "command": "/absolute/path/to/adfontes",
      "args": ["mcp"]
    }
  }
}

Supported Sources

adfontes resolves each target through a keyless open-access waterfall:

Source

Examples

Resolution Order

arXiv

2409.13740, arXiv:2409.13740v1

arxiv.org/html → ar5iv → TeX source → PDF

DOI

10.1038/..., https://doi.org/...

Crossref/OpenAlex/Unpaywall → PMCID/arXiv → open-access PDF/HTML → metadata only

PMCID / PMID

PMC11456789, PMID:38123456

Europe PMC JATS XML → DOI/arXiv fallback → open-access PDF → metadata only

IETF RFC

RFC 9110, rfc7231

Datatracker status notes → RFCXML v3 → plain text

Web / GitHub

https://..., github.com/.../blob/...

GitHub raw rewrite → text/markdown → HTML math/table extractor, text, or PDF


Configuration

Configure staging confinement, outbound host rules, and polite-pool metadata access through environment variables:

Variable

Purpose

ADFONTES_STAGING_DIR

Default staging directory.

ADFONTES_EXTRA_ALLOWED_ROOTS

Additional allowed staging roots (: on Unix, ; on Windows).

ADFONTES_FORBIDDEN_PATH_PREFIXES

Additional absolute path prefixes blocked from staging.

ADFONTES_BLOCKED_HOST_SUFFIXES

Comma-separated domain suffixes blocked from outbound HTTP(S).

ADFONTES_CONTACT_EMAIL

Contact email enabling Unpaywall and OpenAlex polite-pool queries.

ADFONTES_DISABLE_PDF_SLICE

Truthy value (1, true, yes, on) disables local PDF slicing.

HTTPS_PROXY, HTTP_PROXY, NO_PROXY

Standard HTTP(S) proxy settings (SOCKS proxies are rejected).


License

MIT — see LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables LLMs to search, download, and read arXiv papers with automatic PDF text extraction and section filtering. Provides AI assistants direct access to scientific literature with local caching for fast re-access.
      3
      34 PyPI
      1
      MIT
    • F
      license
      A
      quality
      D
      maintenance
      Enables agents to search papers across Semantic Scholar and arXiv, read and extract text from arXiv PDFs, align records across sources, and produce structured literature-analysis digests.
      10
      1
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Converts DOIs and arXiv IDs into local PDFs via official open-access APIs, designed as an agent-facing companion for academic paper retrieval.
      2
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to retrieve the full text of research articles as downloadable files from DOIs, arXiv, PubMed Central, or OpenReview identifiers, falling back automatically across publisher APIs, open-access aggregators, and polite scraping. It supports single and concurrent batch requests, verifies the returned file matches the requested paper, can include supplementary files, and reports which source produced each result.
      77 PyPI
      30
      BSD 3-Clause