Athena

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.

Category
Visit Server

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

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:

  1. Build the extension package:
    uv run python build_dxt.py
    
  2. Open Claude Desktop → Extensions → drag athena.dxt onto the page
  3. Enter your Groq API key when prompted
  4. Optionally set a Library Directory (defaults to ~/Documents/Athena) — put your PDFs in the raw/ subfolder inside that directory
  5. 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

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured