Athena
A local academic research assistant that indexes PDFs into a searchable vector library and exposes MCP tools for semantic search, claim extraction, contradiction detection, and multi-step research synthesis.
README
Athena
A local academic research assistant that runs entirely on your machine. Drop PDFs into a folder — Athena indexes them, builds a searchable vector library, and exposes tools to Claude Desktop for semantic search, claim extraction, contradiction detection, and multi-step research synthesis.
What It Does
- Semantic search across your paper library with section-level filtering (search only results sections, only abstracts, etc.)
- Contradiction detection — surfaces conflicting claims across papers on a given topic
- Definition extractor — shows how different papers define the same term
- Related paper suggestions from Semantic Scholar for papers not in your library
- Full research agent — refines your query, extracts claims, detects contradictions, and returns a structured markdown report
- Automatic metadata enrichment — extracts titles from font analysis, verifies against Semantic Scholar, fills in authors/year/abstract
Architecture
Claude Desktop
│
│ MCP (stdio — no tunnel needed)
▼
FastMCP Server (server/tools.py)
│
├── ChromaDB — vectors + chunk metadata (semantic search)
├── SQLite — paper metadata (structured queries)
└── LangGraph Agent (agent/graph.py)
│
└── Groq / Llama 3.3-70b — query refinement, claim extraction, synthesis
Storage split: SQLite handles structured paper metadata (title, authors, year). ChromaDB stores chunks with their embeddings and attached metadata, enabling hybrid queries — semantic similarity + structured filters in one call.
Parent/child chunking: each paper section is split into large parent chunks (~512 tokens) and small child chunks (~128 tokens). Retrieval uses children for precise matching; the LLM receives parents for full context.
Section-aware indexing: section_type is stored on every chunk (abstract, introduction, methods, results, conclusion). Tools filter to specific sections — contradiction detection searches results/conclusions, definition extraction searches abstract/intro/methods.
Setup
Prerequisites
- Python 3.12+
- uv —
pip install uv - A free Groq API key
Install
git clone <repo>
cd athena
uv sync
Create a .env file:
GROQ_API_KEY=your_key_here
Index Papers
Start the file watcher — drop PDFs into data/raw/ and they get indexed automatically:
uv run python -m pdf_ingestion.watcher
Papers already in data/raw/ when the watcher starts are indexed on startup. The watcher is idempotent — restart it any time without re-indexing completed papers.
Use the CLI
# Full research agent
uv run python cli.py "What are the main approaches to guided diffusion?"
# Quick semantic search (no LLM)
uv run python cli.py --search "score-based generative models"
# List all indexed papers
uv run python cli.py --list
# How different papers define a term
uv run python cli.py --define "latent space"
Use with Claude Desktop (Recommended)
Install as a native extension — no tunnel, no URL, no re-configuration on restarts:
- Build the extension package:
uv run python build_dxt.py - Open Claude Desktop → Extensions → drag
athena.dxtonto the page - Enter your Groq API key when prompted
- Optionally set a Library Directory (defaults to
~/Documents/Athena) — put your PDFs in theraw/subfolder inside that directory - Start a new chat — Athena tools are available immediately
On first use, ask Claude: "Check if Athena is ready" — it will call get_status and confirm the embedding model has finished loading before you search.
Use with Claude Desktop (Dev / HTTP)
For local development with HTTP transport:
.\start_athena.ps1
This starts uvicorn on port 8000 and a Cloudflare quick tunnel. Copy the tunnel URL into Claude Desktop → Connectors → Add connector. Note the URL changes on every restart.
Project Structure
athena/
├── agent/
│ └── graph.py — LangGraph 6-node research agent
├── chunker/
│ └── chunker.py — parent/child chunking with sentence boundaries
├── db/
│ └── database.py — SQLite paper lifecycle management
├── embedding/
│ └── embedder.py — sentence-transformers + ChromaDB storage
├── pdf_ingestion/
│ ├── metadata_enricher.py — title extraction + Semantic Scholar lookup
│ ├── parser.py — PyMuPDF extraction with font analysis
│ ├── section_detector.py — 4-signal header detection
│ └── watcher.py — watchdog file watcher + pipeline orchestration
├── server/
│ └── tools.py — 8 MCP tools via FastMCP
├── cli.py — terminal interface
├── config.py — data directory configuration
├── build_dxt.py — packages source into athena.dxt
├── manifest.json — Claude Desktop extension manifest
└── start_athena.ps1 — dev script: uvicorn + cloudflared tunnel
MCP Tools
| Tool | Description |
|---|---|
get_status |
Check if the embedding model has finished loading |
search_library |
Semantic search with section/year/paper filters |
get_paper_details |
Full metadata and abstract for a specific paper |
find_contradictions |
Conflicting claims across papers on a topic |
suggest_related |
Papers from Semantic Scholar not in your library |
list_library |
All indexed papers |
extract_definitions |
How each paper defines a specific term |
run_research_agent |
Full multi-step synthesis — query refinement, claims, contradictions, report |
Tech Stack
| Component | Technology | Why |
|---|---|---|
| Vector store | ChromaDB | Local, no server process, hybrid metadata+vector queries |
| Metadata store | SQLite | Structured queries, zero setup, file-portable |
| Embeddings | all-MiniLM-L6-v2 | Local, CPU-friendly, 384d, ~90MB |
| LLM | Llama 3.3-70b via Groq | Free tier, fast inference, reliable JSON mode |
| Agent framework | LangGraph | Parallel fan-out, explicit state, human checkpoint support |
| PDF parsing | PyMuPDF | Fast, font-level access for structure detection |
| MCP server | FastMCP | Schema generation from type hints, stdio + HTTP transports |
| Packaging | uv + .dxt | Reproducible venvs, native Claude Desktop extension format |
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。