Skip to main content
Glama
ArXivLens MCP

ArXivLens MCP

by chan4kum

๐Ÿ” ArXivLens MCP

Autonomous Real-Time Academic Intelligence, Paper Discovery & Code-Implementation Mapping

CI Status Python Version Protocol Framework License

An enterprise-grade Model Context Protocol (MCP) server and client built with FastMCP 2.0, standardizing how AI agents scout research papers, extract structured insights, and verify open-source GitHub implementations in real time.


Key Features โ€ข Architecture โ€ข Real-Time Problem Statement โ€ข Quickstart โ€ข Claude & Cursor Setup โ€ข Interactive Agent


โšก Real-Time Problem Statement

Every day, hundreds of cutting-edge AI, Machine Learning, and Computer Science papers are published to arXiv, while corresponding open-source code repositories, benchmarks, and model checkpoints are scattered across GitHub, Hugging Face, and Papers With Code.

Researchers, AI engineers, and technical leads face three critical real-time challenges:

  1. Information Overload & Latency: Finding newly dropped breakthrough papers in specific niches (e.g., test-time compute, reasoning models, KV-cache compression) before they get buried.

  2. The Implementation Gap: Locating verified, highly-starred GitHub repositories and code implementations that correspond to an arXiv paper in real time.

  3. Synthesis & Evaluation Friction: Manually downloading and reading 30-page PDFs just to extract key contributions, methodology gaps, and experimental baselines.

  4. Agent Integration Bottleneck: LLM agents (Claude Desktop, Cursor, Custom Agents) lack standardized, safe, and live access to academic repositories and code-linkage databases.

ArXivLens MCP solves this end-to-end by exposing production-grade MCP Tools, dynamic Resources, and structured Prompts over standard transports (stdio and SSE).


Related MCP server: kivv

๐ŸŽฏ Key Features

  • ๐Ÿ” Live arXiv Search: Real-time querying across arXiv's Atom 1.0 XML API with category filtering (cs.AI, cs.LG, cs.CL, cs.CV, stat.ML), author matching, and date sorting.

  • ๐Ÿ’ป Automated Code Discovery: Proactively scans GitHub for repositories implementing or referencing the paper, extracting star counts, languages, licenses, and direct URLs.

  • ๐Ÿ“‘ Structured Research Briefs: Synthesizes paper abstracts into executive 1-page briefs breaking down Problem Statement, Proposed Methodology, Key Contributions, Limitations, and Matching Code.

  • ๐Ÿ“ก Dynamic MCP Resources:

    • arxiv://categories: Catalog of supported research domains.

    • arxiv://feed/{category}: Live category paper feed.

    • paper://{arxiv_id}/brief: Dynamic markdown research brief for any paper ID.

  • ๐Ÿง  Expert Prompt Templates: Standardized prompt templates for systematic literature reviews, critical methodology peer-reviews, and reproducibility audits.

  • ๐Ÿ–ฅ๏ธ Dual Interface: Includes both a FastMCP Server and a Rich Terminal Client with an interactive autonomous agent loop.

  • โšก Zero-Cost Local Evaluation: Built-in mock reasoning fallback allows testing and evaluation immediately without requiring paid API keys!


๐Ÿ—๏ธ Architecture

flowchart TD
    subgraph Clients["MCP Clients & AI Hosts"]
        Claude["Claude Desktop"]
        Cursor["Cursor AI"]
        TerminalCLI["ArXivLens CLI / Agent"]
        CustomAgent["LangChain / LlamaIndex / Agent Frameworks"]
    end

    subgraph Protocol["Model Context Protocol (MCP Transport)"]
        StdIO["stdio (Subprocess Pipe)"]
        SSE["SSE / HTTP Transport"]
    end

    subgraph Server["ArXivLens FastMCP 2.0 Server"]
        Router["FastMCP Request Dispatcher"]
        
        subgraph Capabilities["Server Primitives"]
            Tools["MCP Tools\nโ€ข search_arxiv\nโ€ข get_paper_details\nโ€ข find_code_repositories\nโ€ข generate_research_brief"]
            Resources["MCP Resources\nโ€ข arxiv://categories\nโ€ข arxiv://feed/{cat}\nโ€ข paper://{id}/brief"]
            Prompts["MCP Prompts\nโ€ข literature_review\nโ€ข paper_critique\nโ€ข reproducibility_audit"]
        end

        subgraph CoreServices["Internal Services"]
            ArxivSvc["ArxivService\n(Atom 1.0 XML Async Client)"]
            GitHubSvc["GitHubService\n(REST Search API & Matcher)"]
            BriefSvc["BriefService\n(Synthesis & Markdown Engine)"]
        end
    end

    subgraph Upstream["Upstream Real-Time Data Sources"]
        ArXivAPI["arXiv Official API\n(export.arxiv.org)"]
        GitHubAPI["GitHub Search API\n(api.github.com)"]
    end

    Clients --> Protocol
    Protocol --> Router
    Router --> Capabilities
    Tools --> CoreServices
    Resources --> CoreServices
    CoreServices --> ArXivAPI
    CoreServices --> GitHubAPI

๐Ÿš€ Quickstart

1. Installation

Clone the repository and install dependencies using uv (recommended) or pip:

git clone https://github.com/chan4kum/arxivlens-mcp.git
cd arxivlens-mcp

# Using uv (fastest)
uv sync

# Or using standard pip
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

2. Configure Environment (Optional)

Copy .env.example to .env:

cp .env.example .env

Tip: Adding a GITHUB_TOKEN increases your GitHub API rate limit from 60 req/hr to 5,000 req/hr.


๐Ÿ’ป CLI & Interactive Client

ArXivLens comes out-of-the-box with an interactive CLI built with rich:

Inspect Server Capabilities

