Skip to main content
Glama

Europe PMC Literature Search MCP Server

by gqy20

Article MCP 文献搜索服务器

🔬 基于 FastMCP 框架开发的专业文献搜索工具,可与 Claude Desktop、Cherry Studio 等 AI 助手无缝集成

🚀 快速开始

0️⃣ 安装 uv 工具

# 安装 uv(如果尚未安装) curl -LsSf https://astral.sh/uv/install.sh | sh

1️⃣ 安装依赖

方式一:直接使用 PyPI 包(推荐)
# 直接运行,无需安装依赖 uvx article-mcp server
方式二:本地开发环境
# 克隆项目到本地 git clone https://github.com/gqy20/article-mcp.git cd article-mcp # 安装项目依赖 uv sync # 或使用 pip 安装依赖 pip install fastmcp requests python-dateutil aiohttp markdownify

2️⃣ 启动服务器

使用 PyPI 包(推荐)
# 直接运行 PyPI 包 uvx article-mcp server
本地开发
# 启动 MCP 服务器 uv run main.py server # 或使用 Python python main.py server

3️⃣ 配置 AI 客户端

Claude Desktop 配置

编辑 Claude Desktop 配置文件,添加:

方式一:使用 PyPI 包(推荐)
{ "mcpServers": { "article-mcp": { "command": "uvx", "args": [ "article-mcp", "server" ], "env": { "PYTHONUNBUFFERED": "1" } } } }
方式二:本地开发
{ "mcpServers": { "article-mcp": { "command": "uv", "args": [ "run", "--directory", "/path/to/your/article-mcp", "main.py", "server" ], "env": { "PYTHONUNBUFFERED": "1" } } } }
Cherry Studio 配置
{ "mcpServers": { "article-mcp": { "command": "uvx", "args": [ "article-mcp", "server", "--transport", "stdio" ], "env": { "PYTHONUNBUFFERED": "1" } } } }

4️⃣ 开始使用

配置完成后,重启你的 AI 客户端,即可使用以下功能:

  • 🔍 搜索学术文献 (search_europe_pmc)
  • 📄 获取文献详情 (get_article_details)
  • 📚 获取参考文献 (get_references_by_doi)
  • 🔗 批量处理DOI (batch_enrich_references_by_dois)
  • 📰 搜索arXiv预印本 (search_arxiv_papers)
  • ⭐ 评估期刊质量 (get_journal_quality)
  • 🔗 获取相似文章 (get_similar_articles)
  • 🔗 获取引用文献 (get_citing_articles)
  • 🔄 获取所有关联信息 (get_literature_relations)

📋 完整功能列表

核心搜索工具

工具名称功能描述主要参数
search_europe_pmc搜索 Europe PMC 文献数据库(高性能优化版本)keyword, email, start_date, end_date, max_results
get_article_details获取特定文献详细信息(高性能优化版本)identifier, id_type, mode, include_fulltext
search_arxiv_papers搜索 arXiv 预印本文献keyword, email, start_date, end_date, max_results

参考文献工具

工具名称功能描述主要参数
get_references_by_doi通过DOI获取参考文献列表(批量优化版本)doi
batch_enrich_references_by_dois批量补全多个DOI参考文献(超高性能版本)dois[] (最多20个), email
get_similar_articles获取相似文章推荐(基于PubMed相关文章算法)identifier, id_type, email, max_results
get_citing_articles获取引用该文献的文章identifier, id_type, max_results, email
get_literature_relations获取文献的所有关联信息identifier, id_type, max_results

质量评估工具

工具名称功能描述主要参数
get_journal_quality获取期刊影响因子、分区等journal_name, secret_key
evaluate_articles_quality批量评估文献期刊质量articles[], secret_key

⚡ 性能特性

  • 🚀 高性能并行处理 - 比传统方法快 30-50%
  • 💾 智能缓存机制 - 24小时本地缓存,避免重复请求
  • 🔄 批量处理优化 - 支持最多20个DOI同时处理
  • 🛡️ 自动重试机制 - 网络异常自动重试
  • 📊 详细性能统计 - 实时监控API调用情况

🔧 高级配置

环境变量

export PYTHONUNBUFFERED=1 # 禁用Python输出缓冲 export UV_LINK_MODE=copy # uv链接模式(可选) export EASYSCHOLAR_SECRET_KEY=your_secret_key # EasyScholar API密钥(可选)

MCP 配置集成 (v0.1.1 新功能)

现在支持从 MCP 客户端配置文件中读取 EasyScholar API 密钥,无需通过环境变量传递。

Claude Desktop 配置

编辑 ~/.config/claude-desktop/config.json 文件:

{ "mcpServers": { "article-mcp": { "command": "uvx", "args": ["article-mcp", "server"], "env": { "PYTHONUNBUFFERED": "1", "EASYSCHOLAR_SECRET_KEY": "your_easyscholar_api_key_here" } } } }
密钥优先级
  1. MCP配置文件中的密钥(最高优先级)
  2. 函数参数中的密钥
  3. 环境变量中的密钥
支持的工具
  • get_journal_quality - 获取期刊质量评估信息
  • evaluate_articles_quality - 批量评估文献的期刊质量

配置完成后重启 MCP 客户端即可生效。

传输模式

# STDIO 模式 (推荐用于桌面AI客户端) uv run main.py server --transport stdio # SSE 模式 (用于Web应用) uv run main.py server --transport sse --host 0.0.0.0 --port 9000 # HTTP 模式 (用于API集成) uv run main.py server --transport streamable-http --host 0.0.0.0 --port 9000

API 限制与优化

  • Crossref API: 50 requests/second (建议提供邮箱获得更高限额)
  • Europe PMC API: 1 request/second (保守策略)
  • arXiv API: 3 seconds/request (官方限制)

🛠️ 开发与测试

运行测试

# 运行功能测试 uv run main.py test # 查看项目信息 uv run main.py info # 或使用 PyPI 包 uvx article-mcp info

故障排除

问题解决方案
cannot import name 'hdrs' from 'aiohttp'运行 uv sync --upgrade 更新依赖
MCP服务器启动失败检查路径配置,确保使用绝对路径
API请求失败提供邮箱地址,检查网络连接
找不到uv命令使用完整路径:~/.local/bin/uv

项目结构

article-mcp/ ├── main.py # 主入口文件 ├── pyproject.toml # 项目配置文件 ├── README.md # 项目文档 ├── src/ # 核心服务模块 │ ├── europe_pmc.py # Europe PMC API 接口 │ ├── reference_service.py # 参考文献服务 │ ├── pubmed_search.py # PubMed 搜索服务 │ ├── similar_articles.py # 相似文章获取 │ ├── arxiv_search.py # arXiv 搜索服务 │ ├── literature_relation_service.py # 文献关联服务 │ └── resource/ # 资源文件目录 │ └── journal_info.json # 期刊信息缓存 └── tool_modules/ # 工具模块 ├── search_tools.py # 搜索工具 ├── article_detail_tools.py # 文献详情工具 ├── reference_tools.py # 参考文献工具 ├── relation_tools.py # 关联文献工具 └── quality_tools.py # 期刊质量工具

📄 返回数据格式

每篇文献包含以下标准字段:

{ "pmid": "文献ID", "title": "文献标题", "authors": ["作者1", "作者2"], "journal_name": "期刊名称", "publication_date": "发表日期", "abstract": "摘要", "doi": "DOI标识符", "pmid_link": "文献链接" }

📦 发布包管理

PyPI 包发布

项目已发布到 PyPI,支持通过 uvx 命令直接运行:

# 从PyPI安装后直接运行(推荐) uvx article-mcp server # 或先安装后运行 pip install article-mcp article-mcp server # 本地开发测试 uvx --from . article-mcp server

配置说明

有三种推荐的配置方式:

🥇 方案1:使用 PyPI 包(推荐)

这是最简单和推荐的方式,直接使用已发布的 PyPI 包:

{ "mcpServers": { "article-mcp": { "command": "uvx", "args": [ "article-mcp", "server" ], "env": { "PYTHONUNBUFFERED": "1" } } } }
🥈 方案2:本地开发

如果您想运行本地代码或进行开发:

{ "mcpServers": { "article-mcp": { "command": "uv", "args": [ "run", "main.py", "server" ], "env": { "PYTHONUNBUFFERED": "1" } } } }
🥉 方案3:Cherry Studio 配置

针对 Cherry Studio 的特定配置:

