Skip to main content
Glama
litreview-mcp

litreview-mcp

by ajbraus

litreview-mcp

An MCP server for literature reviews. It lets an AI assistant search scholarly papers, follow citation trails and find legal open-access PDFs, using data from OpenAlex.

Tool

What it does

search_papers

Searches titles and abstracts, sorted by relevance, citations or newest

get_paper

Returns the abstract, full author list and a draft APA citation

get_citations

Lists the papers that cite a paper, or the papers it cites

find_open_pdf

Finds a free, legal copy of a paper

Reading order

The code is commented so you can read it top to bottom:

  1. src/server.ts: what MCP actually is. The tools, their descriptions and their schemas.

  2. src/openalex.ts: plain code that calls the OpenAlex API. No MCP here.

  3. src/stdio.ts and api/mcp.ts: two tiny files that serve the same tools locally and on the web.

  4. test/smoke.ts: a real MCP client calling the server, which shows the protocol from the other side.

Related MCP server: OpenAlex MCP Server

Five ideas to take away

  1. Tool descriptions are prompts. The model never sees your code, only the descriptions and schemas.

  2. Tool output uses up the model's context. Return what it needs for the next decision, not everything you have. That's why search results leave out abstracts.

  3. Errors are for the model to read. A clear error returned with isError: true lets it recover or explain the problem.

  4. Tools and transports are separate. The tools are defined once, and stdio and HTTP are thin wrappers around them.

  5. Keep the server stateless. A fresh server per request is what makes cheap serverless hosting possible.

Run it locally

npm install
npm test            # end-to-end check over both transports, using live OpenAlex data
npm run typecheck
npm run inspect     # opens MCP Inspector, a web UI for calling your tools by hand

To use it from Claude Code, run this from this folder:

claude mcp add litreview -- "$PWD/node_modules/.bin/tsx" "$PWD/src/stdio.ts"

Then try: "Find the seminal papers on interest development, then show me what's been built on the most cited one since 2020."

OpenAlex API key

The server works without a key, but you then share $0.10 a day with everyone on your IP address. A free key from openalex.org/settings/api gives you $1 a day, or about 1,000 searches. Single-paper lookups are free. New accounts spend their first $1 at up to $0.10 every 5 minutes.

Locally, add -e OPENALEX_API_KEY=your_key after claude mcp add litreview. Budgets reset at midnight UTC.

Deploy to Vercel

npx vercel link
npx vercel env add OPENALEX_API_KEY    # needed: Vercel's IPs are shared
npx vercel deploy --prod

Your server is then at https://<your-project>.vercel.app/mcp. To connect it:

claude mcp add --transport http litreview https://<your-project>.vercel.app/mcp

Before making it public

There's no login, so anyone with the URL can use your OpenAlex budget. On the free key the worst case is that the server stops working until midnight UTC, not a bill. Before sharing it widely:

  • Add a rate limit rule in the Vercel Firewall. It has to be there rather than in this code, because in-memory counters don't work across serverless instances.

  • Check that Vercel's Deployment Protection isn't blocking the URL for other people.

Known limits

  • OpenAlex's coverage is broad but not complete, and abstracts are missing for many papers.

  • sort: "citations" ranks the 200 most relevant matches, not every match, so a famous paper that matches the query poorly can be missed.

  • Citations are drafts. Surnames with several words and title capitalization can be wrong.

License

MIT

Available Tools

4 tools
find_open_pdfFind open-access PDFA
Read-only

Find a free, legal copy of a paper. Returns a direct pdf_url when one is known, and otherwise a read_online_url. Both are null if no open copy is known, in which case the paper is probably paywalled. Check the version field: a preprint can differ from the published paper.

Inputs: id (required).

get_citationsFollow citationsA
Read-only

Follow the citation trail from a paper, most cited first. Direction "cited_by" finds later papers that cite it, which shows how the idea developed. Direction "references" finds the papers it cites, which shows its foundations.

Inputs: id (required), direction (required), limit, from_year.

get_paperGet paper detailsA
Read-only

Get one paper's abstract, full author list, citation count and a draft APA citation. The citation is generated from metadata: check author names and title capitalization before using it. The abstract is null when OpenAlex doesn't have one.

Inputs: id (required).

search_papersSearch papersA
Read-only

Search scholarly papers by topic, matching titles and abstracts. Returns compact summaries without abstracts; use get_paper for details. Put exact phrases in double quotes for much better precision, e.g. "growth mindset" teachers. With sort "citations" or "newest", results are the top 200 most relevant papers re-ranked, so a famous paper that matches the query poorly can be missed. Each search uses some of the server's daily budget, so prefer a few well-chosen queries.

Inputs: query (required), sort, limit, to_year, +2 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a distinct action on the paper domain: retrieval by ID (get_paper), discovery by query (search_papers), citation traversal (get_citations), and open-access resolution (find_open_pdf). Descriptions explicitly cross-reference each other (search_papers says use get_paper for details), eliminating overlap.

    Naming Consistency5/5

    All four tools follow a consistent verb_noun snake_case pattern: get_paper, search_papers, get_citations, find_open_pdf. The verbs are used meaningfully and consistently across the set.

    Tool Count4/5

    Four tools is lean but fits a focused literature-review server where each tool has a clear role. It is on the thin side of well-scoped, so slightly below the ideal 5-15 range.

    Completeness4/5

    The surface covers the core research workflow end to end: search, retrieve details, follow citations forward and backward, and locate open full text. Minor gaps exist around author/venue-level queries and any save/export or batch-lookup capability, which agents would have to work around with repeated searches.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables academic research through the OpenAlex API, allowing users to search for papers, authors, and institutions, retrieve citations, and fetch full-text content when available. Perfect for building intelligent research assistants that can explore academic literature and related works.
      8
      7
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Connects AI agents to the OpenAlex scholarly database, enabling search and retrieval of works, authors, institutions, and sources via natural language.
      9
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables searching scholarly literature via the OpenAlex database, with tools for full-text search, work details, citation lookup, and author queries.
      MIT