Arxiv Mcp Server

Arxiv Mcp Server

🚀 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

  • 0 关注
  • 0 收藏,16 浏览
  • system 提出于 2025-09-21 08:15

相似服务问题

相关AI产品