download_scihub
Download academic paper PDFs from Sci-Hub using DOI, title, PMID, or URL. Specify save directory and optional mirror URL for access to research papers.
Instructions
Download paper PDF via Sci-Hub (optional fallback connector).
Args: identifier: DOI, title, PMID, or paper URL. save_path: Directory to save the PDF. base_url: Sci-Hub mirror URL. Returns: Downloaded PDF path on success; error message on failure.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| identifier | Yes | ||
| save_path | No | ./downloads | |
| base_url | No | https://sci-hub.se |
Implementation Reference
- paper_search_mcp/server.py:730-749 (handler)The `download_scihub` tool implementation in `server.py`, which is registered as an MCP tool using `@mcp.tool()`. It uses `SciHubFetcher` to download a PDF based on the provided identifier.
@mcp.tool() async def download_scihub( identifier: str, save_path: str = "./downloads", base_url: str = "https://sci-hub.se", ) -> str: """Download paper PDF via Sci-Hub (optional fallback connector). Args: identifier: DOI, title, PMID, or paper URL. save_path: Directory to save the PDF. base_url: Sci-Hub mirror URL. Returns: Downloaded PDF path on success; error message on failure. """ fetcher = SciHubFetcher(base_url=base_url, output_dir=save_path) result = await asyncio.to_thread(fetcher.download_pdf, identifier) if result: return result return "Sci-Hub download failed. Try DOI first, then title, or change mirror URL."