How odaisuno/scholai works
Purpose and Entry Point
ScholAI is a Python 3.11+ MCP server that exposes academic-research tools to an MCP client. The runtime entry point is main.py, launched directly (for example through uv run main.py). Its scope is paper discovery, research-query planning, CCF venue ranking, PDF download/storage, and PDF text extraction.
Paths: main.py, pyproject.toml, requirements.txt
MCP Tool Surface
main.py is the architectural hub: it registers the MCP server and implements the public tools consumed by an AI client. The principal tool groups are:
• Discovery: arXiv search and venue/publication search.
• Research intelligence: search planning and sequential academic-query/intent extraction.
• Paper operations: PDF download, local-paper listing, and document reading.
• Metadata: CCF ranking lookup.
The MCP boundary separates conversational/model orchestration from deterministic research operations in this repository.
Paths: main.py, README.md
Search and Research-Planning Flow
A user research request enters through MCP, then either:
1. is converted into a structured search plan/query via plan_for_paper_search and sequential query extraction; or
2. is sent directly to arXiv or venue-search tools.
Search operations use asynchronous HTTP-based external retrieval and return publication information to the MCP caller. Planning is intended to improve downstream search terms, source selection, and ordering rather than act as a separate persisted workflow.
Paths: main.py, requirements.txt
External Research and Parsing Services
The server integrates multiple external boundaries:
• arXiv and publication/venue search endpoints for paper discovery.
• A papers.cool-related source, acknowledged in project documentation, for publication retrieval.
• Optional LlamaIndex cloud API for higher-fidelity PDF parsing, including table and figure extraction; it requires LLAMAINDEX_API_KEY.
httpx, HTML parsing, and LlamaIndex-backed parsing are runtime integration concerns; failure handling and credentials are therefore concentrated around the corresponding operations in main.py.
Paths: main.py, README.md, requirements.txt
PDF Acquisition and Local Document Boundary
download_paper_pdf converts a remote PDF URL into a locally stored research artifact. Downloads are placed under the repository’s data/ convention, and list_downloaded_papers exposes that local inventory. read_paper accepts a PDF path and extracts content using local PyMuPDF processing, optionally delegating to LlamaIndex for structured/enhanced output.
This creates a clear remote-to-local boundary: search results remain external metadata until explicitly downloaded; reading operates on filesystem paths rather than search records.
Paths: main.py, README.md
CCF Ranking Data
Venue ranking is local, configuration-backed lookup rather than a remote ranking service. get_ccf_rank reads the CCF conference/journal dataset from ccfrank.yml, allowing search or research agents to evaluate venue quality alongside retrieved papers.
Paths: ccfrank.yml, main.py
Runtime and Dependency Model
The application is a single-process Python MCP server, with FastMCP providing protocol/server behavior. Async network access is supported through httpx; PyMuPDF handles local PDFs; PyYAML supports ranking data; BeautifulSoup supports HTML-derived search results. Dependency installation is managed through uv metadata/lockfiles or pip requirements.
Paths: pyproject.toml, uv.lock, requirements.txt
Main entry points: main.py FastMCP entry point · pyproject.toml Python dependency runtime · ccfrank.yml CCF rank dataset
Components 13
MCP server
Single-process Python runtime and public research tools.
- FastMCP entry point · Registers and serves the public MCP tool surface.
main.py - Search planning · Builds structured search plans and sequential query intent.
main.py - Paper discovery · Runs arXiv and venue/publication searches.
main.py - Paper operations · Downloads, lists, and reads local PDFs.
main.py - CCF ranking lookup · Evaluates conference and journal venue rank.
main.py - PyMuPDF extraction · Extracts content from PDF filesystem paths.
main.py - Python dependency runtime · uv or pip installs FastMCP, httpx, PyMuPDF, YAML, and HTML parsing dependencies.
pyproject.toml
External services
Remote discovery and optional enhanced parsing boundaries.
- arXiv & publication APIs · Remote sources for paper and venue metadata.
- papers.cool source · Additional documented publication retrieval source.
- LlamaIndex Cloud · Enhanced PDF text, table, and figure extraction.
Local artifacts
Repository-managed paper and ranking data.
- Downloaded PDFs · Repository data/ convention for acquired papers.
- CCF rank dataset · Local conference and journal ranking source.
ccfrank.yml
Other components
- MCP client · Invokes ScholAI research tools.
Connections 16
- MCP client → FastMCP entry point: MCP requests
- FastMCP entry point → Search planning: planning tools
- FastMCP entry point → Paper discovery: discovery tools
- FastMCP entry point → Paper operations: paper tools
- FastMCP entry point → CCF ranking lookup: metadata tool
- Search planning → Paper discovery: query and source plan
- Paper discovery → arXiv & publication APIs: async retrieval
- Paper discovery → papers.cool source: publication retrieval
- Paper operations → arXiv & publication APIs: PDF URL
- Paper operations → Downloaded PDFs: download and list
- Paper operations → PyMuPDF extraction: read local path
- PyMuPDF extraction → LlamaIndex Cloud: optional enhanced parsing
- CCF ranking lookup → CCF rank dataset: loads ranks
- Python dependency runtime → FastMCP entry point: runs server
- Python dependency runtime → Paper discovery: HTTP and HTML dependencies
- Python dependency runtime → PyMuPDF extraction: PyMuPDF dependency