Provides tools for searching and retrieving academic papers from arXiv, including paper search by various criteria, category-based search, retrieving paper details by ID, and extracting full text content from paper PDFs.
Handles the conversion of arXiv API's XML responses into structured JSON data, making the information more accessible and usable.
arXiv MCP Server
An MCP (Model Context Protocol) server that provides tools for interacting with the arXiv API to search and retrieve academic papers.
Overview
This server implements the Model Context Protocol to provide tools for searching and retrieving papers from the arXiv preprint repository. It allows AI assistants to search for papers by various criteria, get details about specific papers, search by category, and extract full text content from PDFs.
Features
- Search Papers: Search for papers using various criteria (title, author, abstract, category, etc.)
- Get Paper Details: Get detailed information about a specific paper by its arXiv ID
- Category Search: Search for papers in a specific arXiv category
- PDF Content Extraction: Download and extract full text content from paper PDFs
- Structured Results: Returns properly parsed JSON data instead of raw XML
- Caching: Intelligent PDF caching to avoid redundant downloads
Installation
Prerequisites
- Node.js 18+
- npm or pnpm
Setup
- Clone this repository:
- Install dependencies:
- Build the project:
Usage
As an MCP Server
Start the server:
The server will run on stdio, allowing it to communicate with MCP clients.
MCP Client Configuration
Add this configuration to your MCP client settings. For Claude Desktop, add to your claude_desktop_config.json
:
For other MCP clients, use a similar configuration structure. Make sure to:
- Update the
cwd
path to point to your arxiv-mcp-server directory - Ensure the
build/index.js
file exists (runnpm run build
first) - The
alwaysAllow
array lists tools that won't require user confirmation
Available Tools
search_papers
Search for papers on arXiv by various criteria with flexible query options.
Parameters:
query
(string, optional): General search query across all fieldscategory
(string, optional): arXiv category (e.g.,cs.AI
,physics.optics
)author
(string, optional): Author name to search fortitle
(string, optional): Words to search for in the titleabstract
(string, optional): Words to search for in the abstractstart
(number, optional): Starting index for pagination (0-based, default: 0)max_results
(number, optional): Maximum number of results to return (max 2000, default: 10)sort_by
(string, optional): Sort byrelevance
,lastUpdatedDate
, orsubmittedDate
sort_order
(string, optional): Sort orderascending
ordescending
Example Response:
get_paper
Get detailed information about a specific paper by its arXiv ID.
Parameters:
paper_id
(string, required): arXiv paper ID (e.g.,2104.13478
orcs/0001001
)
Returns: Same structured format as search_papers
but for a single paper.
search_by_category
Search for papers in a specific arXiv category with pagination and sorting options.
Parameters:
category
(string, required): arXiv category (e.g.,cs.AI
,physics.optics
)start
(number, optional): Starting index for pagination (0-based)max_results
(number, optional): Maximum number of results to return (max 2000)sort_by
(string, optional): Sort byrelevance
,lastUpdatedDate
, orsubmittedDate
sort_order
(string, optional): Sort orderascending
ordescending
get_paper_content
Download and extract the full text content from a paper's PDF.
Parameters:
paper_id
(string, required): arXiv paper ID (e.g.,2104.13478
)
Features:
- Downloads PDFs from arXiv's servers
- Caches PDFs locally to avoid redundant downloads
- Extracts and cleans text content using pdf-parse
- Handles network errors and parsing issues gracefully
- Returns plain text content suitable for analysis
Returns: Plain text content of the paper.
Common arXiv Categories
cs.AI
- Artificial Intelligencecs.LG
- Machine Learningcs.CL
- Computation and Languagecs.CV
- Computer Vision and Pattern Recognitionphysics.optics
- Opticsmath.CO
- Combinatoricsstat.ML
- Machine Learning (Statistics)
For a complete list, see arXiv Subject Classifications.
Development
Running Tests
Build
Watch Mode (for development)
API Reference
This server uses the official arXiv API. For more information:
Contributing
Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Changelog
v0.1.0 (Initial Release)
- Basic arXiv API integration
- Search papers by multiple criteria
- Get individual paper details
- Category-based search
- PDF content extraction with caching
- Structured JSON response parsing
- MCP protocol implementation
You must be authenticated.
Enables AI assistants to search and retrieve academic papers from arXiv through MCP tools, supporting search by various criteria, detailed paper information, category browsing, and PDF content extraction.
- Overview
- Features
- Installation
- Usage
- Available Tools
- Common arXiv Categories
- Development
- API Reference
- Contributing
- License
- Changelog
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityThe ArXiv MCP Server bridges the gap between AI models and academic research by providing a sophisticated interface to arXiv's extensive research repository. This server enables AI assistants to perform precise paper searches and access full paper content, enhancing their ability to engage with scientific literature.Last updated -41,218PythonApache 2.0
- AsecurityAlicenseAqualityEnables AI assistants to search and access arXiv research papers through a simple Message Control Protocol interface, allowing for paper search, download, listing, and reading capabilities.Last updated -41PythonApache 2.0
- -securityAlicense-qualityEnables AI assistants to search, download, and read arXiv research papers through a Message Control Protocol interface, with support for paper filtering and local storage.Last updated -Apache 2.0
- -securityAlicense-qualityA bridge between AI assistants and ArXiv's research repository that enables searching, downloading, and reading academic papers through the Message Control Protocol.Last updated -PythonMIT License