Skip to main content
Glama
Mnehmos

arXiv MCP Server

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.

Related MCP server: ArXiv MCP Server

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

  1. Clone this repository:

    git clone https://github.com/your-username/arxiv-mcp-server.git
    cd arxiv-mcp-server
  2. Install dependencies:

    npm install
  3. Build the project:

    npm run build

Usage

As an MCP Server

Start the server:

npm start

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:

{
  "mcpServers": {
    "arxiv": {
      "name": "arxiv-mcp-server",
      "command": "node",
      "args": ["build/index.js"],
      "cwd": "C:/path/to/arxiv-mcp-server",
      "enabled": true,
      "alwaysAllow": [
        "search_papers",
        "get_paper",
        "search_by_category",
        "get_paper_content"
      ],
      "env": {}
    }
  }
}

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 (run npm 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 fields

  • category (string, optional): arXiv category (e.g., cs.AI, physics.optics)

  • author (string, optional): Author name to search for

  • title (string, optional): Words to search for in the title

  • abstract (string, optional): Words to search for in the abstract

  • start (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 by relevance, lastUpdatedDate, or submittedDate

  • sort_order (string, optional): Sort order ascending or descending

Example Response:

{
  "feed_title": "arXiv Query: search_query=all:machine+learning",
  "total_results": 150000,
  "start_index": 0,
  "items_per_page": 10,
  "papers": [
    {
      "id": "http://arxiv.org/abs/2104.13478",
      "arxiv_id": "2104.13478",
      "title": "Advanced Machine Learning Techniques",
      "summary": "This paper discusses advanced machine learning techniques...",
      "authors": ["John Smith", "Jane Doe"],
      "published": "2021-04-28T09:00:00Z",
      "updated": "2021-04-28T09:00:00Z",
      "categories": ["cs.LG", "cs.AI"],
      "links": [
        {
          "href": "http://arxiv.org/abs/2104.13478",
          "rel": "alternate",
          "type": "text/html"
        }
      ]
    }
  ]
}

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 or cs/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 by relevance, lastUpdatedDate, or submittedDate

  • sort_order (string, optional): Sort order ascending or descending

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 Intelligence

  • cs.LG - Machine Learning

  • cs.CL - Computation and Language

  • cs.CV - Computer Vision and Pattern Recognition

  • physics.optics - Optics

  • math.CO - Combinatorics

  • stat.ML - Machine Learning (Statistics)

For a complete list, see arXiv Subject Classifications.

Development

Running Tests

npm test

Build

npm run build

Watch Mode (for development)

npm run test:watch

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

Available Tools

4 tools
get_paperC

Get details about a specific paper by its arXiv ID

ParametersJSON Schema
NameRequiredDescriptionDefault
paper_idYesarXiv paper ID (e.g., 2104.13478 or cs/0001001)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states it 'Get details' but doesn't specify what details are returned (e.g., metadata, abstract, authors), whether it's a read-only operation, potential rate limits, error handling for invalid IDs, or authentication needs. This leaves significant gaps for an AI agent to understand the tool's behavior beyond basic purpose.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that efficiently conveys the core purpose without unnecessary words. It's front-loaded with the main action ('Get details'), making it easy to parse. There's zero waste, and every part of the sentence earns its place by specifying the resource and key input.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (1 parameter, no output schema, no annotations), the description is incomplete. It lacks details on what 'details' include, which is crucial since there's no output schema to define the return values. For a tool with no annotations and no output schema, the description should provide more behavioral context to be fully helpful for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the parameter 'paper_id' fully documented in the schema as 'arXiv paper ID (e.g., 2104.13478 or cs/0001001)'. The description adds no additional parameter semantics beyond what the schema provides, such as format constraints or examples. Given the high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but doesn't need to heavily.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get details') and resource ('specific paper'), making the purpose immediately understandable. It specifies retrieval by arXiv ID, which distinguishes it from general search tools. However, it doesn't explicitly differentiate from sibling tools like get_paper_content, which might retrieve different aspects of papers.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like get_paper_content (which might retrieve content vs. metadata), search_by_category, or search_papers (which handle broader queries). There's no context about prerequisites, such as needing a specific paper ID rather than searching by other criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_paper_contentC

Get the full text content of a paper by downloading and extracting text from its PDF

ParametersJSON Schema
NameRequiredDescriptionDefault
paper_idYesarXiv paper ID (e.g., 2104.13478 or cs/0001001)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'downloading and extracting text from its PDF', which implies network operations and processing, but fails to disclose critical traits such as potential rate limits, authentication needs, error handling, or performance characteristics (e.g., time to download/process). For a tool with no annotations, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that efficiently conveys the tool's purpose and method without unnecessary words. It is front-loaded with the core action ('Get the full text content'), making it easy to parse. Every part of the sentence earns its place by adding value, resulting in an optimal balance of brevity and informativeness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (involving PDF download and text extraction) and the absence of both annotations and an output schema, the description is incomplete. It does not explain what the return value looks like (e.g., plain text, structured data), potential errors, or operational constraints. For a tool with no structured data to supplement it, the description should provide more context to be fully helpful.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'paper_id' parameter well-documented as 'arXiv paper ID (e.g., 2104.13478 or cs/0001001)'. The description does not add any meaning beyond this schema, as it does not elaborate on parameter usage or constraints. With high schema coverage, the baseline score of 3 is appropriate, as the schema handles the parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get the full text content of a paper by downloading and extracting text from its PDF.' It specifies the verb ('Get'), resource ('full text content of a paper'), and method ('downloading and extracting text from its PDF'), which is specific and actionable. However, it does not explicitly differentiate from sibling tools like 'get_paper' (which might return metadata instead of content), so it misses full sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention sibling tools such as 'get_paper', 'search_by_category', or 'search_papers', nor does it specify contexts or exclusions for usage. This lack of comparative guidance limits the agent's ability to select the correct tool in a multi-tool environment.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_by_categoryC

Search for papers in a specific arXiv category

ParametersJSON Schema
NameRequiredDescriptionDefault
categoryYesarXiv category (e.g., cs.AI, physics.optics)
max_resultsNoMaximum number of results to return (max 2000)
sort_byNoSort by: relevance, lastUpdatedDate, submittedDate
sort_orderNoSort order: ascending or descending
startNoStarting index for pagination (0-based)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions searching but doesn't describe what the search returns (e.g., paper metadata, abstracts), whether it's paginated (implied by 'start' parameter but not explained), rate limits, or authentication requirements. This is inadequate for a search tool with multiple parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core function without unnecessary words. It's appropriately sized for a search tool and front-loads the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with 5 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the search returns, how results are structured, or provide context about arXiv categories. The agent would need to rely heavily on the input schema alone.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 5 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema (e.g., it doesn't explain category hierarchy or result format). Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Search for') and resource ('papers in a specific arXiv category'), making the purpose immediately understandable. However, it doesn't distinguish this tool from its sibling 'search_papers', which appears to be a similar search function but without the category specificity mentioned.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'search_papers' or 'get_paper'. It doesn't mention prerequisites, constraints, or typical use cases beyond the basic function, leaving the agent to infer usage from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_papersC

