Paper Reader MCP

Paper Reader MCP

Enables searching arXiv papers and retrieving full paper content as Markdown, with smart sorting, category filtering, and pagination.

Category
Visit Server

README

Paper Reader MCP

一个基于 MCP (Model Context Protocol) 的 arXiv 论文搜索与阅读服务,带有 Web 管理界面和完整的认证机制。

功能

📚 论文搜索

工具 功能
search_papers 搜索 arXiv 论文(支持智能排序、分类过滤)
get_paper_content 获取论文全文(Markdown 格式,支持分页)

🔍 搜索功能特性

  • 智能排序:综合相关性和时间,越相关且越新的排越前
  • 分类过滤:支持 cs.AI、cs.LG、cs.CV、cs.CL 等分类
  • 多种排序:相关性、提交时间、更新时间

📖 论文阅读特性

  • PDF 转 Markdown:自动下载并转换为易读的 Markdown 格式
  • 分页返回:支持自定义每页字符数,适配 Token 限制
  • 摘要显示:每次返回都包含论文摘要
  • 智能缓存:自动缓存论文,超过 1GB 或 3 个月自动清理

🔐 认证功能

  • 管理员登录(用户名/密码)
  • Session 会话管理
  • API Token 管理(供 MCP 客户端使用)

快速开始

1. 安装依赖并运行

./run.sh

或手动:

pip install -r requirements.txt
python3.11 server.py

2. 访问

  • Web 界面: http://localhost:8633
  • 管理后台: http://localhost:8633/admin
  • MCP 端点: http://localhost:8633/mcp

3. 默认账号

  • 用户名:admin
  • 密码:admin123

请登录后在管理页面修改密码!

MCP 客户端配置

1. 创建 API Token

  1. 访问管理页面:http://localhost:8633/admin
  2. 在「API Token 管理」中创建新 Token
  3. 复制生成的 Token

2. 配置 Cursor / Claude Desktop

{
  "mcpServers": {
    "paper-reader": {
      "url": "http://localhost:8633/mcp",
      "headers": {
        "Authorization": "Bearer mcp_xxxxxxxx..."
      }
    }
  }
}

使用示例

搜索论文

# 智能搜索(默认:相关性+时间综合排序)
search_papers("transformer attention")

# 指定分类搜索
search_papers("large language model", category="cs.CL")

# 按时间排序
search_papers("diffusion model", sort_by="submitted", category="cs.CV")

获取论文全文

# 获取论文第一页(默认 20000 字符)
get_paper_content("1706.03762")

# 获取指定页
get_paper_content("1706.03762", page=2)

# 自定义每页字符数
get_paper_content("1706.03762", max_chars=50000)

常用分类

分类代码 说明 推荐用于
cs.AI 人工智能 通用 AI
cs.CL 计算语言学/NLP LLM、文本处理
cs.CV 计算机视觉 图像、视频
cs.LG 机器学习 通用 ML 算法
cs.NE 神经网络 网络架构
cs.IR 信息检索 搜索、推荐系统
cs.RO 机器人 机器人技术
stat.ML 统计机器学习 统计方法
eess.AS 音频与语音 语音处理
eess.IV 图像与视频 信号处理

项目结构

paper_reader/
├── server.py              # 服务器入口(Web + MCP)
├── run.sh                 # 启动脚本
├── config.yaml            # 配置文件
├── requirements.txt       # 依赖列表
├── paper_tools/           # 论文工具模块
│   ├── arxiv_search.py    # arXiv 搜索
│   ├── paper_cache.py     # 缓存管理
│   └── pdf_converter.py   # PDF 转 Markdown
├── auth.py                # 认证模块
├── api_logger.py          # API 日志
├── templates/             # HTML 模板
│   ├── index.html         # 工具测试页面
│   ├── login.html         # 登录页面
│   ├── admin.html         # 管理页面
│   └── logs.html          # 日志页面
├── static/                # 静态资源
│   ├── css/
│   └── js/
└── data/                  # 数据目录
    ├── auth.db            # 认证数据库
    ├── api_logs.db        # API 日志
    └── papers/            # 论文缓存
        ├── pdf/           # PDF 文件
        └── markdown/      # Markdown 文件

配置说明

config.yaml

# 服务器配置
server:
  name: "Paper Reader MCP"
  port: 8633

# 认证配置
auth:
  default_password: "admin123"
  salt: "your_salt_here"

# 存储配置
storage:
  data_dir: "./data"

# 论文缓存配置
papers:
  max_size_mb: 1024      # 最大缓存 1GB
  max_age_days: 90       # 保留 3 个月

缓存策略

论文缓存自动管理,淘汰策略:

  1. 先删除超过 90 天的论文
  2. 然后删除最大的文件(直到总大小 < 1GB)

☕ 赞赏

如果这个项目对你有帮助,欢迎请作者喝杯咖啡。

<img src="static/image/sponsor.jpg" width="300" alt="赞赏码">

💡 赞赏时请留下你的 GitHub ID,我会将你添加到感谢名单中。金额不限。

<details> <summary><b>🙏 鸣谢</b>(点击展开)</summary>

<br>

感谢以下小伙伴的支持:

赞助者 留言
虚位以待 期待你的支持

</details>

License

MIT License

Copyright (c) 2025 Miyang Tech (Zhuhai Hengqin) Co., Ltd.

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
Qdrant Server

Qdrant Server

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

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