GO

Google Scholar MCP Server for AI Paper Access

Enable AI assistants to search and access Google Scholar papers via a simple MCP server interface for fast, reliable paper retrieval.

Quick Install
npx -y @JackKuo666/Google-Scholar-MCP-Server

Overview

This MCP server exposes Google Scholar search and paper retrieval functionality through a lightweight HTTP interface that follows the Model Context Protocol (MCP) tool model. It lets developer-run AI assistants query Scholar, retrieve structured metadata (title, authors, venue, year, abstract snippet), and download accessible PDFs or external links in a consistent, machine-friendly format. By running a local MCP server you avoid embedding scraping logic into each assistant, centralize caching, and simplify access control and rate-limiting.

The server is useful when building research assistants, literature review pipelines, or chatbots that need on-demand access to academic papers. It provides a stable tool surface that an LLM can call as a capability (search / fetch / metadata) rather than relying on raw HTML parsing in model prompts. This improves reliability, enables caching, and makes it easier to add authentication, logging, and usage limits.

Features

  • Search Google Scholar by query and return ranked results with structured metadata
  • Retrieve detailed paper metadata (title, authors, abstract snippets, citations, links)
  • Directly fetch available PDFs or external landing pages when publicly accessible
  • MCP-compatible tool descriptor for seamless integration with model tool invocation flows
  • Local caching to reduce repeated Scholar queries and improve response times
  • Configurable rate limits and user-agent/cookie settings to manage access
  • Simple HTTP API with JSON responses for easy integration

Installation / Configuration

Minimum steps to get the server running locally. Adjust commands depending on repo language (Python/Node). The examples below assume a Python implementation; substitute npm commands when necessary.

Clone repository:

git clone https://github.com/JackKuo666/Google-Scholar-MCP-Server.git
cd Google-Scholar-MCP-Server

Create a virtual environment and install dependencies:

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Environment configuration (example .env):

PORT=8080
CACHE_DIR=./cache
USER_AGENT="Mozilla/5.0 (compatible; ScholarMCP/1.0; +https://example.com)"
RATE_LIMIT_PER_MIN=30
GOOGLE_SCHOLAR_COOKIE=  # optional, if you use an authenticated session proxy

Start the server:

# default entry point
python server.py
# or with explicit environment
PORT=8080 python server.py

Docker (optional):

# Dockerfile example
FROM python:3.11-slim
WORKDIR /app
COPY . /app
RUN pip install -r requirements.txt
ENV PORT=8080
EXPOSE 8080
CMD ["python", "server.py"]

Important notes:

  • Configure a reasonable User-Agent and rate limits to avoid being blocked.
  • If you need content behind paywalls, set up your own access proxies; this server does not bypass publisher restrictions.

Available Tools / Resources

The server exposes a small set of MCP-style endpoints that AI agents can call. Below is a representative table of endpoints; actual endpoints may differ slightly — check the running server’s tool manifest endpoint (e.g., /mcp/tools) for exact names.

EndpointMethodParametersDescription
/mcp/toolsGETReturns the MCP tool descriptor (tool names, inputs, outputs)
/searchPOSTquery, limit, year_from, year_toSearch Scholar and return list of result metadata
/paperGETid (scholar id or URL)Return detailed metadata for a given paper
/fetch_pdfGETurl or idRetrieve accessible PDF content or direct PDF URL
/healthGETServer health and cache stats

Example tool manifest (returned by /mcp/tools):

{
  "tools": [
    {
      "name": "scholar.search",
      "description": "Search Google Scholar for papers matching a query",
      "inputs": {"query": "string", "limit": "integer"},
      "outputs": {"results": "array"}
    },
    {
      "name": "scholar.get_paper",
      "description": "Get detailed metadata for a given paper id",
      "inputs": {"id": "string"},
      "outputs": {"paper": "object"}
    }
  ]
}

Use Cases

  • Literature review assistant

    • Workflow: Agent calls scholar.search(“deep learning transfer learning survey”, limit=10), inspects results, calls scholar.get_paper(id) to fetch abstracts and PDF links, and synthesizes a summary and recommended readings.
  • Citation extraction for a manuscript

    • Workflow: Provide a list of citation queries to the server; use scholar.get_paper to pull metadata and authoritative titles/authors for a BibTeX generator.
  • Paper retrieval for summarization

    • Workflow: Agent uses scholar.search to locate the paper, scholar.get_paper to get abstract and links, and fetch_pdf to download the PDF (if publicly accessible) for downstream extractive or abstractive summarization.
  • Building a scholarly chatbot

    • Workflow: Integrate the MCP endpoint as a tool in the assistant runtime so the model can call scholar.search or scholar.get_paper on demand rather than relying solely on in-context knowledge.

Example curl usage:

# Search
curl -X POST "http://localhost:8080/search" \
  -H "Content-Type: application/json" \
  -d '{"query":"graph neural networks survey","limit":5}'

# Get paper details
curl "http://localhost:8080/paper?id=scholar:XXXXXX"

# Fetch PDF (returns redirect or binary)
curl -L "http://localhost:8080/fetch_pdf?url=https://example.com/paper.pdf" -o paper.pdf

Best practices and caveats

  • Respect robots and rate limits: configure RATE_LIMIT_PER_MIN and use caching to reduce load.
  • Legal and ethical: do not use the server to circumvent paywalls or violate publisher terms. Use institutional access where appropriate.
  • Test the MCP tool manifest after start-up to confirm exact tool names and input schemas before wiring the server into an LLM toolchain.

This server is intended as a developer-facing component to centralize Google Scholar access for model tools. Use it to make scholarly retrieval deterministic, cacheable, and easier to integrate into AI-driven research workflows.

Tags:search