# arXiv-MCP工具
## 基本信息
- Slug: `huanongfish-arxiv-mcp`
- Source: modelscope
- Publisher: @huanongfish/arxiv-mcp
- Categories: research-and-data / search / note-taking
- Hosted: No
- License: Apache License 2.0
- Source URL: https://www.modelscope.cn/mcp/servers/@huanongfish/arxiv-mcp
## 简介
通过简单的消息控制协议接口，使人工智能助手能够搜索和访问arXiv研究论文，从而实现论文的搜索、下载、列出和阅读功能。
## 安装提示

```bash
npx -y @smithery/cli install arxiv-mcp-server --client claude
```

## MCP Server 详情

[![Twitter Follow](https://img.shields.io/twitter/follow/JoeBlazick?style=social)](https://twitter.com/JoeBlazick)
[![smithery badge](https://smithery.ai/badge/arxiv-mcp-server)](https://smithery.ai/server/arxiv-mcp-server)
[![Python Version](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PyPI Downloads](https://img.shields.io/pypi/dm/arxiv-mcp-server.svg)](https://pypi.org/project/arxiv-mcp-server/)
[![PyPI Version](https://img.shields.io/pypi/v/arxiv-mcp-server.svg)](https://pypi.org/project/arxiv-mcp-server/)

# ArXiv MCP 服务器

> 🔍 通过简单的MCP接口，使AI助手能够搜索和访问arXiv论文。

ArXiv MCP 服务器通过消息控制协议（MCP）在AI助手与arXiv研究库之间提供了一个桥梁。它允许AI模型以编程方式搜索论文并访问其内容。

<div align="center">
  
🤝 **[贡献](https://github.com/blazickjp/arxiv-mcp-server/blob/main/CONTRIBUTING.md)** • 
📝 **[报告错误](https://github.com/blazickjp/arxiv-mcp-server/issues)**

</div>

## ✨ 核心功能

- 🔎 **论文搜索**：使用日期范围和类别筛选器查询arXiv论文
- 📄 **论文访问**：下载并阅读论文内容
- 📋 **论文列表**：查看所有已下载的论文
- 🗃️ **本地存储**：论文保存在本地以加快访问速度
- 📝 **提示**：一组研究提示

## 🚀 快速开始

### 通过Smithery安装

要通过[Smithery](https://smithery.ai/server/arxiv-mcp-server)自动为Claude桌面安装ArXiv服务器：

```bash
npx -y @smithery/cli install arxiv-mcp-server --client claude
```


### 手动安装
使用uv进行安装：

```bash
uv tool install arxiv-mcp-server
```


开发用途：

```bash
# Clone and set up development environment
git clone https://github.com/blazickjp/arxiv-mcp-server.git
cd arxiv-mcp-server

# Create and activate virtual environment
uv venv
source .venv/bin/activate

# Install with test dependencies
uv pip install -e ".[test]"
```


### 🔌 MCP 集成

将此配置添加到您的MCP客户端配置文件中：

```json
{
    "mcpServers": {
        "arxiv-mcp-server": {
            "command": "uv",
            "args": [
                "tool",
                "run",
                "arxiv-mcp-server",
                "--storage-path", "/path/to/paper/storage"
            ]
        }
    }
}
```


开发用途：

```json
{
    "mcpServers": {
        "arxiv-mcp-server": {
            "command": "uv",
            "args": [
                "--directory",
                "path/to/cloned/arxiv-mcp-server",
                "run",
                "arxiv-mcp-server",
                "--storage-path", "/path/to/paper/storage"
            ]
        }
    }
}
```


## 💡 可用工具

服务器提供了四个主要工具：

### 1. 论文搜索
带有可选筛选器的论文搜索：

```python
result = await call_tool("search_papers", {
    "query": "transformer architecture",
    "max_results": 10,
    "date_from": "2023-01-01",
    "categories": ["cs.AI", "cs.LG"]
})
```


### 2. 论文下载
通过arXiv ID下载论文：

```python
result = await call_tool("download_paper", {
    "paper_id": "2401.12345"
})
```


### 3. 列出论文
查看所有已下载的论文：

```python
result = await call_tool("list_papers", {})
```


### 4. 阅读论文
访问已下载论文的内容：

```python
result = await call_tool("read_paper", {
    "paper_id": "2401.12345"
})
```


## ⚙️ 配置

通过环境变量进行配置：

| 变量 | 用途 | 默认值 |
|----------|---------|---------|
| `ARXIV_STORAGE_PATH` | 论文存储位置 | ~/.arxiv-mcp-server/papers |

## 🧪 测试

运行测试套件：

```bash
python -m pytest
```


## 📄 许可证

根据MIT许可证发布。详情请参见LICENSE文件。

---

<div align="center">

由Pear Labs团队用心制作

<a href="https://glama.ai/mcp/servers/04dtxi5i5n"><img width="380" height="200" src="https://glama.ai/mcp/servers/04dtxi5i5n/badge" alt="ArXiv Server MCP server" /></a>
</div>

