arXiv MCP Server 是一个基于模型上下文协议(MCP)的服务器,它允许用户通过自然语言与 arXiv API 进行交互,方便地获取学术文章的相关信息。
git clone https://github.com/prashalruchiranga/arxiv-mcp-server.git
cd arxiv-mcp-server
uv 包管理器。如需了解在其他操作系统上的安装详情,请访问 官方 uv 文档。# 使用 Homebrew 安装(适用于 macOS)
brew install uv
# 或者
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv --python=python3.13
source .venv/bin/activate # 或者在 Windows 上使用 `venv\Scripts\activate`
uv sync
要在 Claude Desktop 中启用此集成,需将服务器配置添加到 claude_desktop_config.json 文件中。若该文件不存在,请先创建。
~/Library/Application Support/Claude/claude_desktop_config.json%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。