ai-papers-mcp
Live search of arXiv papers with support for date filters (past 12 months, specific year, date range) and sorting by relevance or date. Uses web scraping or Atom API backend.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ai-papers-mcpsearch arxiv for papers on diffusion models"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AI Papers Helper
Search, index, and read academic AI/ML papers β from the terminal or directly inside your AI coding assistant.
AI Papers Helper crawls top-tier AI/ML conference proceedings, indexes them in a local SQLite database with FTS5 search, queries arxiv, and converts paper PDFs into clean markdown for in-depth reading. It ships as both a CLI (papers) and an MCP server (ai-papers-mcp), so you can use it standalone or wire it into Claude Code / any MCP-compatible client.
β¨ Features
π Conference crawling β Fetch papers from NeurIPS, ICML, ICLR, CVPR, ICCV, WACV, AAAI, IJCAI, MLSys, ACL, EMNLP with parallel workers and incremental crawl state.
π Local search β SQLite + FTS5 with BM25 ranking (title-weighted) and relevance/date ordering. Missing-abstract penalty keeps results meaningful.
π‘ arxiv search β Live arxiv search via web scraping (default) or the Atom API backend, with date filters (past 12 months, specific year, date range).
π PDF β Markdown β Parse papers through the MinerU API with content-addressable caching, so each PDF is only parsed once.
π TOC & grep β Extract a paper's table of contents and
grepspecific sections/equations from its full markdown.π€ MCP server β Expose everything as 4 tools to Claude Code or any MCP client: search the local library, search arxiv, get a paper's TOC, and grep paper content.
π§ Smart resolution β Paper lookup falls back progressively: exact DB match β fuzzy match (
SequenceMatcher, 0.8 threshold) β arxiv search.
Related MCP server: arXiv MCP Server
π¦ Installation
Requires Python 3.12+.
# Clone
git clone https://github.com/<your-org>/ai_papers_helper.git
cd ai_papers_helper
# Install as a global tool (exposes `papers` and `ai-papers-mcp` on PATH)
uv tool install --force .This exposes two console scripts:
Command | Description |
| The CLI app |
| The MCP server |
Environment variables
Variable | Default | Description |
| β | Required for PDFβmarkdown parsing. Get one at mineru.net. |
|
| arxiv backend: |
|
| Minimum seconds between arxiv API calls (rate limiting). |
All data lives under ~/.ai_papers_helper/:
~/.ai_papers_helper/
βββ papers.db # SQLite database (FTS5 index)
βββ crawl_state.json # Incremental crawl state
βββ cache/ # HTTP response cache
βββ arxiv_cache/ # arxiv result cache (24h TTL)
βββ papers/ # Parsed markdown (content-addressed by URL hash)π Quick start
1. Initialize the database
papers init2. Crawl conference papers
# Crawl everything new (incremental β skips already-crawled years)
papers update
# Crawl a specific conference and year
papers update --conference acl,emnlp --year 2024
# Force re-crawl a specific source/year
papers update --force --conference cvpr --year 2023
# Tune parallelism
papers update --workers 163. Search
# Search the local library (default: titles only)
papers search-library "diffusion model"
papers sl "graph neural network" --order-by date
# Titles + full abstracts
papers sl "transformer attention" --full-abs
# Paginate
papers sl "reinforcement learning" --page 2
papers sl "reinforcement learning" --from 31
# Search arxiv
papers search-arxiv "mixture of experts"
papers sa "vision transformer" --sort-by date --date-filter-by past_12
papers sa "llm" --date-filter-by specific_year --date-year 2024
papers sa "diffusion" --date-filter-by date_range --date-from 2024-01 --date-to 2024-064. Read a paper
# Get the full markdown (creates a /tmp/<title>.md symlink to the cached file)
papers content "Attention Is All You Need"
# Show the table of contents
papers content "Attention Is All You Need" --tocπ§© Skill (for AI coding agents)
The repo ships a ready-made Agent Skills skill at papers-skill/SKILL.md. It teaches AI coding agents (pi, Claude Code, etc.) how to drive the papers CLI: when to prefer the local library vs arxiv, the search -> content -> grep workflow, and the full option reference.
The agent loads the skill on-demand when a task matches, then runs papers itself via the shell - no server process required. This is the lightest-weight way to let an agent search and read papers.
Install the skill
Point your agent at the papers-skill directory. For pi:
# Global (available in every project)
ln -s "$(pwd)/papers-skill" ~/.pi/agent/skills/papers
# Or project-level
mkdir -p .pi/skills && ln -s "$(pwd)/papers-skill" .pi/skills/papersSkill vs MCP: The skill is just instructions (the agent runs the CLI via shell); the MCP server below exposes typed tools. The skill needs nothing running, the MCP server gives more structured tool calls - pick whichever fits your agent.
π€ Using the MCP server
The same functionality is exposed as an MCP server for use inside Claude Code or any MCP-compatible client.
4 tools
Tool | Description |
| Search the local indexed database by keywords. |
| Search arxiv for the latest papers, with date filters. |
| Get a paper's table of contents. Call this first before reading. |
|
|
π Architecture
src/ai_papers_helper/
βββ cli.py # Typer CLI: init, search-library, search-arxiv, update, content
βββ mcp_server.py # FastMCP server exposing 4 tools
βββ config.py # Paths, env vars, page-size constants
βββ core/
β βββ models.py # Pydantic v2: Author, Paper
β βββ database.py # SQLite + FTS5 singleton, BM25 ranking, auto-sync triggers
βββ crawler/
β βββ base.py # BaseCrawler ABC + parallel detail-page fetching
β βββ http.py # Shared requests.Session w/ retry + file cache
β βββ state.py # CrawlState (per-source crawled years, JSON)
β βββ cvf.py # CVPR / ICCV / WACV
β βββ aaai.py # AAAI
β βββ ijcai.py # IJCAI
β βββ icml.py # ICML URL helpers
β βββ acl_anthology.py # ACL / EMNLP (ACL Anthology)
β βββ json_api.py # Generic JSON API crawler (NeurIPS, ICML, ICLR, MLSys)
βββ search/
β βββ library_search.py # Local FTS5 search, relevance/date ordering
β βββ arxiv_search.py # arxiv dispatcher (web vs api backend)
βββ retrieval/
β βββ resolver.py # Progressive lookup: exact β fuzzy β arxiv
β βββ parser.py # MinerU API client (async polling, content-addressed cache)
β βββ content.py # Markdown TOC extraction + section slicing
β βββ lookup.py # End-to-end: title β paper β markdown
βββ helper/ # arxiv web/api internals, pagination, rate limitingHow search works
Local library: FTS5 with
porter unicode61tokenizer. BM25 with title weight10.0, abstract weight1.0. Results with missing abstracts are penalized (* 0.9) so well-documented papers surface first.Date ordering: BM25 rank is bucketed into relevance tiers; within a tier, newer papers come first β so you don't lose relevance entirely.
arxiv: Web scraping by default (no API key, gentler). Switch to the Atom API with
ARXIV_BACKEND=apifor query-syntax power (field prefixes, boolean operators).
How PDF reading works
Resolve the paper by title (DB exact β fuzzy β arxiv).
Resolve a PDF URL (
paper.pdf_url, else arxiv lookup, backfilling the DB).Send to MinerU; poll until
done; download & unzip the result.Cache under
~/.ai_papers_helper/papers/{sha256(url)[:16]}/full.mdβ content-addressed, so re-reads are instant.
π§ͺ Development
uv sync # install deps
pytest # run the full suite
pytest tests/test_database.py # single file
pytest -k "fuzzy" # by name patternTests use temp databases, mock network calls (patch.object(crawler, "_fetch_url", ...)), and HTML/JSON fixtures in tests/fixtures/. See CLAUDE.md for the full contributor guide.
Conventions
Python 3.12+,
from __future__ import annotationsin every fileNo async; parallelism via
ThreadPoolExecutorStandard-library
sqlite3(no ORM),requestsfor HTTPLogging via
logging.getLogger(__name__)
π License
MIT
Available Tools
4 toolsget_paper_tocARead-onlyIdempotent
Get the table of contents of a paper. Always call this tool FIRST before reading a paper's content, then use grep_paper_content to read specific chapters or search for content.
Return the table of contents of the designated paper.
Args:
title: Paper title (supports fuzzy matching, but provide as accurately as possible).
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate read-only and idempotent behavior. The description adds useful context beyond annotations: fuzzy title matching and the sequential requirement to call before other content tools. Does not detail return format, but with annotations covering safety, this is a minor gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: first sentence states the purpose, second provides usage order, and third explains the parameter. No unnecessary fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter, read-only tool, the description covers purpose, usage sequence, and parameter semantics adequately. It does not describe the return format, but given the simple nature and existing annotations, the description is sufficiently complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Input schema only defines title as a string. The description explains the meaning of the title parameter, notes that fuzzy matching is supported, and advises providing it as accurately as possible. This fully compensates for the 0% schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool retrieves the table of contents of a paper. It uses a specific verb ('Get') and resource ('table of contents'), and distinguishes itself from sibling tools like grep_paper_content by positioning itself as the first step before content reading.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly instructs to call this tool FIRST before reading a paper's content, then directs to grep_paper_content for reading chapters or searching. This provides clear when-to-use guidance and names the alternative tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
grep_paper_contentARead-onlyIdempotent
Grep patterns in the full converted markdown text of a paper. Pipes the paper's parsed markdown as stdin to the given grep command.
Returns the stdout of the grep command.
Args:
title: Paper title (supports fuzzy matching, but provide as accurately as possible).
grep_command: Full grep command to run. Paper markdown is piped as stdin. Examples:
- 'grep -A 150 "3 METHODOLOGY"' to read a whole section
- 'grep -i -C 3 "learning rate"' shows 3 lines of context around it
- 'grep -A 10 "Equation 1"' to locate equations or figures
Note: First call `get_paper_toc` to get the exact section names (e.g., "3 METHODOLOGY", "4.2 Baseline").
max_chars: Max output characters (default 6000).
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| max_chars | No | ||
| grep_command | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare this as a safe, read-only, idempotent operation, so the bar is lower. The description adds useful behavioral detail: it pipes markdown as stdin, returns stdout, enforces a max_chars limit, and explains fuzzy title matching. This enriches the annotation-only picture without contradicting it.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured: a one-sentence purpose statement, a clear return line, and then parameter explanations with call-worthy examples. Every sentence earns its place without fluff, making it both concise and informative.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and lack of output schema, the description covers all essential aspects: how it works (stdin piping), what it returns (stdout), parameters, usage tips, and output limits. The note to call get_paper_toc first completes the workflow guidance. It is complete for this tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description carries the full burden. It explains each parameter thoroughly: title with fuzzy matching, grep_command with multiple examples including a recommendation to use the TOC first, and max_chars with its default. This fully compensates for the empty schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool greps patterns in a paper's full markdown text by piping it to a user-supplied grep command. This specific verb+resource clearly distinguishes it from sibling tools like search_library_papers or get_paper_toc, which operate at a higher level.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear practical context with concrete examples (reading sections, finding context) and advises calling get_paper_toc first for exact section names. However, it does not explicitly name alternative tools or state when not to use this tool, so it falls short of the highest level of guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_arxiv_papersARead-onlyIdempotent
Search arxiv for the latest research papers.
Return paper list with title (and abstract). Submitt date is provided for each paper.
Args: query: Search keywords. mode: Result display mode: "title_only" (default), "abbr_abs" (abbreviated abstracts), or "full_abs" (full abstracts). sort_by: "relevance" or "date" (default is "relevance"). sort_order: "asc" or "desc" (default is "desc"). page: 1-based page number (mutually exclusive with start_from). start_from: 1-based paper index (not page index) to start from (mutually exclusive with page). date_filter_by: Date filter mode β all_dates (default), past_12 (show papers from the past 12 months), specific_year (show papers from a specific year), or date_range (show papers from a specific date range). date_year: Four-digit year (for specific_year). date_from: Start date for date_range, format YYYY[-MM[-DD]]. date_to: End date for date_range, format YYYY[-MM[-DD]].
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | title_only | |
| page | No | ||
| query | Yes | ||
| date_to | No | ||
| sort_by | No | relevance | |
| date_from | No | ||
| date_year | No | ||
| sort_order | No | desc | |
| start_from | No | ||
| date_filter_by | No | all_dates |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnly, idempotent, and non-destructive behavior. The description adds valuable context: output includes title/abstract and submit date, and it explains parameter behaviors like the mutual exclusivity of 'page' and 'start_from'. This goes beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description front-loads the purpose in two sentences, then systematically lists parameters in a clear structure. Every sentence adds value, especially given the need to compensate for the absent schema descriptions.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 10-parameter search tool, the description covers output format, parameter semantics, and special constraints. It lacks examples or error behavior, but the rich parameter detail and annotations make it reasonably complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description's 'Args' section thoroughly documents all 10 parameters, including their meanings, defaults, formats, and mutual exclusivity. This fully compensates for the missing schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Search'), names the resource ('arxiv'), and clearly states the return value ('Return paper list with title (and abstract)'). The tool name itself distinguishes it from the sibling 'search_library_papers'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives a clear context: search arxiv for latest papers. It implicitly differentiates from sibling tools by specifying 'arxiv', but does not explicitly mention alternatives or when-not-to-use. This fits 'clear context, no exclusions'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_library_papersARead-onlyIdempotent
Search the local paper database by keywords. Indexed conferences: none
Return paper list with title (and abstract). Source of each paper is also provided.
Args:
query: Search keywords.
mode: Result display mode: "title_only" (default), "abbr_abs" (abbreviated abstracts), or "full_abs" (full abstracts).
order_by: "relevance" (default) or "date" (relevance-tiered, then newest first).
page: 1-based page number (mutually exclusive with start_from).
start_from: Paper index (not page index) to start from (mutually exclusive with page).
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | title_only | |
| page | No | ||
| query | Yes | ||
| order_by | No | relevance | |
| start_from | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare read-only, idempotent, non-destructive behavior; the description adds meaningful context beyond that by specifying the return list includes title/abstract and source, and by mentioning indexed-conference coverage. It could disclose pagination limits or result-count behavior, but the key traits are covered.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and front-loaded with the purpose, followed by a coverage caveat, return summary, and a structured Args list. It is slightly padded by 'Indexed conferences: none,' but the sentence is informative and not redundant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a search tool without an output schema, the description explains the return shape, source inclusion, display modes, ordering, and pagination. It is not fully complete because page size and precise matching behavior (e.g., metadata vs full-text) are unspecified, but the main workflow is clear.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema has zero descriptions, so the Args section carries the full explanatory burden and does so thoroughly: each parameter is named, with defaults, allowed values, and the page/start_from mutual-exclusivity constraint.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Search the local paper database by keywords.' It clarifies the local scope, distinguishing it from sibling search_arxiv_papers, and the return of paper lists with abstracts differentiates it from grep_paper_content/get_paper_toc.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies this is for searching the local paper database, and 'Indexed conferences: none' provides a context cue, but it never explicitly states when to prefer this over sibling tools or gives exclusion criteria. No alternatives are named.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.1.0- First observed
get_paper_toc - First observed
grep_paper_content - First observed
search_arxiv_papers - First observed
search_library_papers
TDQS
Scored across 4 tools
The two search tools (search_library_papers and search_arxiv_papers) are clearly differentiated by their source (local vs arxiv), and the paper-reading tools (get_paper_toc and grep_paper_content) serve distinct purposes. Minor potential for confusion exists between the two search tools, but descriptions clarify the difference.
All tool names follow a consistent verb_noun pattern using snake_case (search_library_papers, get_paper_toc, search_arxiv_papers, grep_paper_content). The verbs vary but the structure is uniform and predictable.
Four tools is well-scoped for the server's purpose: two search tools cover different paper sources, and two tools support reading specific paper content. The count is neither sparse nor bloated.
The core workflow of finding papers and reading their content is covered. Minor gaps exist, such as lack of a tool to retrieve the full paper text directly (only grep-based section extraction) or list all papers in the local library, but these are workable limitations.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Search arXiv/Semantic Scholar/OpenAlex + medical evidence (PubMed/Europe PMC) + LaTeX/PDF tools.
Search arXiv, fetch paper metadata, and read full-text content.
Search 340M+ academic papers β citation graphs, semantic similarity, and AI literature reviews.
Search arXiv and ACL Anthology, retrieve citations and references, and browse web sources to accelβ¦
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to search and access arXiv research papers through a simple Message Control Protocol interface, allowing for paper search, download, listing, and reading capabilities.47Apache 2.0
- AlicenseAqualityDmaintenanceEnables searching, downloading, and managing academic papers from arXiv.org through natural language interactions. Provides tools for paper discovery, PDF downloads, and local paper collection management.41MIT
- AlicenseAqualityDmaintenanceEnables LLMs to search, download, and read arXiv papers with automatic PDF text extraction and section filtering. Provides AI assistants direct access to scientific literature with local caching for fast re-access.31MIT
- FlicenseAqualityDmaintenanceEnables agents to search papers across Semantic Scholar and arXiv, read and extract text from arXiv PDFs, align records across sources, and produce structured literature-analysis digests.101-