mcpField
O
Open Alex MCP

Open Alex MCP

本地服务
github.com/drAbreu科研与教育5763 周前更新

关于 Open Alex MCP

Open Alex MCP 是基于 OpenAlex API 的学术研究 MCP 服务,面向需要检索作者与论文的 AI Agent 和研究工作流。它提供作者消歧、机构履历及 ORCID 匹配,并以结构化结果支持筛选和引用分析。

主要功能

  1. 01作者搜索与候选消歧
  2. 02解析当前及历史机构
  3. 03检索作者学术作品
  4. 04按年份、类型和引用筛选
  5. 05提供 ORCID 与影响指标

适用场景

  1. 01区分同名研究者
  2. 02核对作者的机构变迁
  3. 03筛选某位作者的期刊论文
  4. 04按引用量整理学术作品

MCP 相关

该 MCP 服务向兼容客户端提供作者搜索、候选消歧和作品检索工具。结构化结果包含作者、机构、ORCID、引用及作品信息。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"alex": {
"command": "uvx",
"args": [
"git+https://github.com/drAbreu/alex-mcp.git"
]
}
}
}
启动命令uvx 'git+https://github.com/drAbreu/alex-mcp.git'

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
pypigit+https://github.com/drAbreu/alex-mcp.git

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

OpenAlex 作者消歧 MCP 服务

OpenAlex 作者消歧 MCP 服务

MCP Python OpenAlex License Optimized

这是一款精简的 Model Context Protocol(MCP)服务,通过 OpenAlex.org API 实现作者消歧与学术研究。专为 AI Agent 设计,采用经过优化的数据结构并增强了功能。


🎯 主要功能

🔍 核心能力
  • 高级作者消歧:处理复杂的职业变动和姓名变体
  • 机构解析:查询当前及过往隶属机构,并追踪变动
  • 学术作品检索:期刊文章、信件和研究论文
  • 引用分析:H 指数、引用次数和影响力指标
  • ORCID 集成:通过 ORCID 标识符实现最高精度的匹配
🚀 针对 AI Agent 优化
  • 精简数据:专注于消歧所需的关键信息
  • 快速处理:优化数据结构,实现快速分析
  • 智能筛选:增强筛选选项,实现有针对性的查询
  • 清晰输出:采用结构化响应,优化 AI 推理效果
🤖 Agent 集成
  • 多个候选项:提供排序结果,支持自动决策
  • 结构化响应:提供清晰、可解析且针对大模型优化的输出
  • 错误处理:在功能降级时提供清晰的提示信息
  • 增强筛选:支持仅限期刊、引用阈值和时间筛选
🏛️ 专业级品质
  • MCP 最佳实践:遵循官方指南,使用 FastMCP 构建
  • 工具注解:提供规范的 MCP 工具注解,优化客户端集成
  • 资源管理:高效管理 HTTP 客户端并进行清理
  • 速率限制:合理使用 API,并设置适当的延迟

🚀 快速开始

先决条件
  • Python 3.10 或更高版本
  • 兼容 MCP 的客户端(例如 Claude Desktop)
  • 电子邮件地址(用于 OpenAlex API 礼貌性访问)
安装

详细安装说明请参阅 INSTALL.md。

  1. 克隆仓库:

    git clone https://github.com/drAbreu/alex-mcp.git
    cd alex-mcp
    
  2. 创建虚拟环境:

    python3 -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. 安装软件包:

    pip install -e .
    
  4. 配置环境:

    export [email protected]
    
  5. 运行服务:

    ./run_alex_mcp.sh
    # Or, if installed as a CLI tool:
    alex-mcp
    

⚙️ MCP 配置

Claude Desktop 配置

将以下内容添加到 Claude Desktop 配置文件中:

{
  "mcpServers": {
    "alex-mcp": {
      "command": "/path/to/alex-mcp/run_alex_mcp.sh",
      "env": {
        "OPENALEX_MAILTO": "[email protected]"
      }
    }
  }
}

将 /path/to/alex-mcp 替换为系统中仓库的实际路径。


🤖 与 AI Agent 配合使用

OpenAI Agents 集成

你可以使用 agents.mcp.MCPServerStdio 接口,在 OpenAI Agent 工作流中加载此 MCP 服务:

