Skip to main content
Glama
Mnehmos

arXiv MCP Server

by Mnehmos

mnehmos.arxiv.mcp

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: MCP Research Server (arXiv)

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/Mnehmos/mnehmos.arxiv.mcp.git
    cd mnehmos.arxiv.mcp
  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)
startNoStarting index for pagination (0-based)
max_resultsNoMaximum number of results to return (max 2000)
sort_byNoSort by: relevance, lastUpdatedDate, submittedDate
sort_orderNoSort order: ascending or descending

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

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.

Tool Schema Changelog

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

  1. 4 tool updates
    • First observedget_paper
    • First observedget_paper_content
    • First observedsearch_by_category
    • First observedsearch_papers

TDQS

B3.2/5.0

Scored across 4 tools

Disambiguation4/5

The tools are mostly distinct, with clear purposes: get_paper retrieves metadata, get_paper_content extracts text, search_by_category filters by category, and search_papers searches by general criteria. There is some potential overlap between search_by_category and search_papers, as category could be a criterion in search_papers, but the descriptions help differentiate them by emphasizing category-specific vs. general searches.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern using snake_case: get_paper, get_paper_content, search_by_category, and search_papers. The naming is predictable and readable, with no deviations in style or convention across the set.

Tool Count4/5

With 4 tools, the count is reasonable for an arXiv server, covering key operations like retrieving paper details, content, and searching. It is slightly under-scoped, as it lacks tools for updates, deletions, or advanced filtering, but it effectively supports core arXiv interactions without being overwhelming.

Completeness3/5

The tool set covers basic retrieval and search functions for arXiv papers, including metadata, content, and category-based searches. However, there are notable gaps: no tools for listing categories, handling paper versions, or managing user interactions (e.g., saving or citing papers), which limits comprehensive coverage of the arXiv domain.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables searching, retrieving, and parsing academic papers from arXiv, including keyword search, PDF downloads, content extraction from HTML/PDF formats, and accessing the latest AI research papers.
    4
    4 npm
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables searching and retrieving academic papers from arXiv by topic, allowing users to discover research papers and extract their metadata including titles, authors, abstracts, and PDF links through natural language queries.
    -
  • A
    license
    A
    quality
    B
    maintenance
    Enables searching and retrieving academic papers from arXiv with support for advanced filtering by author, category, and date, plus full paper content extraction.
    6
    15
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables searching academic papers on arXiv and retrieving detailed information such as title, authors, summary, and PDF link.
    1
    6
    MIT