Skip to main content
Glama
arXiv MCP Server

arXiv MCP Server

by MaksPyn

arXiv MCP Server

A Model Context Protocol server that gives AI assistants access to arXiv: search papers, browse the official category taxonomy, and read papers' full text.

  • Search by keywords, title, author, abstract, category and submission date, with paging and sorting

  • Category taxonomy: all 155 official arXiv categories (cs.AI, math.CO, astro-ph.CO, …) with descriptions

  • Full text: read_paper downloads the PDF, extracts the text, detects sections, and returns it in chunks you can page through or jump into by section

  • In-paper search: find every occurrence of a phrase, with context and section names

  • Local library: downloaded papers are kept on disk and can be listed and deleted

  • Analysis prompts: summary, key findings, methodology critique, literature-review entry and more, available as MCP prompts and as a tool

  • Polite to arXiv: all requests share one queue with a 3-second gap, retry with backoff, and cache responses for a short time

Requirements

Node.js 22 or newer.

Related MCP server: ArXiv MCP Server

Installation

Run straight from GitHub (no clone)

{
  "mcpServers": {
    "arxiv": {
      "command": "npx",
      "args": ["-y", "github:MaksPyn/arxiv-mcp-server"]
    }
  }
}

From source

git clone https://github.com/MaksPyn/arxiv-mcp-server.git
cd arxiv-mcp-server
npm install        # also builds into build/

Then point your MCP client at build/index.js.

Claude Desktop: edit claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "arxiv": {
      "command": "node",
      "args": ["/absolute/path/to/arxiv-mcp-server/build/index.js"],
      "env": {
        "ARXIV_STORAGE_DIR": "/absolute/path/to/papers"
      }
    }
  }
}

Claude Code:

claude mcp add arxiv -e ARXIV_STORAGE_DIR=~/papers -- node /absolute/path/to/arxiv-mcp-server/build/index.js

Docker

docker build -t arxiv-mcp-server -f docker/Dockerfile .
{
  "mcpServers": {
    "arxiv": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "-v", "arxiv-data:/data", "arxiv-mcp-server"]
    }
  }
}

Configuration

Settings come from environment variables. The easiest place to set them is the env block of your MCP client config (see above). You can also use a .env file. The server looks for one in these places, highest priority first:

  1. the file named by ARXIV_MCP_ENV_FILE

  2. .env in the working directory the client launched the server from

  3. .env in the project root (next to package.json)

Variables set by the client always override .env files. Relative paths in a .env file are resolved against that file's directory. When the server starts, it logs the storage directory in use and which .env files it loaded. list_downloaded_papers also shows the storage directory.

Variable

Default

Description

ARXIV_STORAGE_DIR (or STORAGE_DIR)

~/.arxiv-mcp-server/papers

Where PDFs and extracted text are stored

LOG_LEVEL

info

debug, info, warn, error or silent. Logs go to stderr

LOG_FILE

–

Also append logs to this file

RATE_LIMIT_DELAY_MS

3000

Minimum gap between requests to arXiv

REQUEST_TIMEOUT_MS

20000

Per-request timeout for API calls

MAX_PDF_SIZE_MB

50

Refuse larger PDFs (0 = no limit)

MAX_STORAGE_SIZE_MB

0

Refuse downloads once storage exceeds this (0 = no limit)

PROMPTS_FILE

–

JSON file with extra or overriding analysis prompts

See config/.env.example.

Tools

Tool

What it does

search_papers

Search with any of all, title, author, abstract, categories, submittedFrom/submittedTo, or a raw arXiv query. Supports sortBy, sortOrder, start, maxResults (≤ 200) and fullAbstracts

get_papers

Full metadata for one or more IDs or arxiv.org URLs (new-style 2301.00001v2 and old-style hep-th/9901001)

get_recent_papers

Newest submissions in one or more categories

list_categories

The arXiv category taxonomy, filterable by group (cs, math, physics, astro-ph, …) and search text

read_paper

Full text of a paper, downloaded automatically. Page with offset/maxChars, or jump with section ("Introduction", "3.2", "conclusion")

search_in_paper

Every occurrence of a word or phrase, with context and section names. Plain-text match, not regex

download_paper

Download a PDF ahead of time (force to re-download)

list_downloaded_papers

Local library, storage usage and storage directory

delete_paper

Remove a paper from local storage

analyze_paper

A filled-in research-analysis brief. Omit promptId to list the available analyses

Search tips

  • Words in title/abstract/all must all match. Use "double quotes" for an exact phrase.

  • categories takes one code or a list (matched with OR). Whole archives such as math or cond-mat also work. Unknown codes are rejected with suggestions.

  • Dates accept YYYY, YYYY-MM or YYYY-MM-DD.

  • query takes raw arXiv query syntax, e.g. ti:"diffusion model" ANDNOT cat:cs.CV, and is combined with the other fields using AND.

Prompts

Each template in prompts/prompts.json is exposed as an MCP prompt that takes an arxivId: summary, key_findings, methodology_analysis, literature_review, research_gaps, technical_deep_dive, comparison, practical_applications. In clients that support prompts, such as Claude Desktop and Claude Code, they show up as slash commands or attachments.

To add your own, create a JSON file in the same format and set PROMPTS_FILE. Entries with the same id replace the built-in ones. Templates can use {{id}}, {{title}}, {{authors}}, {{abstract}}, {{categories}}, {{primaryCategory}}, {{year}}, {{published}}, {{url}}, {{comment}}, {{journalRef}} and {{doi}}.

Development

