loading…
Search for a command to run...
loading…
A self-improving knowledge agent that provides local retrieval, web research, and structured answer synthesis for Claude Code and VS Code Copilot via MCP. It en
A self-improving knowledge agent that provides local retrieval, web research, and structured answer synthesis for Claude Code and VS Code Copilot via MCP. It enables AI tools to manage a project-specific knowledge lifecycle through automated research and indexing.
General-purpose LLMs are often inaccurate and outdated in specialized domains. Scholar Agent combines online research + local knowledge accumulation into a sustainable knowledge flywheel, making your AI smarter in your domain over time. It also builds a human-readable knowledge base for quick learning. Integrates seamlessly with Claude Code and VS Code Copilot via MCP.
Your question
│
▼
Online research (LLM web search + academic APIs)
│
▼
Structured synthesis (with citations, confidence, uncertainty)
│
▼
Local accumulation (Markdown knowledge cards + BM25 index)
│
▼
Next question: AI checks local first ── hit? ──► use directly, fast & accurate
│ miss
▼
Research again → accumulate → reindex ──► knowledge base keeps growing
Each round compounds. Knowledge cards have full lifecycle management: draft → reviewed → trusted → stale → deprecated.
Scholar Agent includes a comprehensive academic paper research pipeline:
<!-- LLM: --> placeholders for AI-assisted completion[[wiki-links]] automaticallycd my-project && git clone https://github.com/zfy465914233/scholar-agent.git
bash scholar-agent/setup.sh
# Restart Claude Code to activate
This will create the directory structure, copy config templates, install skills, and build the knowledge index.
# Clone and install
git clone https://github.com/zfy465914233/scholar-agent.git
cd scholar-agent
pip install -r requirements.txt
# Build the knowledge index
python scripts/local_index.py --output indexes/local/index.json
MCP configs are pre-configured:
.mcp.json is ready. cd into the project and start Claude Code..vscode/mcp.json is ready. Open the project, enable agent mode.| Tool | Description |
|---|---|
query_knowledge |
Search local knowledge base |
save_research |
Save structured research results as a knowledge card |
list_knowledge |
Browse all knowledge cards |
capture_answer |
Quick-capture a Q&A pair as a draft card |
ingest_source |
Ingest a URL or raw text into the knowledge base |
build_graph |
Generate an interactive knowledge graph (vis.js) |
SCHOLAR_ACADEMIC=1 to enable)| Tool | Description |
|---|---|
search_papers |
Search arXiv + Semantic Scholar with 4-dim scoring |
search_conf_papers |
Search conference papers via DBLP + S2 enrichment |
analyze_paper |
Generate deep-analysis markdown notes (20+ sections) |
extract_paper_images |
Extract figures from arXiv source / PDF |
paper_to_card |
Convert paper analysis into a knowledge card |
daily_recommend |
Daily paper recommendation workflow |
link_paper_keywords |
Auto-link keywords as [[wikilinks]] in notes |
For best analysis quality, follow this order:
download_paper("2510.24701", title="Paper Title", domain="LLM")extract_paper_images("2510.24701") (auto-detects local PDF)analyze_paper(paper_json) (auto-detects local PDF, extracts full text)Tip: Downloading the PDF before analysis enables full-text extraction, producing high-quality notes with specific data, formulas, and experimental results. Without a local PDF, analysis relies on the abstract only.
The .scholar.json file configures knowledge paths and academic research settings. See .scholar.example.json for a full example with comments.
Key sections:
knowledge_dir — Path to knowledge cards directoryindex_path — Path to BM25 search indexacademic.research_interests — Your research domains, keywords, and arXiv categoriesacademic.scoring — Paper scoring weights and dimensionsCopy .env.example to .env and configure:
| Variable | Required | Description |
|---|---|---|
SCHOLAR_ACADEMIC |
No | Set to 1 to enable academic tools |
S2_API_KEY |
No | Semantic Scholar API key (get one free) |
LLM_API_KEY |
No | LLM API key for advanced synthesis pipeline |
scholar-agent/
├── mcp_server.py # MCP server (13 tools)
├── setup_mcp.py # Embed into existing projects
├── pyproject.toml # Package configuration
├── .scholar.json # Project & academic configuration
├── schemas/ # Answer + evidence JSON schemas
├── scripts/
│ ├── academic/ # Academic research modules
│ │ ├── arxiv_search.py # arXiv + Semantic Scholar search
│ │ ├── conf_search.py # Conference paper search (DBLP)
│ │ ├── paper_analyzer.py # Deep-analysis note generation
│ │ ├── scoring.py # 4-dim paper scoring engine
│ │ ├── image_extractor.py # Figure extraction from PDFs
│ │ ├── note_linker.py # Wiki-link discovery + keyword linking
│ │ └── daily_workflow.py # Daily recommendation pipeline
│ ├── scholar_config.py # Configuration reader
│ ├── local_index.py # BM25 index builder
│ ├── local_retrieve.py # Knowledge retrieval
│ ├── close_knowledge_loop.py # Knowledge card builder
│ └── ... # Research, synthesis, governance, graph
├── knowledge/ # Knowledge cards (gitignored, user-generated)
├── indexes/ # Generated indexes (gitignored)
└── tests/ # 247 tests
[[wiki-links]]python -m pytest tests/ -v
247 tests, ~13s. No external services needed.
MIT — see LICENSE.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"lore-agent": {
"command": "npx",
"args": []
}
}
}