Search for papers on arXiv by various criteria

ParametersJSON Schema
NameRequiredDescriptionDefault
abstractNoWords in the abstract
authorNoAuthor name
categoryNoarXiv category (e.g., cs.AI, physics.optics)
max_resultsNoMaximum number of results to return (max 2000)
queryNoGeneral search query across all fields
sort_byNoSort by: relevance, lastUpdatedDate, submittedDate
sort_orderNoSort order: ascending or descending
startNoStarting index for pagination (0-based)
titleNoWords in the title

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It mentions searching 'by various criteria' but doesn't describe what happens when multiple criteria are combined, whether results are paginated, what format results come in, or any rate limits or authentication requirements for arXiv API access.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just 7 words with zero wasted language. It's front-loaded with the core purpose and efficiently communicates the essential information without unnecessary elaboration or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a search tool with 9 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what the search returns, how results are structured, whether there are limitations beyond the documented max_results parameter, or how this differs from sibling search tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the schema already documents all 9 parameters thoroughly. The description adds no additional parameter semantics beyond mentioning 'various criteria,' which is already evident from the parameter names. This meets the baseline expectation when schema coverage is complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('search for papers') and resource ('on arXiv'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from its sibling 'search_by_category' which appears to offer more targeted searching, missing an opportunity for clear differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance about when to use this tool versus alternatives. With sibling tools like 'search_by_category' available, there's no indication of when this general search is preferable versus more specialized searches, leaving the agent without contextual usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

B3.3/5.0
Disambiguation4/5

The tools are mostly distinct, with clear separation between getting paper details, extracting content, and two search methods. However, the two search tools (search_by_category and search_papers) could potentially cause some confusion as both involve searching, though their specific purposes (category-based vs. general criteria) are clarified in descriptions.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with clear, descriptive naming. Each name starts with an action verb (get, search) followed by a specific noun or phrase, maintaining uniformity throughout the set.

Tool Count4/5

With 4 tools, the count is reasonable for an arXiv server, covering core operations like retrieval and search. It might be slightly lean, as additional tools for advanced filtering or metadata could enhance coverage, but it's well-scoped for basic functionality.

Completeness4/5

The tool set covers essential arXiv operations: retrieving paper details and content, and searching by category or criteria. Minor gaps exist, such as no tools for listing categories, handling paper versions, or user-specific features like favorites, but core workflows are adequately supported.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    The 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.
    19
    3,091
    Apache 2.0
  • A
    license
    B
    quality
    D
    maintenance
    Enables 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.
    4
    7
    Apache 2.0
  • A
    license
    B
    quality
    D
    maintenance
    An MCP server for searching and downloading academic papers from multiple sources including arXiv, PubMed, bioRxiv, and Sci-Hub, designed for seamless integration with large language models like Claude Desktop.
    795
    57
    2,515
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mnehmos/arxiv-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server