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
| Tool | Source | Description |
|---|---|---|
search_arxiv_papers |
arXiv | Search with category, date-range, and sort options |
download_arxiv_paper |
arXiv | Download a PDF |
search_iacr_papers |
IACR ePrint | Search the ePrint archive |
download_iacr_paper |
IACR ePrint | Download a PDF |
search_dblp_papers |
DBLP | Search, optionally with BibTeX |
search_google_scholar_papers |
Google Scholar | Search |
search_cnki_papers |
CNKI (中国知网) | Search |
download_cnki_paper |
CNKI (中国知网) | Download a 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.
IACR ePrint sits behind Cloudflare, which intermittently serves a JS bot challenge that automated HTTP clients can't solve — most often on PDF downloads. Search keeps working; when a download is challenged the tool reports it clearly (rather than saving the challenge page) and gives you the URL to fetch in a browser. This is server-side and unrelated to any proxy.
Proxy
Set SPIDER_PROXY to route outbound requests — arXiv, IACR, DBLP, Google
Scholar, and their PDF downloads — through a proxy. CNKI is excluded on purpose:
it authenticates by institutional IP and always uses this host's real address.
Both a standard URL and the colon-delimited form some mobile-proxy providers
hand out are accepted:
SPIDER_PROXY="socks5://user:pass@host:1086" # standard
SPIDER_PROXY="socks5://host:1086:user:pass" # host:port:user:pass (e.g. Kookeey)
SPIDER_PROXY="http://user:pass@host:8080" # HTTP CONNECT proxy
socks5, socks4, http, and https schemes are supported (the scheme
defaults to http when omitted) by the Python runtime. The scheme must match
the proxy's port — a SOCKS port won't accept http:// and vice versa. If
SPIDER_PROXY is set but invalid or can't be initialised, requests are blocked
rather than sent direct, so a misconfigured proxy never leaks this host's real
IP.
Flaky residential/mobile proxies routinely drop or refuse connections;
idempotent (GET) requests through the proxy are retried automatically on such
transient failures. IACR fires the most requests per search (a detail fetch per
result), so its per-request timeouts default high for slow proxies — tune with
IACR_TIMEOUT_MS (30000) and IACR_DOWNLOAD_TIMEOUT_MS (60000).
Install from PyPI
The maintained runtime requires Python 3.12+. Run the published package
directly with uvx:
uvx apaper-mcp
To install the command for repeated use:
uv tool install apaper-mcp
apaper-mcp
For an MCP client, use the published package as the local stdio command:
{
"mcp": {
"apaper-mcp": {
"type": "local",
"command": ["uvx", "apaper-mcp"],
"enabled": true
}
}
}
Development
Clone the repository and install its development dependencies with uv:
uv sync
uv run apaper-mcp
Run tests with uv run pytest.
The Python source uses a standard src package layout. Platform-specific
clients live under src/apaper_mcp/platforms/, while shared server, proxy,
formatter, and model code stays in src/apaper_mcp/.
Local MCP testing
Start the MCP Inspector against the Python stdio server:
npx @modelcontextprotocol/inspector uv run --directory . apaper-mcp
The equivalent module command is:
npx @modelcontextprotocol/inspector \
uv run --directory . python -m apaper_mcp
To pass the proxy to the inspected server:
npx @modelcontextprotocol/inspector \
-e SPIDER_PROXY="$SPIDER_PROXY" \
uv run --directory . apaper-mcp
The Inspector opens a local web UI for listing tools, inspecting schemas, and calling tools.
Tool schemas
search_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:
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 apaper_mcp-0.3.3.tar.gz.
File metadata
- Download URL: apaper_mcp-0.3.3.tar.gz
- Upload date:
- Size: 101.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc0de506e6f6f181e131618981cca55b71b7946a75e3e1da0949c8989d697acb
|
|
| MD5 |
4cf20fc2c8848680d97e858328a541b8
|
|
| BLAKE2b-256 |
af5ac6376f9ef0704d2081605d49dc48749dab46e3be52fb51ce49fb94f2f645
|
Provenance
The following attestation bundles were made for apaper_mcp-0.3.3.tar.gz:
Publisher:
release-publish.yml on ai4paper/apaper-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
apaper_mcp-0.3.3.tar.gz -
Subject digest:
fc0de506e6f6f181e131618981cca55b71b7946a75e3e1da0949c8989d697acb - Sigstore transparency entry: 2280262306
- Sigstore integration time:
-
Permalink:
ai4paper/apaper-mcp@a4c78aea1bb761bae363520b66fce80eb15c4f28 -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/ai4paper
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-publish.yml@a4c78aea1bb761bae363520b66fce80eb15c4f28 -
Trigger Event:
push
-
Statement type:
File details
Details for the file apaper_mcp-0.3.3-py3-none-any.whl.
File metadata
- Download URL: apaper_mcp-0.3.3-py3-none-any.whl
- Upload date:
- Size: 23.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dae1580ea5cbbc2da1945aa13dffe6bf6d295f7d627597349add024bc1d1805f
|
|
| MD5 |
63558766b18dd910e0340d7c2b0c2ba9
|
|
| BLAKE2b-256 |
4e871f3ed06f9a43558ee789989c7d1e21b8e945f009d46bf237190736ef06d0
|
Provenance
The following attestation bundles were made for apaper_mcp-0.3.3-py3-none-any.whl:
Publisher:
release-publish.yml on ai4paper/apaper-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
apaper_mcp-0.3.3-py3-none-any.whl -
Subject digest:
dae1580ea5cbbc2da1945aa13dffe6bf6d295f7d627597349add024bc1d1805f - Sigstore transparency entry: 2280262344
- Sigstore integration time:
-
Permalink:
ai4paper/apaper-mcp@a4c78aea1bb761bae363520b66fce80eb15c4f28 -
Branch / Tag:
refs/tags/v0.3.3 - Owner: https://github.com/ai4paper
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-publish.yml@a4c78aea1bb761bae363520b66fce80eb15c4f28 -
Trigger Event:
push
-
Statement type: