# Paper Reader

> An MCP server that empowers AI assistants (Cursor, Claude, Cherry Studio) to search, read, and summarize arXiv papers directly.

- **Type:** MCP server
- **Install:** `agentstack add mcp-itshen-paper-reader`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [itshen](https://agentstack.voostack.com/s/itshen)
- **Installs:** 0
- **Category:** [Search](https://agentstack.voostack.com/c/search)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [itshen](https://github.com/itshen)
- **Source:** https://github.com/itshen/paper_reader
- **Website:** https://paper.lxshan.com/

## Install

```sh
agentstack add mcp-itshen-paper-reader
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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. 安装依赖并运行

```bash
./run.sh
```

或手动：

```bash
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

```json
{
  "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

```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. 然后删除最大的文件（直到总大小 

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

🙏 鸣谢（点击展开）

感谢以下小伙伴的支持：

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

## License

MIT License

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

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [itshen](https://github.com/itshen)
- **Source:** [itshen/paper_reader](https://github.com/itshen/paper_reader)
- **License:** MIT
- **Homepage:** https://paper.lxshan.com/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-itshen-paper-reader
- Seller: https://agentstack.voostack.com/s/itshen
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