from agents.mcp import MCPServerStdio

async with MCPServerStdio(
    name="OpenAlex MCP For Author disambiguation and works",
    cache_tools_list=True,
    params={
        "command": "uvx",
        "args": [
            "--from", "git+https://github.com/drAbreu/[email protected]",
            "alex-mcp"
        ],
        "env": {
            "OPENALEX_MAILTO": "[email protected]"
        }
    },
    client_session_timeout_seconds=10
) as alex_mcp:
    await alex_mcp.connect()
    tools = await alex_mcp.list_tools()
    print(f"Available tools: {[tool.name for tool in tools]}")
学术研究 Agent 集成

此 MCP 服务专为学术研究工作流优化:

# Optimized for academic research workflows
from alex_agent import run_author_research

# Enhanced functionality with streamlined data
result = await run_author_research(
    "Find J. Abreu at EMBO with recent publications"
)

# Clean, structured output for AI processing
print(f"Success: {result['workflow_metadata']['success']}")
print(f"Quality: {result['research_result']['metadata']['result_analysis']['quality_score']}/100")
使用 uvx 直接启动
# Standard launch
uvx --from git+https://github.com/drAbreu/[email protected] alex-mcp

# With environment variables
[email protected] uvx --from git+https://github.com/drAbreu/[email protected] alex-mcp

🛠️ 可用工具

1. autocomplete_authors ⭐ 全新

使用 OpenAlex 自动补全 API 获取多个作者候选项,实现智能消歧。

参数:

  • name(必填):要搜索的作者姓名(例如,“James Briscoe”“M. Ralser”)
  • context(可选):用于消歧的上下文(例如,“Francis Crick Institute 发育生物学”)
  • limit(可选):候选项上限(1-10,默认值:5)

主要功能:

  • ⚡ 快速:响应时间约为 200 ms
  • 🎯 智能:提供多个候选项及机构提示
  • 🧠 适用于 AI:非常适合基于上下文进行选择
  • 📊 信息丰富:作品数量、引用数、机构信息

精简输出:

{
  "query": "James Briscoe",
  "context": "Francis Crick Institute",
  "total_candidates": 3,
  "candidates": [
    {
      "openalex_id": "https://openalex.org/A5019391436",
      "display_name": "James Briscoe",
      "institution_hint": "The Francis Crick Institute, UK",
      "works_count": 415,
      "cited_by_count": 24623,
      "external_id": "https://orcid.org/0000-0002-1020-5240"
    }
  ]
}

使用模式:

# Get multiple candidates for disambiguation
candidates = await autocomplete_authors(
    "James Briscoe", 
    context="Francis Crick Institute developmental biology"
)

# AI selects best match based on institutional context
# Much more accurate than single search result!
2. search_authors

搜索作者,并为 AI Agent 提供精简输出。

参数:

  • name(必填):要搜索的作者姓名
  • institution(可选):机构名称筛选条件
  • topic(可选):研究主题筛选条件
  • country_code(可选):国家/地区代码筛选条件(例如,“US”“DE”)
  • limit(可选):结果上限(1-25,默认值:20)

精简输出:

{
  "query": "J. Abreu",
  "total_count": 3,
  "results": [
    {
      "id": "https://openalex.org/A123456789",
      "display_name": "Jorge Abreu-Vicente",
      "orcid": "https://orcid.org/0000-0000-0000-0000",
      "display_name_alternatives": ["J. Abreu-Vicente", "Jorge Abreu Vicente"],
      "affiliations": [
        {
          "institution": {
            "display_name": "European Molecular Biology Organization",
            "country_code": "DE"
          },
          "years": [2023, 2024, 2025]
        }
      ],
      "cited_by_count": 316,
      "works_count": 25,
      "summary_stats": {
        "h_index": 9,
        "i10_index": 5
      },
      "x_concepts": [
        {
          "display_name": "Astrophysics",
          "score": 0.8
        },
        {
          "display_name": "Machine Learning", 
          "score": 0.6
        }
      ]
    }
  ]
}

功能:结构清晰,针对 AI 推理和消歧进行了优化


2. retrieve_author_works

检索指定作者的作品,并支持增强型筛选功能。