Inspect all registered MCP tools, resources, and prompts:

uv run arxivlens-client inspect
uv run arxivlens-client search "DeepSeek-R1 reasoning" --max 3

Generate Structured Research Brief

uv run arxivlens-client brief 1706.03762

Find GitHub Code Repositories

uv run arxivlens-client code 1706.03762

Autonomous Agent Loop

Launch the interactive terminal agent to scout papers and match code conversationally:

uv run arxivlens-client agent

๐Ÿ”Œ Claude & Cursor Desktop Integration

Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "arxivlens": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/arxivlens-mcp",
        "run",
        "arxivlens-server"
      ],
      "env": {
        "PYTHONUNBUFFERED": "1"
      }
    }
  }
}

Cursor AI

  1. Open Cursor Settings > Features > MCP Servers.

  2. Click Add New MCP Server:

    • Name: ArXivLens

    • Type: command

    • Command: uv --directory /absolute/path/to/arxivlens-mcp run arxivlens-server


๐Ÿงช Testing

Run the comprehensive unit and integration test suite:

# Run pytest with coverage
uv run pytest -v tests/

# Run linter
uv run ruff check .

๐Ÿ“‚ Repository Structure

arxivlens-mcp/
โ”œโ”€โ”€ .github/workflows/ci.yml       # GitHub Actions automated CI
โ”œโ”€โ”€ config/
โ”‚   โ”œโ”€โ”€ claude_desktop_config.json # Claude Desktop configuration
โ”‚   โ””โ”€โ”€ cursor_mcp.json            # Cursor AI configuration
โ”œโ”€โ”€ docs/
โ”‚   โ”œโ”€โ”€ ARCHITECTURE.md            # In-depth architectural documentation
โ”‚   โ””โ”€โ”€ SETUP_GUIDE.md             # Integration guide for agents & hosts
โ”œโ”€โ”€ src/arxivlens/
โ”‚   โ”œโ”€โ”€ __init__.py                # Package exports
โ”‚   โ”œโ”€โ”€ server.py                  # FastMCP 2.0 Server (Tools, Resources, Prompts)
โ”‚   โ”œโ”€โ”€ client.py                  # FastMCP Client async wrapper
โ”‚   โ”œโ”€โ”€ cli.py                     # Rich terminal CLI & Agent loop
โ”‚   โ”œโ”€โ”€ models.py                  # Pydantic data models
โ”‚   โ””โ”€โ”€ services/
โ”‚       โ”œโ”€โ”€ arxiv_service.py       # Async arXiv Atom XML client
โ”‚       โ”œโ”€โ”€ github_service.py      # GitHub search & code matcher
โ”‚       โ””โ”€โ”€ brief_service.py       # Research brief synthesis engine
โ”œโ”€โ”€ tests/
โ”‚   โ”œโ”€โ”€ conftest.py                # Mock fixtures for offline testing
โ”‚   โ”œโ”€โ”€ test_services.py           # Unit tests for services
โ”‚   โ”œโ”€โ”€ test_server.py             # Server endpoints tests
โ”‚   โ””โ”€โ”€ test_client.py             # Client integration tests
โ”œโ”€โ”€ .env.example                   # Environment configuration template
โ”œโ”€โ”€ .gitignore                     # Git ignore patterns
โ”œโ”€โ”€ LICENSE                        # MIT License
โ”œโ”€โ”€ pyproject.toml                 # Packaging & CLI entrypoints
โ””โ”€โ”€ README.md                      # Project documentation

๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.

  2. Create your feature branch (git checkout -b feature/amazing-feature).

  3. Run tests and linter (uv run pytest && uv run ruff check .).

  4. Commit your changes (git commit -m 'feat: add amazing feature').

  5. Push to the branch (git push origin feature/amazing-feature).

  6. Open a Pull Request.


๐Ÿ“œ License

Distributed under the MIT License. See LICENSE for more information.


Available Tools

4 tools
find_code_repositoriesFind Code RepositoriesA

Discover open-source GitHub repositories implementing or referencing an arXiv paper.

Inputs: arxiv_id (required), title, max_results. Returns: result

generate_research_briefGenerate Research BriefB

Synthesize an executive research brief for a paper, including problem statement, methodology, key findings, and matching code.

Inputs: arxiv_id (required). Returns: object

get_paper_detailsGet Paper DetailsA

Retrieve full metadata and abstract for a specific arXiv ID.

Inputs: arxiv_id (required). Returns: object

search_arxivSearch ArxivB

Search papers on arXiv in real time.

Inputs: query (required), sort_by, max_results. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    A3.9/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a distinct stage of the research workflow: searching, retrieving metadata, finding code, and generating a synthesis. There is no meaningful overlap between tool purposes.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with clear, descriptive verbs: search, get, find, generate. The naming convention is uniform throughout.

    Tool Count5/5

    Four tools is well-scoped for an arXiv research assistant: search, detail retrieval, code discovery, and brief generation. Each tool earns its place and the set is neither bloated nor too thin.

    Completeness5/5

    The surface covers the full research journey from discovery to synthesis, including practical follow-up like finding code repositories. No obvious dead ends or missing lifecycle steps are apparent for this domain.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables searching and retrieving arXiv papers by topic, fetching abstracts by paper ID, and saving markdown content to files. Includes examples of integrating MCP tools with Google Gemini for AI-powered paper research.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Automated arXiv research paper discovery and AI-powered summarization system that enables Claude Desktop users to search, retrieve, and get intelligent summaries of academic papers through MCP integration.
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables searching arXiv and top AI conferences, finding related papers, generating research insights, and managing a personal library via MCP tools.
      5
      60 npm
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables searching arXiv papers, extracting paper information, listing paper topics, and generating structured research prompts through MCP tools, resources, and prompts.
      -