返回 MCP 目录
public公开dns本地运行

arxiv-mcp-server

arXiv MCP服务器是一个基于模型上下文协议(MCP)的服务,允许用户通过自然语言与arXiv API交互,实现检索学术文章元数据、下载PDF文件、搜索数据库以及将文章加载到大型语言模型(LLM)上下文等功能。

article

README

🚀 arXiv MCP Server

arXiv MCP Server 是一个基于模型上下文协议(MCP)的服务器,它允许用户通过自然语言与 arXiv API 进行交互,方便地获取学术文章的相关信息。

✨ 主要特性

  • 检索托管在 arXiv.org 上的学术文章的元数据。
  • 将文章以 PDF 格式下载到本地机器。
  • 在 arXiv 数据库中搜索特定查询。
  • 将文章检索并加载到大型语言模型(LLM)的上下文中。

📦 安装指南

手动安装

  1. 克隆仓库
git clone https://github.com/prashalruchiranga/arxiv-mcp-server.git
cd arxiv-mcp-server
  1. 安装 uv 包管理器。如需了解在其他操作系统上的安装详情,请访问 官方 uv 文档
# 使用 Homebrew 安装(适用于 macOS)
brew install uv

# 或者
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. 创建并激活虚拟环境
uv venv --python=python3.13
source .venv/bin/activate   # 或者在 Windows 上使用 `venv\Scripts\activate`
  1. 安装开发依赖项
uv sync

💻 使用示例

基础用法

要在 Claude Desktop 中启用此集成,需将服务器配置添加到 claude_desktop_config.json 文件中。若该文件不存在,请先创建。

  • 在 MacOS 上:~/Library/Application Support/Claude/claude_desktop_config.json
  • 在 Windows 上:%APPDATA%/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "arxiv-server": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/PARENT/FOLDER/arxiv-mcp-server/src/arxiv_server",
        "run",
        "server.py"
      ],
      "env": {
        "DOWNLOAD_PATH": "/ABSOLUTE/PATH/TO/DOWNLOADS/FOLDER"
      }
    }
  }
}

你可能需要在命令字段中输入 uv 可执行文件的完整路径。你可以在 MacOS 上运行 which uv 或在 Windows 上运行 where uv 来获取该路径。

高级用法

以下是一些使用该服务器的示例提示:

Can you get the details of 'Reasoning to Learn from Latent Thoughts' paper?
Get the papers authored or co-authored by Yann Lecun on convolutional neural networks
Download the attention is all you need paper
Can you get the papers by Andrew NG which have 'convolutional neural networks' in title?
Can you display the paper?
List the titles of papers by Yann LeCun. Paginate through the API until there are 30 titles

📚 详细文档

工具说明

| 工具名称 | 功能 | 参数 | | ---- | ---- | ---- | | get_article_url | 根据文章标题检索 arXiv.org 上文章的 URL | title (String): 文章标题 | | download_article | 将 arXiv.org 上的文章下载为 PDF 文件 | title (String): 文章标题 | | load_article_to_context | 将 arXiv.org 上的文章加载到 LLM 的上下文中 | title (String): 文章标题 | | get_details | 根据文章标题检索 arXiv.org 上文章的元数据 | title (String): 文章标题 | | search_arxiv | 根据指定参数在 arXiv API 上执行搜索查询,并返回匹配的文章元数据 | all_fields (String): 跨所有元数据字段的通用关键字搜索
title (String): 在文章标题中搜索的关键字
author (String): 用于过滤结果的作者姓名
abstract (String): 在文章摘要中搜索的关键字
start (int): 返回的第一个结果的索引 |

📄 许可证

本项目采用 MIT 许可证。详情请见 LICENSE

help

运行方式说明

cloud

托管运行

托管运行通常表示这个 MCP Server 由服务方环境承载,用户一般按页面提供的连接方式或授权流程接入,不需要在本地长期启动一个 MCP 进程

  1. 打开服务方连接页
  2. 完成授权或复制端点
  3. 在 MCP 客户端中连接
terminal

本地运行 / 其它方式

本地运行通常需要用户在自己的电脑或服务器上安装依赖,把 server_config 复制到 MCP 客户端,并按 env_schema 补齐环境变量、密钥或其它配置

  1. 复制 server_config
  2. 安装所需依赖
  3. 补齐环境变量后重启客户端