参数:

  • author_id(必填):OpenAlex 作者 ID
  • limit(可选):结果上限(1-50,默认值:20)
  • order_by(可选):“date”或“citations”(默认值:“date”)
  • publication_year(可选):按特定年份筛选
  • type(可选):作品类型筛选条件(例如,“journal-article”)
  • authorships_institutions_id(可选):按机构筛选
  • is_retracted(可选):按撤稿作品筛选
  • open_access_is_oa(可选):按开放获取状态筛选

增强型输出:

{
  "author_id": "https://openalex.org/A123456789",
  "total_count": 25,
  "results": [
    {
      "id": "https://openalex.org/W123456789",
      "title": "A platform for the biomedical application of large language models",
      "doi": "10.1038/s41587-024-02534-3",
      "publication_year": 2025,
      "type": "journal-article",
      "cited_by_count": 42,
      "authorships": [
        {
          "author": {
            "display_name": "Jorge Abreu-Vicente"
          },
          "institutions": [
            {
              "display_name": "European Molecular Biology Organization"
            }
          ]
        }
      ],
      "locations": [
        {
          "source": {
            "display_name": "Nature Biotechnology",
            "type": "journal"
          }
        }
      ],
      "open_access": {
        "is_oa": true
      },
      "primary_topic": {
        "display_name": "Biomedical Engineering"
      }
    }
  ]
}

功能:提供全面的作品数据,并支持灵活筛选,满足定向查询需求


📊 数据优化

聚焦的信息架构

此 MCP 服务提供经过聚焦和结构化的数据,专为 AI Agent 使用而设计:

作者数据功能
  • 身份识别:姓名、ORCID、用于消歧的其他姓名
  • 隶属关系追踪:当前和历史机构关联
  • 影响力指标:引用数、h 指数和学术影响力
  • 研究背景:领域、概念和专业方向
  • 职业分析:隶属关系随时间发生的变化和转换
作品数据功能
  • 出版元数据:标题、DOI、出版载体和出版详情
  • 影响力评估:引用数和学术影响力
  • 获取信息:开放获取状态和可用性
  • 作者信息:完整作者列表及机构隶属关系
  • 研究分类:主题、概念和领域分类
增强型筛选
# Target high-impact journal articles
works = await retrieve_author_works(
    author_id="https://openalex.org/A123456789",
    type="journal-article",      # Focus on journal publications
    open_access_is_oa=True,      # Open access only
    order_by="citations",        # Most cited first
    limit=15
)

# Career transition analysis
authors = await search_authors(
    name="J. Abreu",
    institution="EMBO",          # Current institution
    topic="Machine Learning",    # Research focus
    limit=10
)

🧪 使用示例

作者消歧
from alex_mcp.server import search_authors_core

# Comprehensive author search
results = search_authors_core(
    name="J Abreu Vicente",
    institution="EMBO",
    topic="Machine Learning",
    limit=20
)

print(f"Found {results.total_count} candidates")
for author in results.results:
    print(f"- {author.display_name}")
    if author.affiliations:
        current_inst = author.affiliations[0].institution.display_name
        print(f"  Institution: {current_inst}")
    print(f"  Metrics: {author.cited_by_count} citations, h-index {author.summary_stats.h_index}")
    if author.x_concepts:
        fields = [c.display_name for c in author.x_concepts[:3]]
        print(f"  Research: {', '.join(fields)}")
学术作品分析
from alex_mcp.server import retrieve_author_works_core

# Comprehensive work retrieval
works = retrieve_author_works_core(
    author_id="https://openalex.org/A5058921480",
    type="journal-article",      # Academic focus
    order_by="citations",        # Impact-based ordering
    limit=20
)

print(f"Found {works.total_count} publications")
for work in works.results:
    print(f"- {work.title}")
    if work.locations:
        journal = work.locations[0].source.display_name
        print(f"  Published in: {journal} ({work.publication_year})")
    print(f"  Impact: {work.cited_by_count} citations")
    if work.open_access and work.open_access.is_oa:
        print("  ✓ Open Access")
