Skip to content

ray0907/arxiv-mcp

v0.5.0MIT

Search and retrieve academic papers from arXiv.

arXiv MCP Server

A Model Context Protocol (MCP) server that provides arXiv paper search and retrieval capabilities. This server enables LLMs to search for academic papers on arXiv and get titles, abstracts, authors, and content from the official arXiv API.

Features

  • Search papers by query, author, category, and date
  • Advanced search with specific field filters
  • Get detailed paper metadata (title, abstract, authors, categories)
  • Retrieve full paper content through server-backed MCP resource links without embedding large papers in tool results
  • Browse recent papers by category
  • List all arXiv categories
  • Pagination support for search results

Available Tools

search

Search arXiv for papers matching a query.

ArgumentTypeRequiredDescription
querystringYesSearch query (e.g., 'LLM', 'transformer')
categorystringNoFilter by category (e.g., 'cs.AI', 'cs.LG')
authorstringNoFilter by author name
sort_bystringNoSort order: 'relevance', 'date_desc', 'date_asc', 'updated_desc', 'updated_asc'
pageintNoPage number (default: 1)
page_sizeintNoResults per page, max 50 (default: 25)

search_advanced

Advanced search with specific field filters.

ArgumentTypeRequiredDescription
titlestringNoSearch in paper titles
abstractstringNoSearch in abstracts
authorstringNoSearch by author name
categorystringNoFilter by category
id_arxivstringNoRestrict to one arXiv ID; combines with the other filters
date_fromstringNoStart of submission date range (YYYY-MM-DD)
date_tostringNoEnd of submission date range (YYYY-MM-DD)
sort_bystringNoSame options as search
pageintNoPage number
page_sizeintNoResults per page

get_paper

Get detailed information about a specific arXiv paper.

ArgumentTypeRequiredDescription
id_or_urlstringYesarXiv ID (e.g., '2301.00001') or full URL

get_content

Validate an arXiv paper through a streamed Jina Reader request, then return an arxiv:// MCP resource link. Clients read the link through resources/read; the paper text is fetched only then and is never embedded in the tool result. A server-backed custom URI is used because MCP does not require every client to fetch external https:// resource links directly.

ArgumentTypeRequiredDescription
id_or_urlstringYesarXiv ID or full URL

get_recent

Get recent papers from a specific arXiv category.

ArgumentTypeRequiredDescription
categorystringNoCategory code (default: 'cs.AI')
countintNoNumber of papers, max 50 (default: 10)

list_categories

List all common arXiv categories with their codes and names.

Search Behavior

  • Results come from the official arXiv API (export.arxiv.org/api/query). Requests are spaced 3 seconds apart per server process, as the API terms ask.
  • The words of a query are ANDed. A query containing a stopword (is, the, for, ...) is sent as an exact phrase instead, because the API drops stopwords from ANDed words and would return nothing.
  • A query that already uses arXiv field syntax (ti:, au:, abs:, cat:, all:) is passed through as is.
  • Titles and abstracts keep their raw LaTeX ($\alpha$). Search by plain words (alpha divergence); LaTeX markup in a query does not match.
  • Versioned IDs (2301.00001v2) are looked up as given. The API rejects versioned legacy IDs (hep-th/9901001v1), so the version is dropped for those.
  • Dates in results are ISO timestamps, e.g. 2017-06-12T17:57:34Z.

Installation

Using uv (Recommended)

# Clone the repository
git clone https://github.com/Ray0907/arXiv-mcp.git
cd arXiv-mcp

# Install with uv
uv sync

Using pip

# Clone the repository
git clone https://github.com/Ray0907/arXiv-mcp.git
cd arXiv-mcp

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install
pip install -e .

Configuration

Claude Desktop

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "arxiv": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/arXiv-mcp",
        "run",
        "arxiv-mcp"
      ]
    }
  }
}

Claude Code

Add to your Claude Code MCP settings:

{
  "mcpServers": {
    "arxiv": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/arXiv-mcp",
        "run",
        "arxiv-mcp"
      ]
    }
  }
}

pi

pi mcp add arxiv -- uv --directory /path/to/arXiv-mcp run arxiv-mcp
pi mcp list

pi mcp list should show arxiv: connected, 7 tools. Tools are exposed through code mode by default; add --exposure direct to pi mcp add to expose each tool directly. A project-level server (-l) is ignored until you trust the project in pi.

Antigravity CLI (agy)

agy mcp add arxiv -- uv --directory /path/to/arXiv-mcp run arxiv-mcp
agy mcp list

agy mcp list only shows that the server is enabled; start a session and call a tool to confirm. In non-interactive mode (agy -p), MCP calls are denied until allowed, for example with an mcp(*) entry under permissions.allow in settings.json.

Usage Examples

Search for papers about LLMs

Search for recent papers about "large language models"

Find papers by a specific author

Search for papers by "Yann LeCun" in the machine learning category

Get paper details

Get the details of arXiv paper 2301.00001

Browse recent papers

Show me the 10 most recent papers in cs.AI

Development

Run tests

uv run pytest

Run the server locally

uv run arxiv-mcp

Common arXiv Categories

CodeName
cs.AIArtificial Intelligence
cs.CLComputation and Language
cs.CVComputer Vision and Pattern Recognition
cs.LGMachine Learning
cs.NENeural and Evolutionary Computing
stat.MLMachine Learning (Statistics)

Use list_categories tool to get the full list.

Changelog

See CHANGELOG.md.

License

MIT License - see LICENSE for details.