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.0.tar.gz (206.6 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.0-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pvliesdonk_scholar_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 206.6 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.0.tar.gz
Algorithm Hash digest
SHA256 8402a3c0ba2dac8d0693379fbe95630a11b86757c97303d1dd8342e14e1322cb
MD5 376e62bcc2a2042d3dc71abf6914a112
BLAKE2b-256 676c92c57610135a7b6a94fdea567116cbb3a3ed8f704cd47b9a638c45e00ed4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pvliesdonk_scholar_mcp-1.0.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pvliesdonk_scholar_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 575d1818a827505572dc28e71ed92065e93c7f73f77939a44c2844558232ef90
MD5 cdf79cb731dd32ca1d24821e9cedf498
BLAKE2b-256 8979370e1fab7f70e864a103378dd84abd9964521920531cc2d5c15e66006592

See more details on using hashes here.

Provenance

The following attestation bundles were made for pvliesdonk_scholar_mcp-1.0.0-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