机构与领域分析
# Analyze career transitions
def analyze_career_path(author_result):
    affiliations = author_result.affiliations
    if len(affiliations) > 1:
        print("Career path:")
        for aff in sorted(affiliations, key=lambda x: min(x.years)):
            years = f"{min(aff.years)}-{max(aff.years)}"
            print(f"  {years}: {aff.institution.display_name}")
    
    # Research evolution
    if author_result.x_concepts:
        print("Research areas:")
        for concept in author_result.x_concepts[:5]:
            print(f"  {concept.display_name} (score: {concept.score:.2f})")

# Usage
results = search_authors_core("Jorge Abreu Vicente")
if results.results:
    analyze_career_path(results.results[0])

🔧 配置选项

环境变量
# Required
export [email protected]

# Optional settings
export OPENALEX_MAX_AUTHORS=100             # Maximum authors per query
export OPENALEX_USER_AGENT=research-agent-v1.0
export ALEX_MCP_VERSION=4.1.0

# Rate limiting (respectful usage)
export OPENALEX_RATE_PER_SEC=10
export OPENALEX_RATE_PER_DAY=100000
性能调优
# For comprehensive research applications
config = {
    "max_authors_per_query": 25,     # Detailed author analysis
    "max_works_per_author": 50,      # Complete publication history
    "enable_all_filters": True,      # Full filtering capabilities
    "detailed_affiliations": True,   # Complete institutional data
    "research_concepts": True        # Detailed concept analysis
}

🧑‍💻 开发与测试

项目结构
alex-mcp/
├── src/alex_mcp/
│   ├── server.py              # Main MCP server
│   ├── data_objects.py        # Data models and structures
│   └── utils.py               # Utility functions
├── examples/
│   ├── basic_usage.py         # Simple examples
│   ├── advanced_queries.py    # Complex query examples
│   └── integration_demo.py    # AI agent integration
├── tests/
│   ├── test_server.py         # Server functionality tests
│   └── test_integration.py    # Integration tests
└── docs/
    └── api_reference.md       # Detailed API documentation
运行测试
# Install test dependencies
pip install -e ".[test]"

# Run functionality tests
pytest tests/test_server.py -v

# Test with real queries
python examples/basic_usage.py

# Test AI agent integration
python examples/integration_demo.py
开发示例
# Test author disambiguation
python examples/basic_usage.py --query "J. Abreu" --institution "EMBO"

# Test work retrieval
python examples/advanced_queries.py --author-id "A123456789" --type "journal-article"

# Test integration patterns
python examples/integration_demo.py --workflow "career-analysis"

📈 集成示例

学术研究工作流

可与 AI 驱动的研究分析完美集成:

# Enhanced academic research agent
from alex_agent import AcademicResearchAgent

agent = AcademicResearchAgent(
    mcp_servers=[alex_mcp],  # Streamlined data processing
    model="gpt-4.1-2025-04-14"
)

# Complex research queries with structured data
result = await agent.research_author(
    "Find J. Abreu at EMBO with machine learning publications"
)

# Rich, structured output for AI reasoning
print(f"Quality Score: {result.quality_score}/100")
print(f"Author disambiguation: {result.confidence}")
print(f"Research fields: {result.research_domains}")
多 Agent 系统
# Collaborative research analysis
async def research_collaboration_network(seed_author):
    # Find primary author
    authors = await alex_mcp.search_authors(seed_author)
    primary = authors['results'][0]
    
    # Get their works
    works = await alex_mcp.retrieve_author_works(
        primary['id'], 
        type="journal-article"
    )
    
    # Analyze co-authors and build network
    collaborators = set()
    for work in works['results']:
        for authorship in work.get('authorships', []):
            collaborators.add(authorship['author']['display_name'])
    
    return {
        'primary_author': primary,
        'publication_count': len(works['results']),
        'collaborator_network': list(collaborators),
        'research_impact': sum(w['cited_by_count'] for w in works['results'])
    }

🤝 参与贡献

欢迎贡献代码,帮助改进功能并添加新特性:

  1. Fork 此仓库
  2. 创建功能分支:git checkout -b feature/enhanced-filtering
  3. 添加测试:确保你的更改保持数据质量和结构
  4. 提交拉取请求:附上示例和文档
开发优先事项
  • 增强筛选功能
  • 补充数据丰富功能
  • 性能优化
  • 集成示例
  • 改进文档

📄 许可证

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


🌐 链接

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。