Skip to main content
Glama
literature-mcp

literature-mcp

by SinCircle

literature-mcp

An MCP server that gives an agent direct search access to the main academic literature APIs plus PDF full-text extraction. It is a thin wrapper: each tool calls one upstream API and returns that API's own fields, rather than merging everything into a normalised record. That matters when you want per-source details — arXiv's pdf_url, Semantic Scholar's openAccessPdf, Crossref's container-title — that an aggregator would drop.

Tools

Tool

Upstream

What it returns

search_arxiv

export.arxiv.org/api/query

title, arXiv id, abs/pdf URLs, published date, year, authors, DOI, abstract

search_crossref

api.crossref.org/works

title, DOI, authors, journal, year, abstract

search_semanticscholar

api.semanticscholar.org/graph/v1

title, year, venue, authors, external ids, abstract, open-access PDF URL

search_tavily

api.tavily.com/search

title, URL, relevance score, snippet — web results, lower confidence than the paper databases

extract_url

api.tavily.com/extract

clean readable text of one web page

read_paper_pdf

local file or URL (PyMuPDF)

page count and full extracted text; downloads the PDF first if given a URL

The first three need no credentials. search_tavily and extract_url require a Tavily API key. No key is hard-coded in the source — everything is read from the environment or a .env file next to the package.

Every search tool takes optional year_from / year_to filters and caps result counts at 50 to stay inside the upstream rate limits. HTTP 429 responses are retried once with a short backoff.

Related MCP server: omnisearch-mcp

Install

Requires Python 3.11+ and uv.

git clone https://github.com/SinCircle/literature-mcp.git
cd literature-mcp
cp .env.example .env      # then edit .env and add your keys
uv sync

The server communicates over stdio and writes only logs to stderr, so it will not corrupt the JSON-RPC stream. Point any MCP client at:

uv run --project /absolute/path/to/literature-mcp literature-mcp

Configuration

All settings are optional and read from the environment (via .env or exported variables):

Variable

Purpose

TAVILY_API_KEY

Required for search_tavily and extract_url.

LITERATURE_MCP_CONTACT_EMAIL

Sent to Crossref's polite pool and used in the User-Agent. A real address gets faster, more reliable service.

SEMANTIC_SCHOLAR_API_KEY

Optional; raises Semantic Scholar rate limits above the shared public tier.

LITERATURE_MCP_PDF_DIR

Where read_paper_pdf saves PDFs downloaded from URLs. Defaults to ~/literature-mcp/pdfs.

Verify

uv run python -c "
import asyncio, literature_mcp.server as s
print([t.name for t in asyncio.run(s.mcp.list_tools())])
"

Expect the six tool names listed above. To smoke-test a live call without an agent:

uv run python -c "
import asyncio
from literature_mcp.server import search_crossref
print(asyncio.run(search_crossref('Kalman filter', rows=2)))
"

search_crossref is the friendliest target for a smoke test: it needs no API key and its rate limit is far more forgiving than arXiv's, which throttles aggressively and returns HTTP 429 if you call it more than a few times a minute.

Notes and limitations

  • The search tools return metadata only. Use read_paper_pdf for the text, or the open_access_pdf / pdf_url fields to find a copy.

  • read_paper_pdf returns an empty text plus a note when a PDF is scanned images with no text layer; run those through OCR yourself.

  • Results are returned in upstream order. No ranking, deduplication, or cross-source merging is applied — that is deliberate, and left to the caller.

  • Tool outputs are truncated (read_paper_pdf at max_chars, Tavily snippets at a few thousand characters) to keep responses inside an agent's context budget.

License

MIT — see LICENSE.

Available Tools

6 tools
extract_urlA

Extract clean, readable page content from a URL via Tavily (api.tavily.com/extract).

Requires TAVILY_API_KEY. Returns the extracted raw content for each result URL.

Inputs: url (required).

read_paper_pdfA

Extract the full text of a PDF given a local file path or an http(s) URL.

If given a URL, the PDF is downloaded to the server's pdf dir first. Returns local_path, page_count, char count and the extracted text (truncated to max_chars, or one page if page is given). Scanned PDFs with no text layer return an empty text plus a note telling you to run the file through OCR.

Inputs: path_or_url (required), page, max_chars.

search_arxivB

Search arXiv via its public API (export.arxiv.org/api/query).

Returns raw per-hit metadata: title, arxiv_id, abs/pdf URLs, published date, year, authors, DOI and abstract. Year filtering is applied locally on the published date.

Inputs: query (required), sort, year_to, year_from, +1 more.

search_crossrefC

Search Crossref via its public REST API (api.crossref.org/works).

Returns raw per-hit metadata: title, DOI, authors, journal, year and (stripped) abstract.

Inputs: query (required), rows, year_to, year_from.

search_semanticscholarC

Search Semantic Scholar via its public Graph API (paper/search).

Returns raw per-hit metadata: title, year, publication date, venue, authors, external ids (DOI/arXiv/PubMed), abstract and open-access PDF URL.

Inputs: query (required), limit, year_to, year_from.

search_tavilyA

Web search via Tavily (api.tavily.com/search). Requires TAVILY_API_KEY.

Returns title, url, relevance score and a content snippet per hit. Use for preprints/blog-level web statements; treat as lower confidence than paper databases.

Inputs: query (required), max_results, search_depth.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 6 tools

    Disambiguation5/5

    Each tool targets a distinct data source or extraction type: four search tools for different databases (Crossref, Semantic Scholar, Tavily, arXiv), one for web page extraction, and one for PDF text extraction. No two tools overlap in purpose, and descriptions clearly differentiate their use cases.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern: search_[source], extract_url, read_paper_pdf. Snake_case is used throughout with no mixing of conventions, making the set predictable.

    Tool Count5/5

    Six tools are well-scoped for a literature search and reading server. Each adds a distinct capability (search across four sources, web extraction, PDF reading) without redundancy or bloat.

    Completeness5/5

    The surface covers multiple literature search sources, web search, web page extraction, and PDF reading, which fully supports the domain of finding and reading papers. No obvious gaps remain for the stated purpose.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      Enables 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.
      10
      1
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables LLM agents to search academic literature across multiple sources (IEEE, arXiv, ACM, Semantic Scholar, CORE, Scite, Consensus) and index/search local PDFs.
      MIT
    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to search and retrieve academic papers from arXiv and PubMed with citation-grade extraction, providing clean citations and summaries.
      -
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to search and fetch high-quality information from multiple sources, including general web APIs, Wikipedia, arXiv, Hacker News, Stack Exchange, and Crossref, with optional pro-mode deep research and clean markdown page extraction.
      10
      MIT