arxiv-mcp-server
Provides tools to search arXiv papers, fetch metadata, read full-text content, and list category taxonomy, enabling AI agents to access and analyze academic papers from arXiv.
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
Public Hosted Server: https://arxiv.caseyjhand.com/mcp
Overview
arXiv papers, metadata, and full text from the arXiv API and its OAI-PMH metadata feed. Search papers by query, category, and submission date; fetch structured metadata by ID; and read full paper text with automatic fallback across HTML and PDF renders. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
Tools
Tool | Description |
| Search arXiv papers by query with field prefixes, category, and date filters |
| Fetch metadata for one or more papers by arXiv ID |
| Read full paper text via HTML, ar5iv, or PDF-extracted fallback |
| List the arXiv category taxonomy, optionally filtered by group |
Resources
Resource | Description |
| Paper metadata by arXiv ID |
| Full arXiv category taxonomy |
Related MCP server: arxiv-reader-mcp
Capability reference
arxiv_search_papers tool
Query supports field prefixes
ti:,au:,abs:,cat:,co:,jr:,all:andAND/OR/ANDNOT, up to 1000 characters;categorytakes a code (cs.CL) or a whole archive (astro-ph,cs,math)Query grammar follows arXiv's: space-separated terms are joined with
OR(writeANDto require every term), operators are uppercase only, and all three share one precedence grouped to the right (a AND b OR cisa AND (b OR c)). Quote a multi-word topic ("graph neural networks" AND cat:cs.LG) and put alternatives in parentheses before a filter; arXiv ignores common words such asofandtheoutside a quoted phraseSorts by
sort_by(relevance/submitted/updated) andsort_order, withsubmitted_from/submitted_toas inclusive UTCYYYY-MM-DDbounds; up to 50 results per call (a largermax_resultsreturns 50)arXiv serves only the first 10,000 results of a query; a
startof 10,000 failsstart_beyond_result_limit. Use date windows to go furtherOutput echoes the effective query, total match count, and page offset; empty pages carry recovery guidance instead of an error. A total that is a floor (the local mirror counting to 50,000) carries
totalFoundIsLowerBound: true
arxiv_get_metadata tool
Takes up to 100 IDs and looks up the first 10 distinct ones; the rest come back in
remaining_idsfor the next call'spaper_ids. An ID repeated in any accepted spelling is looked up once, while different versions of one paper stay separateAccepts versioned (
2401.12345v2), unversioned, and pre-2007 (hep-th/9901001) IDs, with an optionalarXiv:prefix or an arxiv.orgabs/pdf/htmlURLReturns found papers plus a typed
not_found[](not_in_arxiv/version_not_in_mirror/version_not_served/live_lookup_failed/invalid_id) for the rest;version_not_servedis a superseded pre-2007 version arXiv's API answers HTTP 500 for, and itsdetailnames the latest version. With the local mirror,live_lookup_failedmarks an ID the mirror lacked whose live lookup failed; the papers the mirror served still come backFails
invalid_idwhen no ID is well-formed,no_matchwhen every ID misses,version_unavailablewhen a version is reachable only on the live API, andversion_not_servedwhen every ID is a version arXiv will not serve
arxiv_read_paper tool
Tries arXiv HTML, then ar5iv, then PDF text extraction; the
sourcefield reports which answered. PDF text is plain, so math, tables, and headings flattenar5iv keeps one render per paper, so an ar5iv body may be another revision than
paper_idand carriesrevision_unconfirmed: true, unless the read named no version and arXiv's API reported v1 as the paper's only version;pdf_urlis exactly thepaper_idrevisionmax_charactersdefaults to 100,000 (passnullfor the whole paper); page withstart. The first page carries anoutlineof section headings with offsetspaper_idaccepts the same ID spellings asarxiv_get_metadataFails
invalid_id,no_match(arXiv has no such paper, or no such version of it),content_unavailable(no render, no PDF),pdf_extraction_failed(the PDF has no text layer or does not parse),version_unavailable(version-pinned ID needs the live API), orversion_not_served(a superseded pre-2007 version arXiv will not serve; names the latest version and this version's PDF)
arxiv_list_categories tool
~155 categories across 8 top-level groups (
cs,econ,eess,math,physics,q-bio,q-fin,stat)Optional
groupfilter to narrow resultsStatic data — always succeeds
arxiv://paper/{paperId} resource
paperIdaccepts the same ID spellings asarxiv_get_metadata; percent-encode a legacy ID's slash (arxiv://paper/hep-th%2F9901001)Fails
empty_id,invalid_id,no_match,version_unavailable, orversion_not_served
arxiv://categories resource
Returns
{ categories: [...] }, a flat array withcode/name/groupper entryNo parameters; cacheable for 24h
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
arXiv-specific:
Read-only, no authentication required
Request queue enforcing arXiv's 3-second crawl delay; rate-limit responses fail fast with a cooldown
Paper text falls back from arXiv HTML to ar5iv to PDF extraction
Full arXiv category taxonomy embedded as static data
Optional local OAI-PMH metadata mirror (SQLite + FTS5) that removes rate-limit exposure for search and metadata. See Optional: local mirror
Agent-friendly output:
arxiv_read_papernames itssource;arxiv_search_papersechoes the effective queryarxiv_get_metadatareturns found papers with a typednot_found[]reason per missTyped
sourceandnot_found[].reasonenums let callers branch on data
Getting started
Public Hosted Instance
A public instance is available at https://arxiv.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"arxiv-mcp-server": {
"type": "streamable-http",
"url": "https://arxiv.caseyjhand.com/mcp"
}
}
}Self-Hosted / Local
Add the following to your MCP client configuration file.
{
"mcpServers": {
"arxiv-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/arxiv-mcp-server@latest"]
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"arxiv-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/arxiv-mcp-server@latest"]
}
}
}Or with Docker:
{
"mcpServers": {
"arxiv-mcp-server": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/arxiv-mcp-server:latest"]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
Bun v1.4.0 or higher (or Node.js v24+).
Installation
Clone the repository:
git clone https://github.com/cyanheads/arxiv-mcp-server.gitNavigate into the directory:
cd arxiv-mcp-serverInstall dependencies:
bun installConfiguration
All configuration is optional — the server works out of the box with sensible defaults.
Variable | Description | Default |
| arXiv API base URL. |
|
| Minimum delay between arXiv API requests (ms). |
|
| Timeout for paper body fetches — HTML renders and PDF downloads (ms). |
|
| Timeout for API search/metadata requests (ms). With the mirror enabled, also the longest an unversioned |
|
| Time budget for one |
|
| Enable the local OAI-PMH metadata mirror. |
|
| SQLite path for the mirror. |
|
| UTC cron expression for in-process daily refresh (HTTP mode only). | unset |
| Fall through to the live API on a local ID-lookup miss. |
|
| Positive values send |
|
| arXiv OAI-PMH endpoint base URL. |
|
| Minimum delay between OAI-PMH requests (ms). |
|
| Time budget for one scheduled refresh (ms). |
|
| Transport: |
|
| Port for HTTP server. |
|
|
|
|
| Auth mode: |
|
| Log level (RFC 5424). |
|
| Enable OpenTelemetry instrumentation (spans, metrics, completion logs). |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Build and run:
# One-time build bun run rebuild # Run the built server bun run start:http # or bun run start:stdioRun checks and tests:
bun run devcheck # Lint, format, typecheck, security audit bun run test # Vitest test suite
Optional: local mirror
For self-hosted deployments behind one egress IP, an optional SQLite + FTS5 mirror of arXiv's OAI-PMH metadata serves arxiv_search_papers and arxiv_get_metadata locally, so concurrent users stop queueing behind arXiv's 3-second crawl delay; arxiv_read_paper still fetches paper text live. Harvest it once with bun run mirror:init (~4.4h), then set ARXIV_MIRROR_ENABLED=true. Running it from an npm install, scheduling refreshes, schema upgrades, and where mirror search differs from the live API are covered in docs/mirror.md.
Docker
docker build -t arxiv-mcp-server .
docker run --rm -p 3010:3010 arxiv-mcp-serverThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/arxiv-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
|
|
| Server-specific environment variable parsing and validation with Zod. |
| Tool definitions ( |
| Resource definitions ( |
|
|
| Optional OAI-PMH mirror — harvester, SQLite + FTS5 store, query translator, runner. |
| Agent skill published to agents that install the server, and served over MCP: citation-to-ID resolution, search gates, version and section-by-section reading workflows. |
| Mirror lifecycle scripts ( |
| Unit and integration tests. |
| Design document, local mirror guide, and directory structure. |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storagearXiv API returns HTTP 200 for everything — including rate limits — so check content-type and body before parsing
Validate raw arXiv responses → normalize to domain types → return the output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Search arXiv papers and read Scout reports with methods, evidence and verification points.
Find research papers and arXiv preprints, and get an abstract and free full text from a DOI or id.
Search arXiv/Semantic Scholar/OpenAlex + medical evidence (PubMed/Europe PMC) + LaTeX/PDF tools.
Search and download academic papers from arXiv, PubMed, bioRxiv, medRxiv, Google Scholar, Semantic…
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables searching arXiv papers and retrieving paper metadata through MCP tools.2-
- AlicenseAqualityCmaintenanceMCP server for searching and retrieving arXiv papers with full-text PDF extraction.52MIT
- AlicenseNot gradedqualityDmaintenanceEnables searching arXiv, fetching metadata, reading papers as section-aware Markdown, listing recent papers, and downloading PDFs via five MCP tools.17 npm2MIT
- AlicenseNot gradedqualityDmaintenanceEnables searching arXiv and downloading papers via MCP tools, no API key required.Apache 2.0