arx
arx is a local arXiv cache with a daemon-backed architecture:
arxd: the single local backend daemon. It owns the download queue, metadata indexing, SQLite writes, and arXiv rate limiting. If it is not running, frontends start it; when its queue is idle it shuts down after a short grace period.
arx: a standalone CLI frontend for queuing downloads, indexing cached metadata, locating cached files, and inspecting daemon status.
arx-mcp: a stdio MCP frontend that exposes the same daemon-backed operations to agents.
The shared core downloads arXiv metadata, PDF, and TeX/source files into an XDG cache, records arXiv-to-arXiv citations discovered in the source as JSONL, and stores indexed metadata in a SQLite database under the cache root.
The cache is safe for multi-agent use on one machine: arxd is the only queue manager for a cache root, and arXiv network requests are serialized through the existing shared filesystem lock and rate-limit state.
Workspace layout
crates/
arx-core/ # arXiv fetching, cache paths, daemon protocol, source extraction, citations, rate limiting
arxd/ # local backend daemon; owns queue and metadata database updates
arx-cli/ # standalone `arx` frontend; boots arxd when needed
arx-mcp/ # stdio `arx-mcp` MCP frontend and MCP setup helpers
Features
- Standalone CLI:
arx fetch <ID>
arx lookup <ID>
arx search <QUERY>
arx index
arx locate <ID>
arx cache-dir
arx queue-status
- Local backend daemon:
arxd serve: owns the per-cache-root queue and database updates; frontends start it automatically.
- MCP stdio server with four tools:
lookup_arxiv_papers: metadata, abstract, local material readiness, and cache paths; fetches only missing metadata.
full_text_search: BM25-ranked search over cached material for all papers, or one paper via arxiv_id. Scope controls which content is searched: default (title+metadata+body, no bibliography), titles, bibliography, all. Empty results include a note explaining why.
fetch_arxiv_paper: ask arxd to queue/cache a paper (PDF/source) and return a job id immediately.
get_arxiv_download_queue_status: inspect queued, active, completed, and failed downloads.
- Downloads arXiv metadata, PDF, and source/e-print bundle.
- Extracts source archives when possible.
- Writes arXiv-to-arXiv citations discovered in source/BibTeX files to
citations.jsonl.
- Caches under XDG cache directories for future hits.
- Stores indexed metadata in
<cache-root>/metadata.sqlite3.
- Keeps arxd connection state in
<cache-root>/arxd.json and the daemon singleton lock in <cache-root>/arxd.lock.
- Enforces a cross-process 3 second delay between arXiv requests.
- Includes MCP setup helpers in
arx-mcp so harnesses can launch the frontend directly from config.
- All shipped command-line binaries (
arx, arxd, and arx-mcp) support --version / -v.
Install
Homebrew (macOS and Linux):
brew install eric-tramel/tap/arx
This installs arx, arxd, and arx-mcp from
eric-tramel/homebrew-tap.
Or install from the latest GitHub release:
curl -fsSL https://raw.githubusercontent.com/eric-tramel/arx/main/install.sh | sh
Windows PowerShell:
irm https://raw.githubusercontent.com/eric-tramel/arx/main/install.ps1 | iex
The installers download the matching release archive and install arx, arxd, and arx-mcp.
Override defaults:
ARX_VERSION=v0.1.2 ARX_INSTALL_DIR=$HOME/bin sh install.sh
$env:ARX_VERSION = "v0.1.2"
$env:ARX_INSTALL_DIR = "$HOME\\bin"
.\\install.ps1
Install all binaries from a checkout instead:
cargo install --path crates/arx-cli
cargo install --path crates/arx-mcp
cargo install --path crates/arxd
Or run from the workspace:
cargo run -p arx -- fetch 0704.0001
cargo run -p arx-mcp -- serve
Local development builds can reuse compilation artifacts across worktrees by
running rustc through sccache. Configure it per-user rather than in this
repository, so source builds (including the Homebrew formula) work without
sccache installed:
# ~/.cargo/config.toml
[build]
rustc-wrapper = "sccache"
GitHub Actions sets RUSTC_WRAPPER=sccache for release/test jobs.
arx-mcp serve is the default MCP command, so an MCP client can launch arx-mcp with no arguments or with serve. arx-mcp starts arxd when a tool needs daemon work.
Standalone CLI usage
Claim metadata/status first. lookup never downloads PDF/source material; by default it fetches only missing Atom metadata and returns local readiness for PDF/source/citations/search material.
arx lookup 0704.0001
arx lookup 0704.0001 0704.0002
arx lookup 0704.0001 --local-only