使用说明
arXiv MCP服务器
一种模型上下文协议(MCP)服务器,使LLM能够搜索、下载和阅读arXiv论文。让AI助手直接访问科学文献。
特性
- 搜索论文 -按标题、关键字、作者或arXiv ID搜索
- 阅读全文 -下载PDF并自动提取文本
- 断面提取 -获取具体章节(摘要、引言、方法、结论)
- 本地缓存 -下载的论文在本地缓存,以便快速重新访问
- 零配置 -使用合理的默认值即可开箱即用
入门指南
先决条件
此MCP服务器使用 uvx 跑步。首先,安装 uv:
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Or using Homebrew
brew install uv
安装后,重新启动终端。
安装
在客户端上安装arXiv MCP服务器。
标准配置在大多数工具中都有效:
{
"mcpServers": {
"arxiv": {
"command": "uvx",
"args": ["arxiv-paper-mcp-server"]
}
}
}
Amp
amp mcp add arxiv -- uvx arxiv-paper-mcp-server
Claude Code
claude mcp add arxiv-server -- uvx arxiv-paper-mcp-server
Claude Desktop
添加到您的 claude_desktop_config.json:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - 窗户:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"arxiv": {
"command": "uvx",
"args": ["arxiv-paper-mcp-server"]
}
}
}
Codex
codex mcp add arxiv -- uvx arxiv-paper-mcp-server
Cursor
添加到 ~/.cursor/mcp.json:
{
"mcpServers": {
"arxiv": {
"command": "uvx",
"args": ["arxiv-paper-mcp-server"]
}
}
}
Factory
添加到出厂MCP设置:
{
"mcpServers": {
"arxiv": {
"command": "uvx",
"args": ["arxiv-paper-mcp-server"]
}
}
}
Gemini CLI
gemini mcp add arxiv -- uvx arxiv-paper-mcp-server
Goose
跑 goose configure,然后添加到 ~/.config/goose/config.yaml:
extensions:
arxiv:
command: uvx
args:
- arxiv-paper-mcp-server
Kiro
添加到Kiro MCP设置:
{
"mcpServers": {
"arxiv": {
"command": "uvx",
"args": ["arxiv-paper-mcp-server"]
}
}
}
LM Studio
添加到LM Studio MCP设置:
{
"mcpServers": {
"arxiv": {
"command": "uvx",
"args": ["arxiv-paper-mcp-server"]
}
}
}
opencode
opencode mcp add arxiv -- uvx arxiv-paper-mcp-server
Qodo Gen
添加到Qodo Gen MCP配置:
{
"mcpServers": {
"arxiv": {
"command": "uvx",
"args": ["arxiv-paper-mcp-server"]
}
}
}
VS Code
添加到 .vscode/mcp.json 在您的工作空间中:
{
"mcpServers": {
"arxiv": {
"command": "uvx",
"args": ["arxiv-paper-mcp-server"]
}
}
}
Warp
添加到扭曲MCP设置:
{
"mcpServers": {
"arxiv": {
"command": "uvx",
"args": ["arxiv-paper-mcp-server"]
}
}
}
Windsurf
添加到 ~/.windsurf/mcp.json:
{
"mcpServers": {
"arxiv": {
"command": "uvx",
"args": ["arxiv-paper-mcp-server"]
}
}
}
Using pip
pip install arxiv-paper-mcp-server
arxiv-mcp-server
工具
| 工具 | 说明 |
|---|---|
search |
按标题、关键字或arXiv ID搜索arXiv论文(例如。, 2401.12345) |
get_paper |
下载并阅读论文全文,可选部分过滤 |
list_downloaded_papers |
列出所有本地缓存的论文 |
工具详细信息
search(query, max_results=10)
搜索arXiv上的论文。支持:
- 关键词:
"transformer attention mechanism" - 纸张ID:
"2401.12345"或"arXiv:2401.12345" - 作者
"Yann LeCun"
返回论文ID、标题、作者、发表日期和摘要预览。
get_paper(paper_id, section="all")
从论文中下载并提取文本。
| 第节 | 说明 |
|---|---|
all |
全文(默认) |
abstract |
仅摘要 |
introduction |
导言部分 |
method |
方法/方法部分 |
conclusion |
结论/讨论部分 |
list_downloaded_papers()
列出所有已下载并在本地缓存的论文。
配置
| 环境变量 | 描述 | 默认值 |
|---|---|---|
ARXIV_STORAGE_DIR |
下载论文目录 | ~/.arxiv-mcp/papers |
使用示例
搜索论文:
User: Find recent papers about prompt compression
Claude: [Uses search("prompt compression", max_results=5)]
Found 5 papers:
- 2504.16574: PIS: Linking Importance Sampling...
- ...
阅读一篇特定的论文:
User: Read the introduction of paper 2401.12345
Claude: [Uses get_paper("2401.12345", section="introduction")]
[Returns the introduction section]
查看缓存的论文:
User: What papers have I downloaded?
Claude: [Uses list_downloaded_papers()]
You have 3 papers cached locally:
- 2401.12345: Paper Title...
发展
# Clone the repository
git clone https://github.com/AnnaSuSu/arxiv-mcp.git
cd arxiv-mcp
# Install dependencies
uv sync
# Run server locally
uv run arxiv-mcp-server
需求
- Python 3.10+
- 依赖关系:
mcp,arxiv,pymupdf
许可证
MIT许可证-请参阅 许可证 了解详情。