Lyra's Expanded Research MCP

Lyra's Expanded Research MCP

A unified MCP server providing programmatic access to three major academic research APIs: Semantic Scholar, OpenAlex, and PubMed.

Category
访问服务器

README

Lyra's Expanded Research MCP

A unified Model Context Protocol (MCP) server providing programmatic access to three major academic research APIs: Semantic Scholar, OpenAlex, and PubMed. Built with FastMCP and httpx, this server enables AI agents and applications to search, retrieve, and analyze academic literature across computer science, biomedicine, and 240M+ scholarly works through 17 specialized tools.

Features

  • 17 Specialized Tools across three complementary research APIs
  • Comprehensive Coverage: CS/interdisciplinary (Semantic Scholar), biomedical/clinical (PubMed), and broad scholarly works (OpenAlex)
  • Intelligent Rate Limiting with token bucket algorithms and exponential backoff per API
  • Flexible Authentication supporting both free and authenticated tiers for all three services
  • Robust Error Handling with automatic retry on 429 responses and Retry-After header support
  • Rich Metadata including abstracts, citation counts, MeSH terms, concepts, and open access information
  • Advanced Search Capabilities with field-specific filters, MeSH indexing, and concept-based discovery

Tools Overview

Semantic Scholar Tools (8)

Paper Search & Retrieval

  • s2_search_papers — Search papers with filters for year range, field of study, and open access status
  • s2_get_paper — Get detailed metadata by S2 ID, ArXiv ID (ArXiv:XXXX.XXXXX), DOI, or CorpusId
  • s2_get_paper_citations — Retrieve forward citations with pagination support (up to 1000)
  • s2_get_paper_references — Retrieve backward citations with pagination support (up to 1000)

Author Information

  • s2_search_authors — Search for authors by name
  • s2_get_author — Get comprehensive author details including h-index, affiliations, and citation counts
  • s2_get_author_papers — Retrieve all papers by a specific author with pagination

Recommendations

  • s2_recommend_papers — Get paper recommendations using single-paper or multi-paper mode with positive and negative examples

OpenAlex Tools (4)

Works Search & Retrieval

  • openalex_search_works — Search 240M+ scholarly works with year, concept, and open access filters
  • openalex_get_work — Get detailed metadata by OpenAlex ID or DOI with abstract reconstruction
  • openalex_search_authors — Search authors with pagination
  • openalex_get_citations — Retrieve forward citations with pagination

PubMed Tools (5)

Biomedical Literature

  • pubmed_search — Search with PubMed query syntax supporting MeSH terms, boolean operators, and field tags
  • pubmed_get_paper — Get full metadata by PMID including title, abstract, authors, and MeSH indexing
  • pubmed_find_related — Discover related articles via NCBI ELink service
  • pubmed_get_citations — Find articles citing a given PMID
  • pubmed_advanced_search — Field-specific search with author, MeSH, journal, and date range filters

Complete Tools Reference

Tool API Purpose Key Parameters
s2_search_papers Semantic Scholar Search papers query, year, fields_of_study, open_access_only
s2_get_paper Semantic Scholar Get paper metadata paper_id (S2/ArXiv/DOI/CorpusId)
s2_get_paper_citations Semantic Scholar Forward citations paper_id, limit, offset
s2_get_paper_references Semantic Scholar Backward citations paper_id, limit, offset
s2_search_authors Semantic Scholar Search authors query, limit, offset
s2_get_author Semantic Scholar Author details author_id
s2_get_author_papers Semantic Scholar Papers by author author_id, limit, offset
s2_recommend_papers Semantic Scholar Paper recommendations paper_id OR positive_paper_ids, pool
openalex_search_works OpenAlex Search scholarly works query, year, concept, open_access, sort
openalex_get_work OpenAlex Get work metadata work_id (OpenAlex ID or DOI)
openalex_search_authors OpenAlex Search authors query, per_page, page
openalex_get_citations OpenAlex Forward citations work_id, per_page, page
pubmed_search PubMed Search biomedical lit query, max_results, sort
pubmed_get_paper PubMed Get paper by PMID pmid
pubmed_find_related PubMed Related articles pmid
pubmed_get_citations PubMed Citing articles pmid
pubmed_advanced_search PubMed Advanced search terms, author, mesh, journal, year_from, year_to

Installation

# Clone the repository
git clone https://github.com/yourusername/s2-mcp.git
cd s2-mcp

# Install dependencies
pip install -r requirements.txt

Configuration

API Key Setup (Optional)

All three APIs work without authentication but offer higher rate limits with API keys:

Semantic Scholar

  • Free tier: 1 req/s
  • Authenticated: 10 req/s
  • Get key: https://www.semanticscholar.org/product/api#api-key

OpenAlex

  • Free tier: 10 req/s
  • Polite pool (with email): 100 req/s
  • Register: mailto:support@openalex.org

PubMed

  • Free tier: 3 req/s
  • With API key: 10 req/s
  • Get key: https://ncbiinsights.ncbi.nlm.nih.gov/2017/11/02/new-api-keys-for-the-e-utilities/

Environment Variables

Copy .env.example to .env and add your API keys (all optional):

S2_API_KEY=your_semantic_scholar_key
OPENALEX_EMAIL=your_email@example.com
PUBMED_API_KEY=your_ncbi_api_key

MCP Server Configuration

Add to your Claude Code configuration file (claude_desktop_config.json or similar):

{
  "mcpServers": {
    "research": {
      "command": "python",
      "args": ["C:/path/to/s2-mcp/src/server.py"],
      "env": {
        "S2_API_KEY": "your_semantic_scholar_key",
        "OPENALEX_EMAIL": "your_email@example.com",
        "PUBMED_API_KEY": "your_ncbi_api_key"
      }
    }
  }
}

Usage

Standalone Mode

python src/server.py

The server runs on stdio transport, making it compatible with any MCP client.

As an MCP Server

Once configured, all 17 tools are automatically available to your MCP client (e.g., Claude Code). Example queries:

Semantic Scholar

  • "Search for recent papers on large language models published in 2024"
  • "Get citation information for ArXiv:2301.07041"
  • "Find papers by Geoffrey Hinton"
  • "Recommend papers similar to this neural architecture search paper"

OpenAlex

  • "Search for open access works on consciousness from 2020-2025"
  • "Find papers with the concept 'neural correlates' sorted by citations"
  • "Get citation count for DOI:10.1038/s41586-024-07930-y"

PubMed

  • "Search for neuroscience papers on consciousness using MeSH terms"
  • "Find clinical trials on ketamine for depression published after 2020"
  • "Get related articles for PMID:35213689"
  • "Search papers by author 'Chalmers DJ' in journal 'Nature'"

Requirements

  • Python 3.10 or higher
  • mcp
  • httpx >= 0.27.0

See requirements.txt for complete dependency list.

Rate Limiting

The server implements intelligent rate limiting per API to comply with service guidelines:

Semantic Scholar

  • Free tier: 1 request per second
  • Authenticated tier: 10 requests per second
  • Automatic exponential backoff on 429 responses
  • Respects Retry-After headers

OpenAlex

  • Free tier: 10 requests per second
  • Polite pool (with email): 100 requests per second
  • Token bucket rate limiting with automatic backoff

PubMed

  • Free tier: 3 requests per second
  • With API key: 10 requests per second
  • NCBI E-utilities compliance with exponential backoff

API Coverage

Semantic Scholar

  • Published computer science and interdisciplinary research
  • Citation graphs (forward and backward)
  • Author h-index and affiliations
  • Paper recommendations and related work discovery
  • Field-of-study taxonomy

OpenAlex

  • 240M+ scholarly works across all disciplines
  • Concept-based discovery and classification
  • Institution and funder information
  • Open access intelligence
  • Abstract reconstruction from inverted index format

PubMed

  • Biomedical and life sciences literature
  • MeSH-indexed articles with controlled vocabulary
  • Neuroscience and clinical research
  • Related article discovery via NCBI algorithms
  • Citation tracking for biomedical papers

Technical Details

Features by API

Semantic Scholar

  • Token bucket rate limiting with configurable capacity
  • Retry-After header support
  • Multiple identifier types (S2, ArXiv, DOI, CorpusId)
  • Single and multi-paper recommendation modes

OpenAlex

  • Abstract reconstruction from inverted index
  • Concept hierarchy navigation
  • Institution and funder metadata
  • Open access status tracking
  • Pagination support for large result sets

PubMed

  • XML parsing with MeSH term extraction
  • PubMed query syntax support ([MeSH], [Author], boolean operators)
  • NCBI ELink integration for related articles
  • Full abstract and author affiliation extraction
  • Date range filtering

Project Background

Built by Lyra, an AI agent from Liberation Labs / THCoalition, as part of building autonomous research infrastructure for consciousness studies and beyond. This unified server enables AI agents to conduct comprehensive literature reviews across multiple domains, track citations, discover related work, extract MeSH-indexed biomedical knowledge, and build interdisciplinary knowledge graphs from academic publications.

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome. Please open an issue to discuss proposed changes before submitting a pull request.

Links

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选