npm run build     # compile to build/
npm test          # offline unit tests
npm run smoke     # end-to-end test against the live arXiv API
node scripts/update-categories.mjs   # refresh the category list from arxiv.org
src/
  index.ts            entry point (stdio transport)
  server.ts           tool and prompt definitions
  config.ts           environment / .env loading
  logger.ts           stderr logger
  arxiv/api.ts        Atom API client and parser
  arxiv/http.ts       rate-limited, retrying fetch
  arxiv/query.ts      search query builder
  arxiv/ids.ts        arXiv ID parsing and validation
  arxiv/categories.*  category taxonomy
  storage.ts          local paper storage
  pdf.ts              PDF text extraction, section detection, search
  reader.ts           download, extract and cache
  prompts.ts          analysis prompt templates

Notes

  • arXiv asks API users to keep to one request every 3 seconds. If you send too many, arXiv answers with HTTP 429 for a while. The server reports this clearly, and papers you've already downloaded can still be read.

  • Text is extracted from the PDF, so equations, tables and figures come through imperfectly.

  • Section detection is heuristic. If a section isn't found, the error lists the detected sections, and you can always read by offset.

License

MIT. Thanks to arXiv for use of its open-access interoperability.

Available Tools

10 tools
analyze_paperResearch analysis promptA
Read-only

Get a structured research-analysis brief for a paper (summary, key findings, methodology critique, literature-review entry, research gaps, etc.) filled with the paper's metadata. Omit promptId to list the available analyses. The same templates are also exposed as MCP prompts.

Inputs: arxivId, promptId.

delete_paperDelete downloaded paperA
DestructiveIdempotent

Delete a paper (PDF and cached text) from local storage.

Inputs: arxivId (required).

download_paperDownload paper PDFA
Idempotent

Download a paper's PDF into local storage (/root/.arxiv-mcp-server/papers). Not required before read_paper, which downloads automatically.

Inputs: arxivId (required), force.

get_papersGet papers by arXiv IDA
Read-only

Get full metadata (all authors, affiliations, complete abstract, comments, journal reference, DOI, links) for one or more papers. Accepts IDs like 2301.00001, 2301.00001v2, hep-th/9901001, or arxiv.org URLs.

Inputs: ids (required).

get_recent_papersLatest papers in a categoryB
Read-only

List the most recently submitted papers in one or more arXiv categories (e.g. cs.AI, astro-ph.CO, or a whole archive like math).

Inputs: categories, maxResults, fullAbstracts.

list_categoriesarXiv category taxonomyA
Read-only

List official arXiv subject categories (e.g. cs.AI, math.CO, q-bio.NC) with their names and descriptions. Filter by group (cs, econ, eess, math, physics, q-bio, q-fin, stat, or a physics archive such as astro-ph / cond-mat) and/or search text. Use the codes with search_papers and get_recent_papers.

Inputs: group, search, includeDescriptions.

list_downloaded_papersList downloaded papersA
Read-only

List papers stored locally, with storage usage and the storage directory in use.

Inputs: no named parameters.

read_paperRead paper full textA
Read-only

Read the full text of a paper, extracted from its PDF (downloaded automatically if needed). Long papers are returned in chunks: use offset to continue, or section to jump to a section such as "Introduction", "3", "3.2" or "conclusion". The first call lists the detected sections.

Inputs: arxivId (required), offset, section, maxChars.

search_in_paperSearch within a paperA
Read-only

Find every occurrence of a word or phrase in a paper's full text (downloaded automatically if needed), with surrounding context and the section it appears in. Plain-text match, not regex.

Inputs: query (required), arxivId (required), maxMatches, contextChars, +1 more.

search_papersSearch arXivA
Read-only

Search arXiv papers. Combine any of: free text (all), title, author, abstract, categories and a submission-date range; all given criteria must match. Multi-word title/abstract/all searches match papers containing every word; wrap words in double quotes for an exact phrase. For advanced use, query accepts raw arXiv syntax (prefixes ti: au: abs: co: jr: cat: all:, operators AND OR ANDNOT).

Inputs: all, query, start, title, +9 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 10 tools

    Disambiguation4/5

    Most tools target clearly distinct operations: arXiv search, recent listings, metadata retrieval, category lookup, local storage management, full-text reading, in-paper search, and analysis. The only overlaps are search_papers vs get_recent_papers (recent listing achievable via date-bounded search) and download_paper vs read_paper (which auto-downloads), but the descriptions explicitly clarify these boundaries.

    Naming Consistency5/5

    All ten tools follow a clean verb_noun snake_case pattern (list_*, search_*, get_*, download_paper, delete_paper, read_paper, analyze_paper) with no camelCase or stylistic deviations. The prefix semantics are also consistent: get_ for metadata, list_ for enumerations, and action verbs for local operations.

    Tool Count5/5

    Ten tools is well within the ideal range and each earns its place: discovery (search, recent, categories), retrieval (get_papers), local lifecycle (download, delete, list_downloaded), reading (read, search_in), and analysis. Nothing feels redundant or padded.

    Completeness4/5

    Coverage is strong end-to-end: discovery, metadata, PDF download/read, in-paper search, local storage lifecycle, and analysis briefs. Minor gaps remain—no cross-paper full-text search over the local library, no local-library tagging/organization, and no citation/reference traversal—but agents can work around these with existing tools.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Provides paper search, PDF link retrieval, and content parsing for arXiv research papers, enabling seamless access to scientific literature through the Model Context Protocol.
      4
      41 npm
      24
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables AI assistants to search and access arXiv papers through a Model Context Protocol interface, allowing for paper search, download, listing, and reading functionality.
      4
      2
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to search, retrieve, analyze, and export academic papers from arXiv.org using the Model Context Protocol.
      19
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI assistants to search, download, and access arXiv papers with local storage and date filtering via the Model Context Protocol.
      3
      1
      Apache 2.0