Skip to main content

FastMCP server template — replace this with your description

Project description

scholar-mcp

A FastMCP server providing structured academic literature access via Semantic Scholar, with OpenAlex enrichment and optional docling-serve PDF conversion.

Features

Search & Retrieval

  • search_papers — full-text search with year, field-of-study, venue, and citation-count filters
  • get_paper — fetch full metadata for a single paper by DOI, S2 ID, arXiv ID, ACM ID, or PubMed ID
  • get_author — fetch author profile and publications, or search by name

Citation Graph

  • get_citations — forward citations (papers that cite a given paper)
  • get_references — backward references (papers cited by a given paper)
  • get_citation_graph — BFS traversal returning nodes + edges up to configurable depth
  • find_bridge_papers — shortest citation path between two papers

Recommendations

  • recommend_papers — paper recommendations from positive (and optional negative) examples

Utility

  • batch_resolve — resolve up to 100 identifiers to full metadata in one call
  • enrich_paper — augment S2 metadata with OpenAlex fields (open-access URL, topics, concepts)

PDF Conversion (requires docling-serve)

  • fetch_paper_pdf — download open-access PDF for a paper
  • convert_pdf_to_markdown — convert local PDF to Markdown via docling-serve
  • fetch_and_convert — full pipeline: fetch OA PDF → convert to Markdown

Cache Management (CLI)

  • scholar-mcp cache stats — show cache row counts and file size
  • scholar-mcp cache clear [--older-than N] — clear cache entries

Quick Start

With uvx

# stdio transport (default, for Claude Desktop / MCP clients)
SCHOLAR_MCP_S2_API_KEY=your-key uvx --from pvliesdonk-scholar-mcp scholar-mcp serve

# HTTP transport
uvx --from pvliesdonk-scholar-mcp scholar-mcp serve --transport http --port 8000

Note: The PyPI package is pvliesdonk-scholar-mcp. The CLI command installed is scholar-mcp.

With Docker

docker run -e SCHOLAR_MCP_S2_API_KEY=your-key \
           -v scholar-mcp-data:/data/scholar-mcp \
           ghcr.io/pvliesdonk/scholar-mcp:latest

Configuration

All settings are controlled via environment variables with the SCHOLAR_MCP_ prefix.

Variable Default Description
SCHOLAR_MCP_S2_API_KEY Semantic Scholar API key (optional; unauthenticated rate limit applies without it)
SCHOLAR_MCP_READ_ONLY true If true, write-tagged tools (fetch_paper_pdf) are hidden
SCHOLAR_MCP_CACHE_DIR /data/scholar-mcp Directory for the SQLite cache database
SCHOLAR_MCP_DOCLING_URL Base URL of a running docling-serve instance (e.g. http://localhost:5001)
SCHOLAR_MCP_VLM_API_URL OpenAI-compatible VLM endpoint for formula/figure-enriched PDF conversion
SCHOLAR_MCP_VLM_API_KEY API key for the VLM endpoint
SCHOLAR_MCP_VLM_MODEL gpt-4o Model name for VLM-enriched conversion
SCHOLAR_MCP_LOG_LEVEL INFO Logging level (DEBUG, INFO, WARNING, ERROR)
SCHOLAR_MCP_BEARER_TOKEN Bearer token for HTTP transport authentication
SCHOLAR_MCP_OIDC_ISSUER OIDC issuer URL for JWT authentication
SCHOLAR_MCP_OIDC_AUDIENCE Expected audience for OIDC tokens

Docker Compose

services:
  scholar-mcp:
    image: ghcr.io/pvliesdonk/scholar-mcp:latest
    restart: unless-stopped
    environment:
      SCHOLAR_MCP_S2_API_KEY: "${SCHOLAR_MCP_S2_API_KEY}"
      SCHOLAR_MCP_DOCLING_URL: "http://docling-serve:5001"
      SCHOLAR_MCP_VLM_API_URL: "${VLM_API_URL}"
      SCHOLAR_MCP_VLM_API_KEY: "${VLM_API_KEY}"
      SCHOLAR_MCP_CACHE_DIR: "/data/scholar-mcp"
      SCHOLAR_MCP_READ_ONLY: "false"
    volumes:
      - scholar-mcp-data:/data/scholar-mcp
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.scholar-mcp.rule=Host(`scholar-mcp.yourdomain.com`)"
      - "traefik.http.routers.scholar-mcp.middlewares=authelia@docker"

  docling-serve:
    image: ghcr.io/ds4sd/docling-serve:latest
    restart: unless-stopped

volumes:
  scholar-mcp-data:

Cache Management

# Show cache statistics
scholar-mcp cache stats

# Clear all cached data (preserves identifier aliases)
scholar-mcp cache clear

# Remove entries older than 30 days
scholar-mcp cache clear --older-than 30

# Override cache directory
scholar-mcp cache stats --cache-dir /path/to/cache

Development

# Install with dev dependencies
uv sync --extra dev --extra mcp

# Run tests
uv run pytest

# Lint and format
uv run ruff check src/ tests/
uv run ruff format src/ tests/

# Type check
uv run mypy src/

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pvliesdonk_scholar_mcp-1.0.1.tar.gz (214.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pvliesdonk_scholar_mcp-1.0.1-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

Details for the file pvliesdonk_scholar_mcp-1.0.1.tar.gz.

File metadata

  • Download URL: pvliesdonk_scholar_mcp-1.0.1.tar.gz
  • Upload date:
  • Size: 214.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pvliesdonk_scholar_mcp-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a6f88a29f40ccd445feb0d4e23dd8d2734b8e0c1e6f53097bbae82bd06ab3164
MD5 02ce615c0f0619b1241058456488692d
BLAKE2b-256 f65f90b3c2b978569113bf4f75a143348f7972717a9cc265e75ed27d5fcfa6ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for pvliesdonk_scholar_mcp-1.0.1.tar.gz:

Publisher: release.yml on pvliesdonk/scholar-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pvliesdonk_scholar_mcp-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pvliesdonk_scholar_mcp-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 55f8977059acf341645c2471796ab00aef3c001fc2f38e50f86335e065184fd4
MD5 700bd0775ab3308b6b63953123e0a7da
BLAKE2b-256 948546c17ae47887a6268acccd350b4193ad5e5721acdb227ecf9b1f55aaf932

See more details on using hashes here.

Provenance

The following attestation bundles were made for pvliesdonk_scholar_mcp-1.0.1-py3-none-any.whl:

Publisher: release.yml on pvliesdonk/scholar-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page