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.
search_arxiv_papers— search arXiv, with category, date-range, and sort optionsdownload_arxiv_paper— download an arXiv PDFsearch_iacr_papers— search IACR ePrintdownload_iacr_paper— download an IACR PDFsearch_dblp_papers— search DBLP, optionally with BibTeXsearch_google_scholar_papers— search Google Scholarsearch_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.
CNKI tools require institutional access. On IP-based networks the session cookie is obtained automatically on first use — no manual login needed.
From npm:
npm install -g @ai4paper/apaper-mcp{
"mcp": {
"apaper-mcp": {
"type": "local",
"command": ["npx", "@ai4paper/apaper-mcp"],
"enabled": true
}
}
}Development
- Bun
- Node.js
bun installbun run dev # start server (logs to stderr on stdio)
bun run build
bun run test
bun run typecheck
bun run start # run built serversearch_arxiv_papers- input:
{ "query": string, "max_results"?: number, "date_from"?: string, "date_to"?: string, "categories"?: string[], "sort_by"?: "relevance" | "date" }
- input:
download_arxiv_paper- input:
{ "paper_id": string, "save_path"?: string }(paper_id like2103.12345or2103.12345v2)
- input:
search_iacr_papers- input:
{ "query": string, "max_results"?: number, "fetch_details"?: boolean, "year_min"?: number | string, "year_max"?: number | string }
- input:
download_iacr_paper- input:
{ "paper_id": string, "save_path"?: string }
- input:
search_dblp_papers- input:
{ "query": string, "max_results"?: number, "year_from"?: number | string, "year_to"?: number | string, "venue_filter"?: string, "include_bibtex"?: boolean }
- input:
search_google_scholar_papers- input:
{ "query": string, "max_results"?: number, "year_low"?: number | string, "year_high"?: number | string }
- input:
search_cnki_papers- input:
{ "query": string, "page_num"?: number, "page_size"?: number }
- input:
download_cnki_paper- input:
{ "href": string, "save_path"?: string }(use anhreffromsearch_cnki_papers)
- input:
npx @modelcontextprotocol/inspector bun run src/index.ts