Scholar Engine MCP
Allows searching and retrieving scientific papers from arXiv, including metadata, abstracts, categories, and PDF links.
Scholar Engine MCP π¬β‘
High-speed Scientific Literature Semantic Compiler & FastMCP Server
Powered by arXiv, OpenAlex, DuckDB HTTP range queries, and TypeSafe Jev System One.
π‘ Why Scholar Engine?
Traditional Retrieval-Augmented Generation (RAG) relies on dense vector similarity (cos(query, chunk)). Vector similarity is great for answering "what text looks like my query?", but fundamentally fails on structural, empirical scientific questions, such as:
"Which published paper experimentally proved loaded latency reduction on real fixed wireless hardware without requiring Wi-Fi 6 PHY?"
Vector search will return dozens of papers full of simulation equations or theoretical surveys that merely mention "wireless" and "latency" thousands of times.
Scholar Engine rethinks scientific discovery for AI agents by combining:
Zero Storage Bloat: Queries Hugging Face's 3.15M
arxiv-completeParquet dataset directly using DuckDB HTTP range queries. No need to download a 16 TB PDF corpus.Citation Graph Enrichment: Instantly pulls citation metrics and author graphs via OpenAlex.
Probabilistic Semantic Gates (Jev System One): Natural language questions compile into persistent, 154ms probabilistic predicates (e.g.
P_real_hardware > 0.85,P_empirical > 0.75).Materialized Predicate Cache: Evaluated predicates are cached in SQLite so repeated evaluations reuse past judgments with zero inference cost. (The CLI and MCP server currently use an in-memory store, so the cache lasts for one process.)
Double Jev Gate (Pre-RAG & Post-RAG):
Pre-RAG: Discards non-empirical or irrelevant papers before reading full text.
Post-RAG: Verifies every claim synthesized by the reasoning agent against extracted evidence passages (
supported,partial,unsupported,contradicted).
Related MCP server: paper-mcp
π Comparison Matrix
Feature | Scholar MCP | Traditional ArXiv MCP | PaperQA2 | Elicit / Consensus |
Primary Interface | Local FastMCP Server | Local MCP | Python library / CLI | Web App / Closed SaaS |
Search Speed | Sub-second to ~3s | ~1-2s | 30s - 90s | ~5s |
Query Cost | <$0.001 (or $0 simulation) | Free (Rate-limited API) | $1.00 - $5.00+ / run | Monthly Subscription |
Full-text LaTeX Access | β (Abstract & metadata via DuckDB Parquet) | β (Abstract only) | Yes (Downloads full PDFs) | Proprietary Index |
Semantic Predicate Filtering | Yes (Jev System One) | β None | β None | Heuristic filters |
Predicate Bitmaps Cache | Yes (SQLite) | β None | β None | β None |
Claim-Evidence Verification | Yes (Post-RAG Verifier) | β None | Yes (Heavy LLM loop) | Simple score |
Agent Tool Support | Claude, Cursor, Codex, AGY | Partial | β None | β None |
ποΈ Architecture
flowchart TD
subgraph INGESTION["1. Zero-Storage Discovery"]
ARXIV["arXiv Atom API (Search & Metadata)"]
OPENALEX["OpenAlex Graph API (Citations & Authors)"]
HF["Hugging Face arxiv-complete (3.15M Papers)"]
DUCKDB["DuckDB HTTP Range Scanner (Metadata parquet fetch)"]
HF --> DUCKDB
end
subgraph ENGINE["2. Scholar Semantic Engine"]
DISCOVER["Candidate Retrieval Engine"]
ARXIV --> DISCOVER
OPENALEX --> DISCOVER
DUCKDB --> DISCOVER
subgraph GATES["Jev System One Gates"]
PRE_RAG["Pre-RAG Gate (P_empirical, P_applicable)"]
POST_RAG["Post-RAG Verifier (Claim vs Evidence)"]
PRED_CACHE[("SQLite Predicate Cache & Bitmaps")]
end
DISCOVER --> PRE_RAG
PRE_RAG <--> PRED_CACHE
PRE_RAG --> POST_RAG
POST_RAG <--> PRED_CACHE
end
subgraph MCP_INTERFACE["3. FastMCP Server Interface"]
TOOL_SEARCH["scholar_search (Fast paper discovery)"]
TOOL_INSPECT["scholar_inspect (Deep paper metrics & OpenAlex)"]
TOOL_RESEARCH["scholar_research (Full autonomous loop)"]
end
ENGINE --> MCP_INTERFACE
MCP_INTERFACE --> CLIENTS["AI Agents: Claude Desktop, Cursor, Codex, Antigravity"]π Quick Start
1. Installation
# Clone the repository
git clone https://github.com/wolverin0/scholar-mcp.git
cd scholar-mcp
# Create a virtual environment and install package + dev dependencies
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]" "mcp<2"Note:
mcp>=1.0.0may resolve to mcp 2.x if unconstrained, which removedmcp.server.fastmcp; pinmcp<2until the server is migrated.
2. Configuration (.env)
Copy .env.example to .env:
cp .env.example .env# Optional: TypeSafe Jev API Key for live 154ms System One probabilistic decisions
# If unset, Scholar Engine automatically runs in high-fidelity deterministic simulation mode!
TYPESAFE_API_KEY=your_typesafe_key_hereThe code reads TYPESAFE_API_KEY from the process environment only; .env is not loaded automatically (no python-dotenv). Export it in your shell (set -a; source .env; set +a) or pass it in the MCP client's env block.
3. Run Tests
Verify everything is working locally (run from the repository root; 12 tests, no network or API key needed):
python -m pytest tests -v4. Run the MCP server (stdio)
python -m scholar.mcp.serverπ€ MCP Server Setup
Add Scholar Engine to your favorite agentic tools. Because the package cannot currently be installed (see Install caveats), use the Python interpreter of the virtual environment above as command and set PYTHONPATH to the absolute path of your clone:
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"scholar": {
"command": "python",
"args": ["-m", "scholar.mcp.server"],
"env": {
"PYTHONPATH": "/absolute/path/to/scholar-mcp",
"TYPESAFE_API_KEY": "your_key_here"
}
}
}
}Cursor (.cursor/mcp.json)
{
"mcpServers": {
"scholar": {
"command": "python",
"args": ["-m", "scholar.mcp.server"],
"env": { "PYTHONPATH": "/absolute/path/to/scholar-mcp" }
}
}
}Antigravity / Wezbridge (.mcp.json)
{
"mcpServers": {
"scholar": {
"type": "stdio",
"command": "python",
"args": ["-m", "scholar.mcp.server"],
"env": { "PYTHONPATH": "/absolute/path/to/scholar-mcp" }
}
}
}π οΈ FastMCP Tools Reference
1. scholar_search
Quickly search arXiv for scientific papers by topic, keyword, or title, with optional publication year filtering.
Arguments:
query(str): Search topic or keywords (e.g."loaded latency wifi").limit(int, default=5): Number of candidates to return.year_min(int, optional): Minimum publication year (e.g.2022).year_max(int, optional): Maximum publication year (e.g.2026).
Returns: Structured JSON list of IDs, titles, categories, abstracts, and PDF links.
2. scholar_inspect
Inspect a paper in detail by its arXiv ID. Merges OpenAlex citation metrics, authors, and stored semantic predicates.
Arguments:
paper_id(str): arXiv paper ID (e.g."2007.07174"or"2306.04338").
Returns: Full abstract, categories, citation counts, DOI, OpenAlex ID, and cached semantic features.
3. scholar_verify_claim
Verifies an empirical or scientific claim against a specific paper's full abstract/text. Extracts the most salient evidence passage with exact character offsets (start_char, end_char, source_field, doc_id).
Arguments:
claim(str): Specific empirical proposition (e.g."Method achieves sub-5ms latency under load").paper_id(str): Paper ID to verify against.
Returns: Status (
supported,contradicted,unsupported), probability score, provenance source (livevsheuristic), and exact evidence spans with character offsets.
4. scholar_verify_predicate
Directly evaluates a boolean or probabilistic proposition against any state or text passage using TypeSafe Jev System One semantics.
Arguments:
state_text(str): Evidence or text passage to evaluate.question(str): Proposition question (e.g."Does this passage report an in-vivo experiment?").
Returns: Probability in
[0.0, 1.0], latency in ms, and provenance (livevsheuristic).
5. scholar_research
Autonomous scientific discovery loop:
Discovers candidates on arXiv.
Runs Jev System One semantic gatekeeper to filter out non-empirical or incompatible papers.
Resolves citation graphs and verifies claims against evidence text with exact spans.
Arguments:
query(str): Research question or engineering topic.domain(str, default="general"): Domain hint (e.g."wireless","databases","ai"). Currently accepted but not used by the engine.threshold(float, default=0.50): Minimum probability score required to pass semantic gates.limit(int, default=10): Max candidates to evaluate.
Returns: Surviving evidence-backed papers with confidence metrics, exact evidence spans, and screened-out audit breakdown.
ποΈ Tri-Model AI Architectural Consensus (Claude, Codex, Gemini)
Scholar Engine's v1.1 design incorporates recommendations from a 3-round AI architectural debate (note: full semantic verification accuracy, contradiction detection, and prompt-injection resilience require a live TYPESAFE_API_KEY; offline heuristic mode marks all claims unverified_heuristic):
Anthropic Claude (Fable 5.1 / Opus tier): Systems safety, span-level character tracking, and CI regression harness.
OpenAI Codex (GPT 6 Astra / Codex tier): 3-stage verification pipeline (
Retrieval -> Extraction -> Assessment), bounded MCP safety, and parameter isolation.Google Gemini (Gemini 3.8 Flash / Gemini 2.5 tier): Context-aware metadata facets, audit trails for retractions, and multi-model resilience.
Read the full unedited debate logs and architectural roadmap:
π§ͺ CI Evaluation Harness & Test Suite
Scholar Engine includes a 50-case evaluation harness in tests/test_eval_harness.py covering:
Span Offset Integrity: Verifies that extracted evidence spans match exact string slices in source documents.
Provenance Demarcation: Guarantees that every claim explicitly declares its source (
liveAPI vsheuristicfallback), and offline heuristics emitunverified_heuristicinstead ofsupported/partial.Live Semantic Benchmark (
@pytest.mark.live): Evaluates direct empirical support (15), explicit contradictions (15), insufficient evidence (10), and adversarial prompt injections (10) whenTYPESAFE_API_KEYis provided (markedxfailin offline heuristic mode).
Run the offline test suite:
python -m pytest tests -m "not live" -vπ» CLI Usage
You can also use Scholar Engine directly from your terminal (from the repository root; the scholar console script is only available once the package installs, see Install caveats):
# Search arXiv papers
python -m scholar.cli search "neural network verification" --limit 5
# Inspect a paper with OpenAlex citation metrics
python -m scholar.cli inspect "1711.00455"
# Run the autonomous semantic research loop (--domain defaults to "wireless")
python -m scholar.cli research "wireless loaded latency scheduler" --threshold 0.50 --limit 10π License
MIT License. See LICENSE for details.
Available Tools
5 toolsscholar_inspectA
Inspects a specific scientific paper by arXiv ID. Merges OpenAlex citation metrics, authors, and stored semantic predicates.
Inputs: paper_id (required). Returns: result
scholar_researchB
Executes an autonomous scientific research loop:
Discovers candidates on arXiv.
Runs Jev System One semantic gatekeeper to filter non-empirical/incompatible papers.
Fetches citation graphs and verifies claims against evidence text with exact spans. Returns surviving evidence-backed papers with confidence metrics.
Inputs: query (required), limit, domain, threshold. Returns: result
scholar_searchB
Searches scientific papers on arXiv by topic, keywords, or title. Supports optional year bounds (year_min, year_max). Returns structured list of paper IDs, titles, categories, and abstracts.
Inputs: query (required), limit, year_max, year_min. Returns: result
scholar_verify_claimB
Verifies an empirical or scientific claim against a specific paper's full abstract/text. Extracts the most salient evidence passage with exact character offsets. Outputs strict status (supported, contradicted, unsupported), verification probability, provenance (live vs. heuristic), and exact evidence spans.
Inputs: claim (required), paper_id (required). Returns: result
scholar_verify_predicateB
Directly evaluates a boolean or probabilistic proposition against any state or text passage. Fails closed as unverified when live TypeSafe Jev API is unavailable.
Inputs: question (required), state_text (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 5 tools
The five tools mostly carve up the domain cleanly: search (discovery), inspect (single-paper lookup), verify_claim (claim vs. a specific paper), verify_predicate (general proposition evaluation), and research (orchestration). The main blur is between verify_claim and verify_predicate, which both perform verification and could be confused when a claim is tied to a paper but the agent reaches for the generic predicate evaluator (or vice versa); the research tool also overlaps by chaining search+verify internally.
Every tool carries the same scholar_ prefix and a lowercase snake_case action name (search, inspect, verify_claim, verify_predicate, research). The verb/noun structure is predictable and no competing conventions appear.
At five tools this is tightly scoped: discovery, inspection, two verification entry points, and one orchestration tool. Each earns its place without redundant low-level wrappers.
The surface covers discovery, per-paper retrieval, verification, and an end-to-end research loop, which is a coherent lifecycle for a read-only scholarly engine. Minor gaps existβe.g., no standalone citation-graph or evidence-span retrieval outside verification, and no batch/lookup-by-title pathβbut the autonomous research tool largely compensates.
Maintenance
Related MCP Connectors
AI/ML research papers from arXiv, DBLP, and HuggingFace
Search 8.5M scientific papers with LLM TLDRs, citations, linked entities, figures, and full text.
Query ArXiv, HuggingFace Daily Papers, and linked GitHub repos in one fast MCP call.
arXiv, PubMed, Crossref and OpenAlex scholarly metadata.
Related MCP Servers
- AlicenseAqualityBmaintenanceA FastMCP server for the scholarly citation landscape that enables LLMs to search, cross-reference, and retrieve prior art across papers, patents, books, and standards via multiple APIs.21810 PyPI3MIT
- AlicenseNot gradedqualityCmaintenanceRemotely-callable MCP server for academic paper search, full-text retrieval and image to LaTeX conversion across arXiv, Semantic Scholar, and OpenAlex.1MIT
- FlicenseNot gradedqualityDmaintenanceA local, rule-based MCP server for searching and analyzing academic papers from arXiv. Enables paper search, ranking, smart summarization, keyword extraction, and citation generation without API keys or LLM calls.-
- AlicenseNot gradedqualityCmaintenanceMCP server for semantic research: search arXiv, fetch papers, and answer questions grounded in the actual paper text via RAG tools, resources, and prompts.1MIT