A MCP server for searching and downloading academic papers from multiple sources.
Project description
Paper Search MCP
A Model Context Protocol (MCP) server for searching and downloading academic papers from multiple sources, including arXiv, PubMed, bioRxiv, and Sci-Hub (optional). Designed for seamless integration with large language models like Claude Desktop.
Table of Contents
Overview
paper-search-mcp is a Python-based MCP server that enables users to search and download academic papers from various platforms. It provides tools for searching papers (e.g., search_arxiv) and downloading PDFs (e.g., download_arxiv), making it ideal for researchers and AI-driven workflows. Built with the MCP Python SDK, it integrates seamlessly with LLM clients like Claude Desktop.
Features
- Multi-Source Support: Search and download papers from arXiv, PubMed, bioRxiv, and Sci-Hub (optional).
- Standardized Output: Papers are returned in a consistent dictionary format via the
Paperclass. - Asynchronous Tools: Efficiently handles network requests using
httpx. - MCP Integration: Compatible with MCP clients for LLM context enhancement.
- Extensible Design: Easily add new academic platforms by extending the
academic_platformsmodule.
Installation
paper-search-mcp can be installed using uv or pip. Below are two approaches: a quick start for immediate use and a detailed setup for development.
Quick Start
For users who want to quickly run the server:
-
Install with uv (recommended):
uv add paper-search-mcp
OR with pip:
pip install paper-search-mcp
-
Run the Server:
uv run -m paper_search_mcp.server # With uv # OR python -m paper_search_mcp.server # With pip
-
Verify Installation:
python -c "import paper_search_mcp; print(paper_search_mcp.__version__)"
For Development
For developers who want to modify the code or contribute:
-
Setup Environment:
# Install uv if not installed curl -LsSf https://astral.sh/uv/install.sh | sh # Clone repository git clone https://github.com/yourusername/paper-search-mcp.git cd paper-search-mcp # Create and activate virtual environment uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install Dependencies:
# Install project in editable mode uv add -e . # Add development dependencies (optional) uv add pytest flake8
-
Verify Setup:
# Check installation python -c "import paper_search_mcp; print(paper_search_mcp.__version__)" # Run tests python -m unittest discover tests
Testing
To ensure the server works correctly, run the included unit tests.
-
Activate Environment:
source .venv/bin/activate
-
Run Tests:
python -m unittest discover tests
test_arxiv.py: Tests theArxivSearcherclass.test_server.py: Tests the MCP server tools (search_arxivanddownload_arxiv).
Expected Output:
.... Ran 4 tests in X.XXXs OK
Usage
Running the Server
Start the MCP server locally:
python -m paper_search_mcp.server
The server runs with stdio transport, ready to accept MCP client connections.
Using with Claude Desktop
-
Install Claude Desktop: Download from Anthropic's website and install the latest version.
-
Configure MCP Server: Open or create
~/Library/Application Support/Claude/claude_desktop_config.json(Mac) or equivalent path (Windows/Linux). Add the server configuration:{ "mcpServers": { "paper_search_server": { "command": "python", "args": [ "-m", "paper_search_mcp.server" ] } } }
Save and restart Claude Desktop.
-
Verify Integration: In Claude Desktop, look for the hammer icon (🔨) in the UI. Click it to see available tools (
search_arxiv,download_arxiv, etc.).
Example Commands
-
Search Papers:
Search for "machine learning" papers on arXivReturns a list of 10 papers (default
max_results). -
Download a Paper:
Download arXiv paper 2106.12345Saves the PDF to
./downloads(default path). -
Custom Search:
Search PubMed for "cancer treatment" with max_results=5Returns 5 papers from PubMed.
Deployment
Local Deployment
For personal use or development:
nohup python -m paper_search_mcp.server &
Keeps the server running in the background. Check nohup.out for server output.
Cloud Deployment
To deploy on a cloud service (e.g., AWS EC2):
-
Set Up EC2 Instance:
- Launch an Ubuntu instance.
- Open port 22 (SSH) and ensure internet access.
-
Install Dependencies:
sudo apt update sudo apt install python3 python3-pip git git clone https://github.com/yourusername/paper-search-mcp.git cd paper-search-mcp pip3 install -e .
-
Run Server:
python3 -m paper_search_mcp.server
Use
screenortmuxto keep it running after logout:screen python3 -m paper_search_mcp.server # Press Ctrl+A, then D to detach
Contributing
We welcome contributions! Here's how to get started:
-
Fork the Repository: Click "Fork" on GitHub.
-
Clone and Set Up:
git clone https://github.com/yourusername/paper-search-mcp.git cd paper-search-mcp pip install -e ".[dev]" # Install dev dependencies (if added to pyproject.toml)
-
Make Changes:
- Add new platforms in
academic_platforms/. - Update tests in
tests/.
- Add new platforms in
-
Submit a Pull Request: Push changes and create a PR on GitHub.
Demo
License
This project is licensed under the MIT License. See the LICENSE file for details.
Happy researching with paper-search-mcp! If you encounter issues, open a GitHub issue.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file paper_search_mcp-0.1.0.tar.gz.
File metadata
- Download URL: paper_search_mcp-0.1.0.tar.gz
- Upload date:
- Size: 211.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abd0bf74d3529eee796fc0cdc8d7e7493db97472f9624118cb40b77f946b6efc
|
|
| MD5 |
f746ebe651ce944f13a8f0b3bc335328
|
|
| BLAKE2b-256 |
0a4b2277f34aca12f381b1921477fe243ea6dc2405e856ee4c41dc63610fbb90
|
Provenance
The following attestation bundles were made for paper_search_mcp-0.1.0.tar.gz:
Publisher:
publish.yml on openags/paper-search-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
paper_search_mcp-0.1.0.tar.gz -
Subject digest:
abd0bf74d3529eee796fc0cdc8d7e7493db97472f9624118cb40b77f946b6efc - Sigstore transparency entry: 192994447
- Sigstore integration time:
-
Permalink:
openags/paper-search-mcp@cfc4899e501674253ffd8af2564d54669357182a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/openags
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cfc4899e501674253ffd8af2564d54669357182a -
Trigger Event:
push
-
Statement type:
File details
Details for the file paper_search_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: paper_search_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3566836676144742665b8a537d4eba939f89f05e508ca1878f7215df0931eea2
|
|
| MD5 |
f4ce7495a37dfb41598c17c08aafb871
|
|
| BLAKE2b-256 |
10112e46a47fe3760529cf8c25ac9e234668fae70e4a6d57b1c0a18e9192a108
|
Provenance
The following attestation bundles were made for paper_search_mcp-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on openags/paper-search-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
paper_search_mcp-0.1.0-py3-none-any.whl -
Subject digest:
3566836676144742665b8a537d4eba939f89f05e508ca1878f7215df0931eea2 - Sigstore transparency entry: 192994449
- Sigstore integration time:
-
Permalink:
openags/paper-search-mcp@cfc4899e501674253ffd8af2564d54669357182a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/openags
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cfc4899e501674253ffd8af2564d54669357182a -
Trigger Event:
push
-
Statement type: