PaperPilot-AI

PaperPilot-AI

MCP server for semantic research: search arXiv, fetch papers, and answer questions grounded in the actual paper text via RAG tools, resources, and prompts.

Category
Visit Server

README

PaperPilot AI — MCP-Powered Semantic Research Platform

An MCP (Model Context Protocol) server that lets an AI client search arXiv, fetch papers, and answer questions grounded in the actual paper text — a full retrieve-and-generate RAG pipeline exposed through all three MCP primitives (tools, resources, and prompts), plus a standalone demo UI.

Tests Python 3.12 License: MIT

Demo

Watch the 1-minute Demo

Search & Fetch

Search

Ask a Paper

Ask

Compare Papers

Compare

Why this exists

Most "I built an MCP server" projects stop at wrapping a single API call in a tool. This project instead demonstrates a complete, real pipeline:

search → fetch → chunk → embed → retrieve → generate

...exposed through MCP so it's usable directly from Claude Desktop or any other MCP client, with a companion Streamlit UI for visual demos.

Architecture

flowchart LR
    A[User question] --> B[search_arxiv]
    B --> C[fetch_paper]
    C --> D[Chunk text]
    D --> E[Embed chunks<br/>sentence-transformers]
    E --> F[(SQLite<br/>persisted cache)]
    F --> G[ask_paper]
    G --> H[Embed question]
    H --> I[Cosine similarity<br/>retrieve top-k chunks]
    I --> J[Groq LLM<br/>generate grounded answer]
    J --> K[Answer + source excerpts]

Features

MCP Primitive Name What it does
Tool search_arxiv Search arXiv by keyword
Tool fetch_paper Download a paper's PDF, extract + chunk + embed its text
Tool ask_paper Answer a question grounded in a fetched paper's content (RAG)
Tool compare_fetched_papers Compare two fetched papers' methods and contributions
Resource papers://list Browse every paper fetched so far
Resource papers://{paper_id} View a specific paper's full extracted text
Prompt literature_review Scaffolds a multi-paper research workflow
Prompt compare_papers Scaffolds a structured two-paper comparison

Plus:

  • Persistence — fetched papers survive a server restart (SQLite), not just in-memory.
  • Error handling — bad paper IDs, network failures, and LLM errors return clean messages instead of crashing.
  • 20 automated tests — all external calls (arXiv, PDF download, Groq) are mocked, so the suite runs in seconds with zero API cost. CI runs them on every push.
  • Demo UI — a Streamlit app that reuses the exact same functions as the MCP server (no duplicated logic), with retrieved excerpts shown visually to make the RAG mechanism transparent.

Tech stack

  • Protocol: MCP via FastMCP
  • Embeddings: sentence-transformers (all-MiniLM-L6-v2, runs locally, no API cost)
  • LLM: Groq (llama-3.3-70b-versatile)
  • Data: arXiv API, pypdf for text extraction
  • Storage: SQLite
  • Testing: pytest + pytest-mock
  • Demo UI: Streamlit

Setup

1. Clone and install

git clone https://github.com/ayushisingh51/PaperPilot-AI.git
cd PaperPilot-AI
python -m venv venv
source venv/bin/activate   # Windows: venv\Scripts\activate
pip install -r requirements.txt

2. Add your API key

cp .env.example .env
# then edit .env and add your free key from https://console.groq.com/keys

3. Run it

As an MCP server (test in the MCP Inspector):

fastmcp dev server.py

Connected to Claude Desktop — add to claude_desktop_config.json:

{
  "mcpServers": {
    "research-assistant": {
      "command": "/absolute/path/to/venv/bin/python",
      "args": ["/absolute/path/to/research-mcp/server.py"]
    }
  }
}

As a standalone demo UI:

streamlit run demo_app.py

4. Run the tests

pytest tests/ -v

Project structure

PaperPilot-AI/
├── server.py                # MCP server: tools, resources, prompts
├── demo_app.py               # Standalone Streamlit demo UI
├── tests/
│   ├── conftest.py           # Test fixtures (temp DB, dummy API key)
│   └── test_server.py        # 20 tests, all external calls mocked
├── .github/workflows/
│   └── tests.yml              # CI: runs tests on every push
├── requirements.txt
├── .env.example
└── LICENSE

Possible extensions

  • Swap the naive top-k retrieval for a proper vector DB (Chroma/FAISS) as the paper library grows.
  • Add streaming responses for the generation step.
  • Support multi-paper synthesis in a single ask call instead of one at a time.

License

MIT

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