README.md
ArXiv MCP Server ๐
๐ 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.
๐ View Demo โข ๐ Documentation โข ๐ค Contribute โข ๐ Report Bug
โจ 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:
๐ Click to view configuration
{
"mcpServers": {
"arxiv-mcp-server": {
"command": "uv",
"args": [
"run",
"arxiv-mcp-server",
"--storage-path", "/path/to/paper/storage",
"--max-results", "50",
"--timeout", "30"
]
}
}
}
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:
- ๐ ๏ธ Tool Layer: MCP protocol interface
- ๐ Resource Management: Paper storage and retrieval
- ๐ Service Layer: ArXiv API integration
- โ๏ธ Configuration: Environment-based settings
๐ค Contributing
We enthusiastically welcome contributions! To get started:
- ๐ด Fork the repository
- ๐ฟ Create a feature branch
- โจ Make your enhancements
- โ Ensure tests pass
- ๐ Update documentation
- ๐ 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.
Made with โค๏ธ by the ArXiv MCP Server Team
If you find this project helpful, please consider giving it a star โญ
arXiv
A Model Context Protocol server for searching and analyzing arXiv papers