arxiv-query-mcp
An MCP (Model Context Protocol) server that gives AI assistants direct access to arXiv. Search papers, retrieve full metadata, browse categories, and read paper text.
Table of Contents
Features
- Search arXiv — Full query syntax support with title, author, abstract, and category filters
- Get paper metadata — Retrieve complete details for any paper by ID (abstract, authors, categories, DOI, links)
- Browse by category — List recent papers in specific subject areas (ML, AI, NLP, Computer Vision, etc.)
- Read paper text — Fetch HTML-rendered paper content or fallback to abstracts with links
- Flexible formatting — Response support for both markdown (human-readable) and JSON (programmatic)
- Pagination — Handle large result sets with configurable limits and offsets
- Caching — Two-tier cache (in-memory plus on-disk) so repeated queries and paper texts are served without hitting arXiv
- Polite to arXiv — Cross-process request spacing, a concurrency cap, and automatic retries with back-off on
429/5xxresponses
Installation
Prerequisites
Python 3.12or later- Dependencies
mcp[cli]>=2.3.0,httpx>=0.27.0,pydantic>=2.0.0,tenacity>=9.0,diskcache>=5.6,platformdirs>=4.0(see pyproject.toml) (project usespoetryfor dependency management)
Upgrading from 1.x: the server now requires the MCP Python SDK 2.x (
FastMCPwas renamed toMCPServer). The tool names and parameters are unchanged; only environments that pinmcp<2need to upgrade.
Recommended: uv + one-command setup
uv tool install arxiv-query-mcp
arxiv-query-mcp setup
setup registers the server with Claude Desktop (claude_desktop_config.json) and Claude Code (claude mcp add --scope user), plus Cursor (~/.cursor/mcp.json), Windsurf and Gemini CLI when installed, and downloads the agent skill into ~/.claude/skills/arxiv-query-mcp/. Existing entries in your config are preserved, including the env block of an existing arxiv entry. Skip parts with --no-claude-desktop, --no-claude-code or --no-skill. Restart your client afterwards.
Try it without installing: uvx arxiv-query-mcp setup (this registers a temporary path, so use uv tool install for a lasting setup).
| Command | Purpose |
|---|---|
arxiv-query-mcp / arxiv-query-mcp serve |
Run the MCP server over stdio |
arxiv-query-mcp setup |
Configure clients and install the skill |
arxiv-query-mcp install-skill [--target T]... [--root D] [--force] |
Download the skill into every detected agent in the project (falls back to the bundled copy offline) |
install-skill detects which agents the current project uses and writes to each; name targets explicitly with --target. It never overwrites a differing file without --force, and only edits the marked block in shared files.
| Target | Detected by | Writes |
|---|---|---|
claude-user |
always | ~/.claude/skills/arxiv-query-mcp/SKILL.md |
claude |
.claude/ |
.claude/skills/arxiv-query-mcp/SKILL.md |
cursor |
.cursor/ |
.cursor/rules/arxiv-query-mcp.mdc |
windsurf |
.windsurf/ |
.windsurf/rules/arxiv-query-mcp.md |
agents (Codex, Amp, OpenCode, Jules, …) |
AGENTS.md |
pointer block in AGENTS.md + .agents/skills/arxiv-query-mcp/SKILL.md |
gemini |
GEMINI.md or .gemini/ |
pointer block in GEMINI.md + .agents/skills/arxiv-query-mcp/SKILL.md |
Codex stores MCP servers in TOML (~/.codex/config.toml), which setup does not edit; its skill is covered by the agents target.
Install from PyPI
pip install arxiv-query-mcp
arxiv-query-mcp setup # optional: configure clients and install the skill
Build from Source
git clone https://github.com/LWaetzig/arxiv-query-mcp.git
cd arxiv-query-mcp
pip install -e .
Usage
- Detailed documentation about single tools can be found here
Integration with Claude Desktop
arxiv-query-mcp setup does this for you. To configure it by hand, add the server to your Claude Desktop configuration:
| Platform | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
Add the arxiv entry under mcpServers, replacing the path with the absolute path to your clone:
{
"mcpServers": {
"arxiv": {
"command": "arxiv-query-mcp"
}
}
}
Restart Claude Desktop. You should see the arxiv tools available in the tool picker.
Integration with Other MCP Clients
Any MCP client (e.g., Cline, Continue, or custom tools) can use this server. Configure the connection to:
Command: arxiv-query-mcp
Transport: stdio
Configuration
The server works out of the box. Every setting can be overridden with an environment variable, which you can set in the env block of your MCP client configuration:
{
"mcpServers": {
"arxiv": {
"command": "arxiv-query-mcp",
"env": { "ARXIV_MCP_L2_TTL": "86400" }
}
}
}
| Variable | Default | Description |
|---|---|---|
ARXIV_API_URL |
https://export.arxiv.org/api/query |
arXiv Atom API endpoint |
ARXIV_MCP_REQUEST_TIMEOUT |
30 |
Seconds before an HTTP request times out |
ARXIV_MCP_MAX_FETCH_CHARS |
10000 |
Maximum characters returned by arxiv_fetch_paper_text |
ARXIV_MCP_USER_AGENT |
arxiv-query-mcp/<version> (…) |
User-Agent header sent to arXiv |
ARXIV_MCP_CACHE_ENABLED |
true |
Set to false, 0, no or off to disable caching |
ARXIV_MCP_CACHE_DIR |
platform cache dir | Directory of the on-disk cache (shared between server processes) |
ARXIV_MCP_L1_TTL |
300 |
Seconds an entry stays in the in-memory cache |
ARXIV_MCP_L2_TTL |
14400 |
Seconds an entry stays in the on-disk cache |
ARXIV_MCP_NEGATIVE_TTL |
60 |
Seconds empty / not-found results are cached |
ARXIV_MCP_L1_MAXSIZE |
256 |
Maximum entries in the in-memory cache (LRU) |
ARXIV_MCP_RATE_LIMIT_ENABLED |
true |
Set to false to disable request spacing |
ARXIV_MCP_RATE_LIMIT_PERIOD |
3 |
Minimum seconds between arXiv requests, across all server processes |
ARXIV_MCP_MAX_CONCURRENCY |
2 |
Maximum simultaneous in-flight requests per process |
ARXIV_MCP_MAX_RETRIES |
4 |
Attempts per request before giving up |
ARXIV_MCP_BACKOFF_BASE |
1 |
Initial retry back-off in seconds (doubles per attempt) |
ARXIV_MCP_BACKOFF_MAX |
30 |
Upper bound for a single retry wait, including Retry-After |
ARXIV_MCP_SKILL_URL |
GitHub raw URL of SKILL.md |
URL advertised to agents in the server instructions and used by install-skill; set to an empty string to omit the notice (the bundled copy is then installed) |
Invalid numeric values stop the server at startup with an error naming the variable.
Agent skill
The package ships an agent skill, SKILL.md, that explains when and how to use the tools (query syntax, search strategy, pagination, error handling). The server advertises its URL in the MCP server instructions, which clients show to the agent when it connects, so agents that support skills or can fetch URLs can pick it up automatically. arxiv-query-mcp setup (or install-skill) downloads it from ARXIV_MCP_SKILL_URL into ~/.claude/skills/arxiv-query-mcp/, falling back to the bundled copy if the download fails.
How caching and rate limiting work
- Lookups check memory first, then disk, and only then call arXiv. Concurrent identical requests share a single fetch.
- Empty results use the shorter
ARXIV_MCP_NEGATIVE_TTLso a transient miss doesn't stick around. - Failed requests are never cached.
- Retries happen on timeouts, transport errors and
429/500/502/503/504. A numericRetry-Afterheader is honoured (up toARXIV_MCP_BACKOFF_MAX). Every attempt, including retries, respects the request spacing. - arXiv asks clients to make at most one request every 3 seconds; lowering
ARXIV_MCP_RATE_LIMIT_PERIODbelow that is not recommended.
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes with clear messages
- Push to your fork
- Open a pull request
Support
For issues, questions, or feature requests, please open an issue on GitHub.
License
Metadata
Release files for arxiv-query-mcp 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| arxiv_query_mcp-2.1.0.tar.gz | 35.3 kB | With provenance | Details for arxiv_query_mcp-2.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| arxiv_query_mcp-2.1.0-py3-none-any.whl | Python 3 | none | any | Details for arxiv_query_mcp-2.1.0-py3-none-any.whl |
Total release size: 74.5 kB
Release files / arxiv_query_mcp-2.1.0.tar.gz
| Download URL | arxiv_query_mcp-2.1.0.tar.gz |
|---|---|
| Size | 35.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05636816c619e70a7c4a6feac775f2d54973531b6c4a119d955ab45d81f04be9
|
|
BLAKE2b-256 checksum How to use checksums |
f4167347a649dc54fdc28d2ea4ef411beff1e9918bc14b5b8ce629b601e3cf50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logRelease files / arxiv_query_mcp-2.1.0-py3-none-any.whl
| Download URL | arxiv_query_mcp-2.1.0-py3-none-any.whl |
|---|---|
| Size | 39.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
76f4d005dc2b8a2298e8e282d36818d8db7d222277a1d65813ba746373377882
|
|
BLAKE2b-256 checksum How to use checksums |
e9436228d485fce3e3d93732683d1c89d29a12fab01219a7fc659b3c3f755779
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logSecurity for arxiv-query-mcp 2.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for arxiv_query_mcp-2.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.