scholar-mcp
You can give LLM agents grounded academic-literature retrieval and citation analysis via MCP tools.
Search Semantic Scholar by keywords with year/citation filters and sorting.
Search arXiv by keywords, category, and newest/updated ordering.
Fetch full paper metadata, abstracts, authors, venue, links, and citation counts.
Retrieve forward citations and references, optionally influential-only.
Find similar/related papers from a seed paper.
Build bounded citation graphs with ranked key papers.
Export deterministic BibTeX entries for up to 20 paper IDs.
Read
paper://{id}paper cards and cache stats via MCP resources.Use prompts for evidence-grounded related-work reviews and literature maps.
Provides category-aware academic paper search over arXiv, including sorting by newest for fresh preprints, with paper IDs normalized from arXiv identifiers and URLs.
Provides academic literature search, paper details, citation and reference retrieval, related-paper discovery, bounded citation-graph construction, and BibTeX export using Semantic Scholar's Graph and Recommendations APIs.
Click on "Deploy 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., "@scholar-mcp Find recent papers on graph neural networks and export BibTeX for the top 5"
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.
scholar-mcp
An MCP server that gives LLM agents grounded access to academic literature: paper search over arXiv and Semantic Scholar, citation graphs, related-paper discovery, and BibTeX export, plus prompt templates that make the model write related-work summaries only from retrieved evidence.
Design rule: tools fetch and compute; the LLM reasons and writes. Search, graph construction, ranking and BibTeX happen in code (reproducible, testable). Summaries are written by the client model from tool output, guided by MCP prompts, so every claim traces back to a paper the server actually returned.
Architecture
flowchart LR
A[LLM client<br/>Claude Desktop / Claude Code / agent.py] -- MCP: stdio or HTTP --> B[scholar-mcp server]
B --> C[Tools<br/>8 typed tools]
B --> D[Resources<br/>paper://id, cache stats]
B --> E[Prompts<br/>related_work_review, literature_map]
C --> F[HttpClient<br/>rate limit + retry + backoff]
F --> G[(SQLite TTL cache)]
F --> H[arXiv API]
F --> I[Semantic Scholar<br/>Graph + Recommendations]Related MCP server: PapersFlow
Tools
Tool | Purpose | Source |
| Keyword search with year / min-citation filters, sortable by citations | Semantic Scholar |
| Category-aware search; | arXiv |
| Full abstract, authors, venue, citation counts, links | Semantic Scholar |
| Forward citations, optionally influential-only, ranked | Semantic Scholar |
| A paper's bibliography, ranked | Semantic Scholar |
| Similar papers from a seed (recommendation model) | Semantic Scholar |
| Bounded BFS graph (depth 1-2); returns nodes, edges, | Semantic Scholar |
| Deterministic BibTeX, per-paper failure reporting | Semantic Scholar |
Resources: paper://{id} (Markdown paper card), scholar://cache/stats.
Prompts: related_work_review(topic, num_papers, year_from), literature_map(seed_paper).
All tools are annotated read-only. Paper ids can be arXiv ids (1706.03762, arXiv:...v3, URLs),
DOIs, or Semantic Scholar ids; they are normalised automatically.
Engineering notes
Typed schemas via Pydantic
Fieldconstraints (limit1-50,depth1-2, ...); invalid calls are rejected by the protocol layer before any network call.Rate limiting & resilience: per-host throttling (arXiv 1 req / 3 s, Semantic Scholar 1 req / 1.6 s, safely under its 1 req/s key limit), retries with exponential backoff, honours
Retry-After, distinct errors for 404 / 429 / 5xx.Caching: SQLite TTL cache (search 1 h, paper 24 h, citations 6 h) so agent loops don't burn quota.
LLM-readable errors: failures say what went wrong and what to try next. Errors subclass the SDK's
ToolError, because the SDK hides the text of unexpected exceptions from the client.Bounded outputs: abstracts trimmed in lists, graphs capped by nodes / per-node / per-level limits, with a
truncatedflag, so responses fit in a context window.MCP SDK compatibility: developed and tested on
mcp2.x (whereFastMCPbecameMCPServer); a small import shim keeps 1.x working, but 1.x is not covered by CI.
Quick start
git clone https://github.com/raovivek02/scholar-mcp.git && cd scholar-mcp
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev,agent]"
pytest -q # unit tests use mocked HTTP, no network needed
python scripts/live_smoke.py # one-off check against the real APIs
mcp dev src/scholar_mcp/server.py # opens the MCP Inspector (needs Node.js)Optional but recommended: a free Semantic Scholar API key
in SEMANTIC_SCHOLAR_API_KEY for reliable rate limits.
Use it from Claude Desktop / Claude Code
Claude Desktop: copy examples/claude_desktop_config.json into your config and fix the path.
Claude Code: claude mcp add scholar -- /path/to/.venv/bin/python -m scholar_mcp
Run it as an HTTP server
python -m scholar_mcp --transport streamable-http --host 127.0.0.1 --port 8000Run the agent loop
export ANTHROPIC_API_KEY=...
python client/agent.py "Write a related-work paragraph on LiDAR moving object segmentation"No paid API? Use a free local model through Ollama (or any OpenAI-compatible endpoint such as Groq, Gemini or OpenRouter):
ollama pull qwen2.5:32b # or qwen2.5:7b on a smaller GPU
python client/agent_openai.py "Write a related-work paragraph on LiDAR moving object segmentation"
python eval/run_eval.py --provider openai --model qwen2.5:32bFree hosted option: a Google AI Studio key (free tier) works through Gemini's OpenAI-compatible
endpoint - set LLM_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai/,
LLM_API_KEY, and LLM_MODEL (see the docstring in client/agent_openai.py).
client/agent.py connects over MCP, lists the tools, passes them to the model, executes tool calls
and loops until the model produces a final answer.
Evaluation
eval/run_eval.py runs the agent on the questions in eval/cases.json and reports:
Metric | Meaning |
| Required tools were called |
| Fraction of known key papers that appeared in tool output |
| Every arXiv id in the final answer was returned by a tool (no invented citations) |
| Every "(Author et al., Year)" citation matches a paper a tool returned |
| A nonexistent paper is reported as not found, not hallucinated |
python eval/run_eval.py --model claude-sonnet-5-5 # writes eval/results.mdResults (eval/results.md):
Model: gemini-3.5-flash-lite - 8 cases
metric | score |
tool_selection | 1.0 |
retrieval_recall | 0.889 |
grounded | 1.0 |
citation_support | 1.0 |
graceful_failure | 1.0 |
case | tools ok | recall | grounded | turns |
lookup-details | True | 1.0 | True | 3 |
recent-preprints | True | None | True | 2 |
forward-citations | True | None | True | 3 |
foundations-graph | True | None | True | 3 |
bibtex | True | 1.0 | True | 2 |
related-work | True | 0.667 | True | 3 |
similar-papers | True | None | True | 4 |
missing-paper | True | None | True | 3 |
Single run on 8 hand-written queries (eval/cases.json). A small sample, so treat it as a smoke-level evaluation, not a benchmark.
Example run
python client/agent_openai.py "Write a short related-work paragraph on LiDAR moving object segmentation using 5 papers, with citations" (Gemini 3.5 Flash-Lite)
Tool calls made by the agent:
[tool] search_papers({'limit': 5, 'min_citations': 20, 'sort_by': 'citations', 'query': 'LiDAR moving object segmentation'})Final answer:
Accurately segmenting moving objects from 3D LiDAR scans is a crucial capability for autonomous vehicles, enabling safe navigation, collision avoidance, and robust mapping (Chen et al., 2021; Mersch et al., 2022). Early learning-based approaches largely focused on leveraging sequential range images or point clouds to distinguish dynamic entities from static surroundings (Chen et al., 2021). To better capture geometric and temporal dependencies across consecutive frames, subsequent methods introduced sparse 4D convolutions (Mersch et al., 2022) and efficient spatial-temporal information fusion designs using dual-branch networks (Sun et al., 2022). More recent work has sought to improve computational efficiency and representational power through bird's-eye view (BEV) appearance and motion feature learning (Zhou et al., 2023), as well as by jointly modeling mutually reinforcing tasks such as scene flow estimation and moving object segmentation (Chen et al., 2024).
Every citation above matches a paper returned by that search_papers call.
Configuration
Variable | Purpose |
| Semantic Scholar key (strongly recommended) |
| Cache file path (default |
| For |
| For |
Project layout
src/scholar_mcp/ server.py (tools/resources/prompts) · semantic_scholar.py · arxiv_client.py
graph.py · bibtex.py · http.py · cache.py · ids.py · models.py · errors.py
client/agent.py tool-calling agent loop eval/ evaluation harness + cases
tests/ unit + stdio protocol tests scripts/ live API smoke testLimitations
Coverage and citation counts are whatever the two APIs return; Semantic Scholar's citation list is fetched in a 200-paper window, so very highly cited papers are sampled, not exhaustive.
Citation graphs are bounded samples of top-cited neighbours, not complete networks.
Abstracts only; full-text retrieval is not implemented.
The evaluation is small: 8 hand-written queries, one run, one model (Gemini 3.5 Flash-Lite via its free tier).
Semantic Scholar occasionally returns HTTP 429 even within the key's limit. The client retries with backoff (up to 5 times); a call that still fails reaches the model as a tool error it can react to (in one eval run the agent fell back to arXiv search).
Roadmap
Full-text PDF extraction tool · OpenAlex as a third source · author-centric tools · Docker image + auth for remote hosting.
License
MIT
Available Tools
8 toolsbuild_citation_graphARead-onlyIdempotent
Build a bounded citation graph around a seed paper.
Returns nodes, edges (source cites target), and key_papers ranked by how often they are cited within the graph - a quick way to find foundational work in a subfield. The graph is a top-cited sample, not the full network (see the 'truncated' flag).
Inputs: paper_id (required), depth, direction, max_nodes. Returns: object
export_bibtexBRead-onlyIdempotent
Generate BibTeX entries for papers. Done in code, so entries are exact and reproducible.
Inputs: paper_ids (required). Returns: object
get_citationsBRead-onlyIdempotent
Papers that cite the given paper (forward citations), from a window of up to 200.
Inputs: paper_id (required), limit, sort_by, influential_only. Returns: object
get_paper_detailsARead-onlyIdempotent
Full metadata for one paper: complete abstract, authors, venue, citation counts, links.
Inputs: paper_id (required). Returns: object
get_referencesARead-onlyIdempotent
Papers the given paper cites (its bibliography), from a window of up to 200.
Inputs: paper_id (required), limit, sort_by. Returns: object
search_arxivARead-onlyIdempotent
Search arXiv directly. Use sort_by='newest' to find the latest preprints in a category.
Results have no citation counts; call get_paper_details for those.
Inputs: query (required), limit, sort_by, year_to, +2 more. Returns: object
search_papersARead-onlyIdempotent
Search papers on Semantic Scholar (all venues, with citation counts and abstracts).
Best for finding established or influential work. Use search_arxiv for brand-new preprints.
Inputs: query (required), limit, sort_by, year_to, +2 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a distinct operation: discovery (search_papers vs search_arxiv, explicitly differentiated by venue and citation availability), metadata retrieval, forward/backward citation traversal, recommendation, graph construction, and export. The descriptions actively disambiguate the one potentially confusable pair (search_papers / search_arxiv) and cross-reference get_paper_details for missing data.
Uniform snake_case verb_noun pattern (search_*, get_*, find_*, build_*, export_*) with verbs that accurately signal the action type. No mixing of conventions, and the small verb variety reflects genuinely different operations rather than stylistic drift.
Eight tools is a tight, well-scoped surface for an academic literature server, with no redundant entries. Each tool covers a distinct step in the research workflow and none appear to be filler.
The surface covers the core scholarly lifecycle: discovery, metadata, forward/backward citation traversal, recommendation, graph analysis, and citation export. Minor gaps remain—no author-centric tools (search/list papers by author, author profiles) and no batch multi-paper details fetch, which agents must work around with repeated calls.
Maintenance
Related MCP Connectors
arXiv and OpenAlex/Crossref paper search (an open Google Scholar alternative) as agent tools.
Search arXiv/Semantic Scholar/OpenAlex + medical evidence (PubMed/Europe PMC) + LaTeX/PDF tools.
Academic paper search, scientific literature, citation analysis, arXiv & semantic related-work.
Search arXiv and ACL Anthology, retrieve citations and references, and browse web sources to accel…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to search, analyze, and summarize academic research papers in real-time from arXiv, Semantic Scholar, and PubMed. Provides automatic deduplication, citation analysis, and BibTeX generation across multiple research databases.33 npmMIT
- AlicenseNot gradedqualityDmaintenanceTurn any AI agent into an academic researcher that can search, read, cite, and write full literature reviews autonomously.14MIT
- 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-
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to search arXiv, extract and analyze paper content, and build a personal semantically-searchable research library with saved papers and notes.-