npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ai4paper/apaper-mcp

v0.1.5

Published

Academic paper research MCP server built with Bun and TypeScript.

Readme

apaper-mcp

An MCP (Model Context Protocol) server that gives AI assistants direct access to academic paper databases. It exposes a unified set of tools for searching and downloading papers across arXiv, IACR ePrint, DBLP, Google Scholar, and CNKI (中国知网), so an MCP-compatible client (Claude Code, Claude Desktop, or any other) can run literature searches, pull BibTeX entries, and fetch PDFs without leaving the chat.

Tools

  • search_arxiv_papers — search arXiv, with category, date-range, and sort options
  • download_arxiv_paper — download an arXiv PDF
  • search_iacr_papers — search IACR ePrint
  • download_iacr_paper — download an IACR PDF
  • search_dblp_papers — search DBLP, optionally with BibTeX
  • search_google_scholar_papers — search Google Scholar
  • search_cnki_papers — search CNKI (中国知网)
  • download_cnki_paper — download a CNKI PDF

arXiv tools scrape the public arxiv.org/search/ HTML page, which works on networks where the export.arxiv.org Atom API is blocked or rate-limited. If you need to route through a mirror, set ARXIV_SEARCH_URL, ARXIV_ADVANCED_URL, and/or ARXIV_PDF_BASE.

The arXiv tools throttle themselves and retry HTTP 429 / 5xx with exponential backoff, honouring Retry-After; on a persistent block the error names the throttled IP and wait time. Tune with ARXIV_MIN_INTERVAL_MS (3000), ARXIV_MAX_RETRIES (3), ARXIV_BACKOFF_BASE_MS (3000), ARXIV_BACKOFF_MAX_MS (60000), ARXIV_BACKOFF_JITTER_MS (500), and ARXIV_IP_ECHO_URL ("" to disable the IP lookup).

CNKI tools require institutional access. On IP-based networks the session cookie is obtained automatically on first use — no manual login needed.

Install

From npm:

npm install -g @ai4paper/apaper-mcp

MCP client config

{
  "mcp": {
    "apaper-mcp": {
      "type": "local",
      "command": ["npx", "@ai4paper/apaper-mcp"],
      "enabled": true
    }
  }
}

Requirements

  • Bun
  • Node.js

Install from source

bun install

Dev / build / test

bun run dev        # start server (logs to stderr on stdio)
bun run build
bun run test
bun run typecheck
bun run start      # run built server

Tool schemas

  • search_arxiv_papers
    • input: { "query": string, "max_results"?: number, "date_from"?: string, "date_to"?: string, "categories"?: string[], "sort_by"?: "relevance" | "date" }
  • download_arxiv_paper
    • input: { "paper_id": string, "save_path"?: string } (paper_id like 2103.12345 or 2103.12345v2)
  • search_iacr_papers
    • input: { "query": string, "max_results"?: number, "fetch_details"?: boolean, "year_min"?: number | string, "year_max"?: number | string }
  • download_iacr_paper
    • input: { "paper_id": string, "save_path"?: string }
  • search_dblp_papers
    • input: { "query": string, "max_results"?: number, "year_from"?: number | string, "year_to"?: number | string, "venue_filter"?: string, "include_bibtex"?: boolean }
  • search_google_scholar_papers
    • input: { "query": string, "max_results"?: number, "year_low"?: number | string, "year_high"?: number | string }
  • search_cnki_papers
    • input: { "query": string, "page_num"?: number, "page_size"?: number }
  • download_cnki_paper
    • input: { "href": string, "save_path"?: string } (use an href from search_cnki_papers)

Local MCP testing

npx @modelcontextprotocol/inspector bun run src/index.ts