Skip to main content
Glama
openags

Paper Search MCP

by openags

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
NameRequiredDescriptionDefault
identifierYes
save_pathNo./downloads
base_urlNohttps://sci-hub.se

Implementation Reference

  • 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."

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/openags/paper-search-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server