Search ArXiv research papers
602 stars2 watching39 forks

ArXiv MCP Server πŸ“š

Stars License: MIT Python Version Tests

πŸ” Empower AI models with direct access to academic research through an elegant MCP interface.

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.

<div align="center">

🌟 View Demo β€’ πŸ“– Documentation β€’ 🀝 Contribute β€’ πŸ“ Report Bug

</div>

✨ Core Features

  • πŸ”Ž Advanced Search: Precise queries with date ranges and category filters
  • πŸ“₯ Smart Downloads: Papers become instantly accessible MCP resources
  • πŸš€ Async Architecture: Built for performance and scalability
  • πŸ’Ύ Local Caching: Efficient repeated access to frequently used papers

πŸš€ Quick Start

Install using uv:

uv pip install git+https://github.com/blazickjp/arxiv-mcp-server.git

For development:

# Clone and set up development environment
git clone https://github.com/blazickjp/arxiv-mcp-server.git
cd arxiv-mcp-server

# Create and activate virtual environment
uv venv
source .venv/bin/activate

# Install with test dependencies
uv pip install -e ".[test]"

πŸ”Œ Claude Desktop Integration

Add this configuration to your Claude Desktop config file to enable ArXiv paper access:

<details> <summary>πŸ“ Click to view configuration</summary>
{
    "mcpServers": {
        "arxiv-mcp-server": {
            "command": "uv",
            "args": [
                "run",
                "arxiv-mcp-server",
                "--storage-path", "/path/to/paper/storage",
                "--max-results", "50",
                "--timeout", "30"
            ]
        }
    }
}
</details>

Make sure to adjust the storage path and other parameters according to your needs. This configuration enables Claude to search and access ArXiv papers directly through the MCP server.

πŸ’‘ Usage

Paper Search

Search with precision using multiple criteria:

# Example: Find recent AI papers
result = await call_tool("search_papers", {
    "query": "transformer architecture applications",
    "max_results": 10,
    "date_from": "2023-01-01",
    "categories": ["cs.AI", "cs.LG"],
})

# Response includes detailed metadata
{
    "total_results": 10,
    "papers": [
        {
            "id": "2401.12345",
            "title": "Example Paper Title",
            "authors": ["Author Name"],
            "abstract": "Paper abstract...",
            "categories": ["cs.AI"],
            "published": "2024-01-15T00:00:00Z",
            "resource_uri": "arxiv://2401.12345"
        }
    ]
}

Paper Download

Transform papers into accessible resources:

result = await call_tool("download_paper", {
    "paper_id": "2401.12345"
})

βš™οΈ Configuration

Customize through environment variables:

| Variable | Purpose | Default | |----------|---------|---------| | ARXIV_STORAGE_PATH | Paper storage location | ~/.arxiv-mcp-server/papers | | ARXIV_MAX_RESULTS | Search results limit | 50 | | ARXIV_REQUEST_TIMEOUT | API timeout (seconds) | 30 |

πŸ§ͺ Development

Run the comprehensive test suite:

python -m pytest

The test suite provides:

  • βœ… Unit tests for components
  • πŸ”„ Integration tests for MCP compliance
  • 🎭 Mock-based service testing
  • πŸ“Š Coverage reporting

πŸ—οΈ Technical Architecture

Our modular design consists of four key components:

  1. πŸ› οΈ Tool Layer: MCP protocol interface
  2. πŸ“š Resource Management: Paper storage and retrieval
  3. πŸ”Œ Service Layer: ArXiv API integration
  4. βš™οΈ Configuration: Environment-based settings

🀝 Contributing

We enthusiastically welcome contributions! To get started:

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch
  3. ✨ Make your enhancements
  4. βœ… Ensure tests pass
  5. πŸ“ Update documentation
  6. πŸš€ Submit a pull request

πŸ“¦ Dependencies

Core

  • πŸ“š arxiv>=2.1.0
  • πŸ”Œ mcp>=1.0.0
  • 🌐 aiohttp>=3.9.1
  • ✨ pydantic>=2.8.0
  • πŸ“… python-dateutil>=2.8.2
  • πŸ“ aiofiles>=23.2.1

Development

  • πŸ§ͺ pytest>=8.0.0
  • ⚑ pytest-asyncio>=0.23.5
  • πŸ“Š pytest-cov>=4.1.0
  • 🎭 pytest-mock>=3.10.0

πŸ“„ License

Released under the MIT License. See the LICENSE file for details.


<div align="center">

Made with ❀️ by the ArXiv MCP Server Team

If you find this project helpful, please consider giving it a star ⭐

</div>

Features

ArXiv
Research papers
Academic search

Category

Search