{ "mcpServers": { "article-mcp": { "command": "uvx", "args": [ "article-mcp", "server", "--transport", "stdio" ], "env": { "PYTHONUNBUFFERED": "1" } } } }

发布说明

  • PyPI 包名: article-mcp
  • 版本管理: 统一使用语义化版本控制
  • 自动更新: 使用 @latest 标签确保获取最新版本

📜 许可证

本项目遵循 MIT 许可证 - 详见 LICENSE 文件。


🤝 贡献

欢迎提交 Issue 和 Pull Request!

  1. Fork 项目
  2. 创建功能分支 (git checkout -b feature/AmazingFeature)
  3. 提交更改 (git commit -m 'Add some AmazingFeature')
  4. 推送到分支 (git push origin feature/AmazingFeature)
  5. 打开 Pull Request

📞 支持


📖 使用示例

搜索 Europe PMC 文献

{ "keyword": "machine learning cancer detection", "start_date": "2020-01-01", "end_date": "2024-12-31", "max_results": 20 }

获取文献详情(通过PMID)

{ "identifier": "12345678", "id_type": "pmid" }

获取文献详情(通过DOI)

{ "identifier": "10.1000/xyz123", "id_type": "doi" }

获取文献详情(通过PMCID)

{ "identifier": "PMC1234567", "id_type": "pmcid" }

获取文献详情(异步模式)

{ "identifier": "12345678", "id_type": "pmid", "mode": "async" }

批量获取参考文献

{ "dois": [ "10.1126/science.adf6218", "10.1038/s41586-020-2649-2", "10.1056/NEJMoa2034577" ], "email": "your.email@example.com" }

期刊质量评估

{ "journal_name": "Nature", "secret_key": "your_easyscholar_key" }

获取文献的所有关联信息

{ "identifier": "10.1000/xyz123", "id_type": "doi", "max_results": 10 }
Deploy Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

A professional literature search tool built on FastMCP framework that enables AI assistants to search academic literature from Europe PMC, retrieve article details, and analyze journal quality with seamless integration into Claude Desktop and Cherry Studio.

  1. 🚀 快速开始
    1. 0️⃣ 安装 uv 工具
    2. 1️⃣ 安装依赖
    3. 2️⃣ 启动服务器
    4. 3️⃣ 配置 AI 客户端
    5. 4️⃣ 开始使用
  2. 📋 完整功能列表
    1. 核心搜索工具
    2. 参考文献工具
    3. 质量评估工具
  3. ⚡ 性能特性
    1. 🔧 高级配置
      1. 环境变量
      2. MCP 配置集成 (v0.1.1 新功能)
      3. 传输模式
      4. API 限制与优化
    2. 🛠️ 开发与测试
      1. 运行测试
      2. 故障排除
      3. 项目结构
    3. 📄 返回数据格式
      1. 📦 发布包管理
        1. PyPI 包发布
        2. 配置说明
        3. 发布说明
      2. 📜 许可证
        1. 🤝 贡献
          1. 📞 支持
            1. 📖 使用示例
              1. 搜索 Europe PMC 文献
              2. 获取文献详情(通过PMID)
              3. 获取文献详情(通过DOI)
              4. 获取文献详情(通过PMCID)
              5. 获取文献详情(异步模式)
              6. 批量获取参考文献
              7. 期刊质量评估
              8. 获取文献的所有关联信息

            Related MCP Servers

            • -
              security
              F
              license
              -
              quality
              An MCP server implementation that enables searching and retrieving research articles from PubMed with specific focus on open access content filtering and full-text link retrieval.
              Last updated -
              8
              3
            • -
              security
              F
              license
              -
              quality
              An MCP server that integrates with Claude to provide smart documentation search capabilities across multiple AI/ML libraries, allowing users to retrieve and process technical information through natural language queries.
              Last updated -
            • -
              security
              A
              license
              -
              quality
              🔍 Enable AI assistants to search, access, and analyze PubMed articles through a simple MCP interface.
              Last updated -
              62
              MIT License
              • Apple
              • Linux
            • -
              security
              A
              license
              -
              quality
              An MCP server for searching and downloading academic papers from multiple sources including arXiv, PubMed, bioRxiv, and Sci-Hub, designed for seamless integration with large language models like Claude Desktop.
              Last updated -
              340
              MIT License
              • Apple

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/gqy20/article-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server