Skip to main content

An MCP server that provides search functionality for arXiv.org papers

Project description

arXiv Search MCP Server

PyPI version Python Support License: MIT

An MCP (Model Context Protocol) server that provides search functionality for arXiv.org papers using the official arXiv API.

Features

  • Search by terms: Search papers by keywords in titles, abstracts, and content
  • Subject filtering: Filter results by arXiv subject categories (physics, cs, math, etc.)
  • Date range filtering: Filter papers by submission date range
  • Configurable results: Control the number of results returned (max 2000)
  • PDF URLs included: Direct links to paper PDFs for easy access
  • Comprehensive metadata: Author names, abstracts, categories, publication dates, and more

Installation

From PyPI (Recommended)

pip install arxiv-search-mcp-server

From Source

  1. Clone the repository:
git clone https://github.com/gavinHuang/arxiv-search-mcp.git
cd arxiv-search-mcp
  1. Install the package:
pip install -e .

Usage

Running the Server

As a CLI command (after pip install)

arxiv-search-mcp

As a Python module

python -m arxiv_search_mcp.server

From source

python src/arxiv_search_mcp/server.py

Available Tools

1. search_arxiv_papers

Search for papers on arXiv with various filtering options.

Parameters:

  • terms (required): Search terms to look for in paper titles, abstracts, and content
  • subject (optional): Subject category to filter by (see available categories below)
  • start_date (optional): Start date for filtering papers in YYYY-MM-DD format
  • end_date (optional): End date for filtering papers in YYYY-MM-DD format
  • max_results (optional): Maximum number of results to return (default: 10, max: 2000)

Example:

search_arxiv_papers(
    terms="quantum computing",
    subject="quant-ph",
    start_date="2023-01-01",
    end_date="2023-12-31",
    max_results=20
)

2. get_subject_categories

Get a list of available subject categories for filtering.

Returns: Dictionary of category codes and their descriptions.

Available Subject Categories

  • physics - Physics (general)
  • astro-ph - Astrophysics
  • cond-mat - Condensed Matter Physics
  • gr-qc - General Relativity and Quantum Cosmology
  • hep-ex - High Energy Physics - Experiment
  • hep-lat - High Energy Physics - Lattice
  • hep-ph - High Energy Physics - Phenomenology
  • hep-th - High Energy Physics - Theory
  • math-ph - Mathematical Physics
  • nlin - Nonlinear Sciences
  • nucl-ex - Nuclear Experiment
  • nucl-th - Nuclear Theory
  • quant-ph - Quantum Physics
  • math - Mathematics
  • cs - Computer Science
  • econ - Economics
  • eess - Electrical Engineering and Systems Science
  • stat - Statistics
  • q-bio - Quantitative Biology
  • q-fin - Quantitative Finance

Response Format

Search results include the following information for each paper:

{
  "arxiv_id": "2301.12345",
  "title": "Paper Title",
  "authors": ["Author 1", "Author 2"],
  "abstract": "Paper abstract...",
  "categories": ["cs.LG", "cs.AI"],
  "published_date": "2023-01-15",
  "pdf_url": "http://arxiv.org/pdf/2301.12345v1",
  "arxiv_url": "http://arxiv.org/abs/2301.12345",
  "comment": "Author comments",
  "journal_ref": "Journal reference if available",
  "doi": "DOI if available"
}

API Limits

  • Maximum 2000 results per request (arXiv API limitation)
  • Rate limiting: Please be respectful with API calls (arXiv recommends 3-second delays between requests for bulk operations)
  • Results are returned by relevance by default

Error Handling

The server handles various error conditions:

  • Invalid search parameters
  • Network connectivity issues
  • arXiv API errors
  • Malformed responses

Errors are returned in a structured format with descriptive messages.

Dependencies

  • fastmcp - MCP server framework
  • requests - HTTP client for arXiv API calls
  • feedparser - Atom/RSS feed parsing
  • urllib3 - URL handling utilities

License

This project follows the arXiv API Terms of Use. Please respect arXiv's resources and use the API responsibly.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arxiv_search_mcp_server-0.1.1.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arxiv_search_mcp_server-0.1.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file arxiv_search_mcp_server-0.1.1.tar.gz.

File metadata

  • Download URL: arxiv_search_mcp_server-0.1.1.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.9

File hashes

Hashes for arxiv_search_mcp_server-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9cc659cf7d0a76c32b67041a864f27def01b218b55e699160f22aae8f33642a2
MD5 80e7b87fa4c6589a0a25fdd225f906e3
BLAKE2b-256 31fa11a3983f87644b34a83d6268039f625512b890c28fb379e05c86e3c5dd4f

See more details on using hashes here.

File details

Details for the file arxiv_search_mcp_server-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for arxiv_search_mcp_server-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 74b1b245bbd19b8f26e751251a5f5935c102ccd6017d951ff008531c11dc90eb
MD5 cf2f2767a774da3c67963ca004388531
BLAKE2b-256 86f859ca75f68b77075e548456dcdc4c54287dd6b99599eba8b4477c9acbd52b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page