Scholarly-sources MCP: papers, patents, books, standards — search and cross-reference prior art.
Scholarly-sources MCP: papers, patents, books, standards — search and cross-reference prior art.
Scholar-MCP is a well-structured educational research server with appropriate security controls for its stated purpose. Authentication via optional API keys is properly handled through environment variables. The codebase demonstrates good practices with comprehensive test coverage, input validation, and proper error handling. Minor code quality observations around broad exception handling and logging do not materially impact security posture given the server's legitimate permissions for network access and file operations. Supply chain analysis found 2 known vulnerabilities in dependencies (1 critical, 1 high severity). Package verification found 1 issue.
3 files analyzed · 8 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Set these up before or after installing:
Environment variable: SCHOLAR_MCP_READ_ONLY
Environment variable: SCHOLAR_MCP_BEARER_TOKEN
Environment variable: SCHOLAR_MCP_BASE_URL
Environment variable: SCHOLAR_MCP_OIDC_CONFIG_URL
Environment variable: SCHOLAR_MCP_OIDC_CLIENT_ID
Environment variable: SCHOLAR_MCP_OIDC_CLIENT_SECRET
Environment variable: SCHOLAR_MCP_OIDC_JWT_SIGNING_KEY
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-pvliesdonk-scholar-mcp": {
"env": {
"SCHOLAR_MCP_BASE_URL": "your-scholar-mcp-base-url-here",
"SCHOLAR_MCP_READ_ONLY": "your-scholar-mcp-read-only-here",
"SCHOLAR_MCP_BEARER_TOKEN": "your-scholar-mcp-bearer-token-here",
"SCHOLAR_MCP_OIDC_CLIENT_ID": "your-scholar-mcp-oidc-client-id-here",
"SCHOLAR_MCP_OIDC_CONFIG_URL": "your-scholar-mcp-oidc-config-url-here",
"SCHOLAR_MCP_OIDC_CLIENT_SECRET": "your-scholar-mcp-oidc-client-secret-here",
"SCHOLAR_MCP_OIDC_JWT_SIGNING_KEY": "your-scholar-mcp-oidc-jwt-signing-key-here"
},
"args": [
"pvliesdonk-scholar-mcp"
],
"command": "uvx"
}
}
}From the project's GitHub README.
A FastMCP server for the scholarly citation landscape — papers, patents, books, and standards — giving LLMs a unified way to search, cross-reference, and retrieve prior art across all four source types via Semantic Scholar, EPO Open Patent Services, Open Library, and standards bodies (NIST, IETF, W3C, ETSI), with OpenAlex enrichment and optional docling-serve PDF/full-text conversion.
Documentation | PyPI | Docker
externalIds are automatically enriched with publisher, edition, cover URL, and subject data from Open Library.sync-standards. ISO, IEC, IEEE have a live-fetch fallback for unsynced identifiers; CC and CEN have no live API and require a sync first. Citations matching standards patterns (RFC, ISO, NIST SP, IEEE, EN, CC) are automatically enriched with structured standard_metadata including identifier, title, body, status, and full-text URL when available (see docs/guides/standards.md)..deb and .rpm packages with systemd service and security hardening.Per-domain depth is uneven. Papers currently have the richest tool surface (citation graph, recommendations, cross-referencing to all three other domains); standards are the leanest. That reflects public data availability, not a value hierarchy — writing a paper typically needs all four source types for citations and prior art. Parity work is tracked in GitHub issues and milestones; the roadmap shows intent, not a completeness commitment.
With this server mounted in an MCP client (Claude, etc.), you can:
search_papers + get_citations + enrich_paper.find_bridge_papers + get_citation_graph.get_patent + batch_resolve + standards/book enrichment.generate_citations.resolve_standard_identifier + get_standard.pip install pvliesdonk-scholar-mcp
If you add optional extras via the PROJECT-EXTRAS-START / PROJECT-EXTRAS-END sentinels in pyproject.toml, document them below:
Scholar-mcp ships two optional-dependency groups:
[mcp] — installs FastMCP; required to run scholar-mcp serve and expose tools over stdio/HTTP.[all] — currently identical to [mcp]; reserved for future optional backends.For MCP-server usage:
pip install 'pvliesdonk-scholar-mcp[mcp]'
# or, without installing into the environment:
uvx --from pvliesdonk-scholar-mcp scholar-mcp serve
Installing the bare pvliesdonk-scholar-mcp package is enough for library use (from scholar_mcp import ...) but the scholar-mcp serve CLI requires [mcp].
git clone https://github.com/pvliesdonk/scholar-mcp.git
cd scholar-mcp
uv sync --all-extras --all-groups
docker pull ghcr.io/pvliesdonk/scholar-mcp:latest
A compose.yml ships at the repo root as a starting point — copy .env.example to .env, edit, and docker compose up -d.
To attach a remote Python debugger (development only — the protocol is unauthenticated), see Remote debugging.
Download .deb or .rpm packages from the GitHub Releases page. Both install a hardened systemd unit; env configuration is sourced from /etc/scholar-mcp/env (copy from the shipped /etc/scholar-mcp/env.example).
Download the .mcpb bundle from the GitHub Releases page and double-click to install, or run:
mcpb install scholar-mcp-<version>.mcpb
Claude Desktop prompts for required env vars via a GUI wizard — no manual JSON editing needed.
scholar-mcp serve # stdio transport
scholar-mcp serve --transport http --port 8000 # streamable HTTP
For library usage (embedding the domain logic without the MCP transport), import from the scholar_mcp package directly — backend clients live under src/scholar_mcp/_s2_client.py, _epo_client.py, _openlibrary_client.py, and _standards_client.py.
The server registers a built-in get_server_info tool (via fastmcp_pvl_core.register_server_info_tool) so operators can confirm the deployed version with a single MCP call. The default response carries server_name, server_version, and core_version. Servers that talk to a remote upstream wire upstream version reporting inside the DOMAIN-UPSTREAM-START / DOMAIN-UPSTREAM-END sentinel in src/scholar_mcp/server.py — see CLAUDE.md for the wiring pattern.
Core environment variables shared across all fastmcp-pvl-core-based services:
| Variable | Default | Description |
|---|---|---|
FASTMCP_LOG_LEVEL | INFO | Log level for FastMCP internals and app loggers (DEBUG / INFO / WARNING / ERROR). The -v CLI flag overrides to DEBUG. |
FASTMCP_ENABLE_RICH_LOGGING | true | Set to false for plain / structured JSON log output. |
SCHOLAR_MCP_EVENT_STORE_URL | memory:// | Event store backend for HTTP session persistence — memory:// (dev), file:///path (survives restarts). |
Domain-specific variables go below under Domain configuration.
This server inherits opt-in per-subject authorization from fastmcp-pvl-core. The default posture is off — every authenticated caller can use every tool, resource, and prompt. Turn it on by pointing SCHOLAR_MCP_ACL_PATH at a TOML ACL file; the middleware is installed only when the path is set, and individual tools opt in by declaring meta={"required_scope": "<scope>"} at registration. A tool without required_scope is unrestricted regardless of caller.
Wire it in by uncommenting the acl_path field in src/scholar_mcp/config.py and the AuthorizationMiddleware stanza in src/scholar_mcp/server.py — both ship as commented stubs in the scaffold.
[subjects]
"user:alice@example.com" = ["read", "write"]
"user:admin@example.com" = ["*"] # wildcard — any required scope passes
"service:ci-bot" = ["read"]
"local" = ["*"] # auth-disabled subject (no bearer / OIDC vars set)
<kind>:<id> convention is documentation only; the library treats each subject as a literal string.* is the only library-treated special scope — it grants every required scope. Subject-side wildcards (* as an ACL key) are rejected at load time.read:project-foo, write:vault/personal); fastmcp-pvl-core treats every scope except * as opaque.The subject string used as a value in the bearer-tokens TOML (SCHOLAR_MCP_BEARER_TOKENS_FILE) is the same string used as a key in the ACL TOML. Same string, opposite roles — keep the two files consistent when adding or removing a principal. See Mapped bearer tokens in the authentication guide for the bearer-tokens TOML schema.
In single-token mode (SCHOLAR_MCP_BEARER_TOKEN) every authenticated caller shares one subject — the library's default (currently "bearer-anon"), override with SCHOLAR_MCP_BEARER_DEFAULT_SUBJECT; reference that string as the ACL key. When no auth is configured (no SCHOLAR_MCP_BEARER_TOKEN, SCHOLAR_MCP_BEARER_TOKENS_FILE, or OIDC env vars set — common in stdio dev rigs but also possible on HTTP), every request resolves to the literal subject "local" — reference that string as the ACL key for un-authenticated local sessions.
The ACL file is loaded once at server startup. Restart the server to pick up changes; live reload is not part of the initial implementation. load_acl fails fast with ConfigurationError on every malformed condition, so a typo in the ACL file aborts startup rather than silently denying requests.
Denied requests are logged at WARNING with the subject string for audit attribution. The wire-side error payload omits the subject by default to limit cross-user information disclosure. For internal-only servers where the subject is safe to surface to clients, construct the middleware with AuthorizationMiddleware(..., expose_subject_in_error=True).
check_authorization per-call helper, and per-token subject mapping.CI workflows reference three repository secrets. Configure them via Settings → Secrets and variables → Actions or with gh secret set:
| Secret | Used by | How to generate |
|---|---|---|
RELEASE_TOKEN | release.yml, copier-update.yml | Fine-grained PAT at https://github.com/settings/personal-access-tokens/new with contents: write and pull_requests: write (the copier-update cron opens PRs). Scoped to this repo. |
CODECOV_TOKEN | ci.yml | https://codecov.io — sign in with GitHub, add the repo, copy the upload token from the repo settings page. |
CLAUDE_CODE_OAUTH_TOKEN | claude.yml, claude-code-review.yml | Run claude setup-token locally and paste the result. |
gh secret set RELEASE_TOKEN
gh secret set CODECOV_TOKEN
gh secret set CLAUDE_CODE_OAUTH_TOKEN
GITHUB_TOKEN is auto-provided — no action needed.
The PR gate (matches CI):
uv run pytest -x -q # tests
uv run ruff check --fix . && uv run ruff format . # lint + format
uv run mypy src/ tests/ # type-check
Pre-commit runs a subset of the gate on each commit; see .pre-commit-config.yaml for details, or CLAUDE.md for the full Hard PR Acceptance Gates.
uv sync creates .venv/bin/* scripts with absolute shebangs pointing at the venv Python. If you move the repo after scaffolding (mv /old/path /new/path), uv run pytest fails with ModuleNotFoundError: No module named 'fastmcp' because the stale shebang resolves to a different interpreter than the venv's site-packages.
Fix:
rm -rf .venv
uv sync --all-extras --all-groups
uv run python -m pytest also works as a one-shot workaround (bypasses the stale entry-script shim).
uv.lock refresh after copier updateWhen copier update introduces new dependencies (e.g. a new extra added to pyproject.toml.jinja), CI runs uv sync --frozen which fails against a stale lockfile. Run uv lock locally and commit the refreshed uv.lock alongside accepting the copier-update PR.
MIT — see LICENSE.
All settings are controlled via environment variables with the SCHOLAR_MCP_ prefix.
| Variable | Default | Description |
|---|---|---|
SCHOLAR_MCP_S2_API_KEY | — | Semantic Scholar API key (request one); optional but recommended for higher rate limits |
SCHOLAR_MCP_READ_ONLY | true | If true, write-tagged tools (fetch_paper_pdf, convert_pdf_to_markdown, fetch_and_convert, fetch_pdf_by_url, fetch_patent_pdf) are hidden |
SCHOLAR_MCP_CACHE_DIR | /data/scholar-mcp | Directory for the SQLite cache database and downloaded PDFs |
SCHOLAR_MCP_CONTACT_EMAIL | — | Included in the OpenAlex User-Agent for polite pool access (faster rate limits); also enables Unpaywall PDF lookups |
| Variable | Default | Description |
|---|---|---|
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 |
| Variable | Default | Description |
|---|---|---|
SCHOLAR_MCP_EPO_CONSUMER_KEY | — | EPO OPS consumer key (register at developers.epo.org); both key and secret must be set for patent tools to appear |
SCHOLAR_MCP_EPO_CONSUMER_SECRET | — | EPO OPS consumer secret |
| Variable | Default | Description |
|---|---|---|
SCHOLAR_MCP_GOOGLE_BOOKS_API_KEY | — | Google Books API key for higher rate limits (1000 req/day without key) |
| Variable | Default | Description |
|---|---|---|
SCHOLAR_GITHUB_TOKEN | — | GitHub personal access token for Relaton sync; lifts unauthenticated GitHub rate limit from 60/hr to 5,000/hr (no scopes required for public-repo reads). Useful for repeated --force testing; daily cron is fine unauthenticated. |
| Variable | Default | Description |
|---|---|---|
SCHOLAR_MCP_BEARER_TOKEN | — | Static bearer token for HTTP transport authentication |
SCHOLAR_MCP_BASE_URL | — | Public base URL, required for OIDC (e.g. https://mcp.example.com) |
SCHOLAR_MCP_OIDC_CONFIG_URL | — | OIDC discovery endpoint URL |
SCHOLAR_MCP_OIDC_CLIENT_ID | — | OIDC client ID |
SCHOLAR_MCP_OIDC_CLIENT_SECRET | — | OIDC client secret |
SCHOLAR_MCP_OIDC_JWT_SIGNING_KEY | — | JWT signing key; required on Linux/Docker to survive restarts (openssl rand -hex 32) |
asyncio.to_thread(). Simpler client code, explicit offloading at the transport boundary.SCHOLAR_MCP_READ_ONLY=false. Safer default for first-run.{"queued": true, "task_id": ...}. PDF tools always queue unless the cache already has the conversion.scholar-mcp sync-standards, not live at runtime — avoids paywalled-HTML scraping and keeps tool calls fast.uvx --from pvliesdonk-scholar-mcp scholar-mcp serve
API key optional but recommended: The server works without a Semantic Scholar API key, but unauthenticated requests are limited to ~1 req/s and will hit 429 throttles quickly during multi-step operations like citation graph traversal. Request a free key to get ~10 req/s.
Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"scholar": {
"command": "uvx",
"args": ["--from", "pvliesdonk-scholar-mcp", "scholar-mcp", "serve"],
"env": {
"SCHOLAR_MCP_S2_API_KEY": "your-key"
}
}
}
}
uvx --from pvliesdonk-scholar-mcp scholar-mcp serve --transport http --port 8000
/plugin marketplace add pvliesdonk/claude-plugins
/plugin install scholar-mcp@pvliesdonk
Tier 2 bodies (ISO, IEC, IEEE, CC, CEN) are populated from community-curated bulk dumps rather than live-scraped at MCP-server runtime. Run the sync on first install and periodically thereafter:
scholar-mcp sync-standards # all registered bodies
scholar-mcp sync-standards --body ISO # only ISO
scholar-mcp sync-standards --body IEEE # only IEEE
scholar-mcp sync-standards --body CC # only Common Criteria
scholar-mcp sync-standards --body CEN # only CEN/CENELEC
scholar-mcp sync-standards --force # re-sync even if upstream SHA is unchanged
Schedule via cron / launchd / systemd timer — weekly is sufficient; standards change slowly. First sync can take several minutes; subsequent runs that find no upstream changes exit within seconds.
28 tools, organised by scholarly source type.
| Tool | Description |
|---|---|
search_papers | Full-text search with year, venue, field-of-study, and citation-count filters. Returns up to 100 results with pagination. |
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 with publications, or search by name. |
| Tool | Description |
|---|---|
get_citations | Forward citations (papers that cite a given paper) with optional filters. |
get_references | Backward references (papers cited by a given paper). |
get_citation_graph | BFS traversal from seed papers, returning nodes + edges up to configurable depth. |
find_bridge_papers | Shortest citation path between two papers. |
| Tool | Description |
|---|---|
recommend_papers | Paper recommendations from 1–5 positive examples and optional negative examples. |
generate_citations | Generate BibTeX, CSL-JSON, or RIS citations for up to 100 papers, with automatic entry type inference and optional OpenAlex venue enrichment. |
enrich_paper | Augment Semantic Scholar metadata with OpenAlex fields (affiliations, funders, OA status, concepts). |
| Tool | Description |
|---|---|
search_patents | Search patents across 100+ patent offices via EPO OPS with CPC / applicant / inventor / jurisdiction / date filters. |
get_patent | Fetch bibliographic / claims / description / family / legal / citations sections for a single patent by publication number. Citations include NPL-to-paper resolution via Semantic Scholar. |
get_citing_patents | Find patents that cite a given academic paper (best-effort; EPO OPS citation search coverage is incomplete). |
fetch_patent_pdf | Download a patent PDF via authenticated EPO OPS and optionally convert to Markdown. |
Patent tools are hidden when
SCHOLAR_MCP_EPO_CONSUMER_KEYandSCHOLAR_MCP_EPO_CONSUMER_SECRETare not set.fetch_patent_pdfis also write-tagged and hidden whenSCHOLAR_MCP_READ_ONLY=true.
| Tool | Description |
|---|---|
search_books | Search for books by title, author, ISBN, or keywords via Open Library. Returns up to 50 results. |
get_book | Fetch book metadata by ISBN-10, ISBN-13, Open Library work ID, or edition ID. Optionally download and cache the cover image locally. |
get_book_excerpt | Fetch a book excerpt and description from Google Books by ISBN. Shows preview availability and link. |
recommend_books | Recommend books for a subject via Open Library, sorted by popularity. |
Papers with an ISBN in their
externalIdsare automatically enriched withbook_metadata(publisher, edition, cover URL, subjects, and more) from Open Library when fetched viaget_paper,get_citations,get_references, orget_citation_graph. Book records also includeworldcat_url(when ISBN-13 is present),google_books_url, andsnippetfrom Google Books enrichment. Cover images can be downloaded and cached locally viaget_book.
| Tool | Description |
|---|---|
resolve_standard_identifier | Normalise a messy citation string (e.g. "rfc9000", "nist 800-53") to canonical form and body. |
search_standards | Search standards by identifier, title, or free text, optionally filtered to one body (NIST, IETF, W3C, ETSI). |
get_standard | Retrieve a standard by canonical or fuzzy identifier, optionally fetching and converting the full text via docling. |
Tier-1 bodies (NIST, IETF, W3C, ETSI) are supported with full metadata and optional full-text conversion. Tier-2 bodies (ISO, IEC, IEEE, CC, CEN/CENELEC) are populated locally via
scholar-mcp sync-standards.
| Tool | Description |
|---|---|
batch_resolve | Resolve up to 100 mixed identifiers (paper DOIs, patent numbers, ISBNs) to full metadata in one call, routing each to the right backend with OpenAlex fallback. |
| Tool | Description |
|---|---|
fetch_paper_pdf | Download PDF for a paper (S2 open-access, then ArXiv/PMC/Unpaywall fallback). |
convert_pdf_to_markdown | Convert a local PDF to Markdown via docling-serve. |
fetch_and_convert | Full pipeline: fetch PDF (with fallback), convert to Markdown, return both. |
fetch_pdf_by_url | Download a PDF from any URL and optionally convert to Markdown. |
PDF tools are write-tagged and hidden when
SCHOLAR_MCP_READ_ONLY=true(the default).fetch_patent_pdf(above) and theget_standardfull-text mode cover the patent and standards equivalents.
| Tool | Description |
|---|---|
get_task_result | Poll for the result of a background task by ID. |
list_tasks | List all active background tasks. |
Long-running operations (PDF download/conversion) and rate-limited backend requests return
{"queued": true, "task_id": "..."}immediately. Useget_task_resultto poll for the result.
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`)"
docling-serve:
image: ghcr.io/ds4sd/docling-serve:latest
restart: unless-stopped
volumes:
scholar-mcp-data:
# Show cache statistics (row counts, database size)
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
Be the first to review this server!
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
by Microsoft · Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption