Skip to main content
Glama
cktbarking

semantic-scholar-mcp

by cktbarking

Semantic Scholar MCP Server

一个基于FastMCP框架的Semantic Scholar学术搜索引擎工具,可以搜索学术论文并下载PDF文件。支持通过MCP协议与各种AI助手集成。

GitHub仓库: https://github.com/cktbarking/semanticMCP.git

功能特性

  1. 🔍 学术论文搜索 - 搜索Semantic Scholar数据库

  2. 📄 PDF下载 - 自动识别出版社并下载论文PDF

  3. 🔗 DOI解析 - 支持通过DOI获取论文信息

  4. 🏢 多出版社支持 - 支持IEEE、ACM、Elsevier、Springer、arXiv等

  5. 🛠️ MCP协议 - 兼容Model Context Protocol

Related MCP server: paper-search

快速开始

使用uvx运行(推荐)

# 从GitHub仓库安装并运行MCP服务器
uvx --from git+https://github.com/cktbarking/semanticMCP.git semantic-scholar-mcp --transport stdio

# 或者使用简写方式
uvx cktbarking/semanticMCP --transport stdio

# 或者指定版本
uvx semantic-scholar-mcp@latest --transport stdio

本地开发

# 克隆项目
git clone https://github.com/cktbarking/semanticMCP.git
cd semanticMCP

# 安装依赖
uv sync

# 运行服务器
uv run semantic-scholar-mcp --transport stdio

传统方式

# 安装依赖
pip install -r requirements.txt

# 运行服务
python main.py

MCP工具

1. search_papers - 搜索论文

搜索Semantic Scholar数据库中的学术论文。

参数:

  • query (str, 必需): 搜索查询字符串

  • limit (int, 可选): 返回结果数量,默认5,最大100

返回: 包含论文标题、作者、摘要、年份、引用次数、DOI、PDF链接等信息的列表。

2. download_paper - 下载论文PDF

根据DOI下载论文PDF文件,自动识别出版社。

参数:

  • doi (str, 必需): 论文的DOI标识符

  • output_dir (str, 可选): PDF输出目录,默认"./pdfs"

支持的出版社:

  • IEEE (10.1109/*)

  • ACM (10.1145/*)

  • Elsevier (10.1016/*)

  • Springer (10.1007/*)

  • arXiv (10.48550/arXiv.*)

返回: 下载结果信息,包括成功状态、文件路径、出版社等。

响应格式

搜索响应示例

{
  "success": true,
  "query": "machine learning",
  "count": 5,
  "results": [
    {
      "title": "Deep Learning for Computer Vision",
      "authors": "John Doe, Jane Smith",
      "abstract": "This paper presents...",
      "year": 2023,
      "citation_count": 150,
      "article_url": "https://...",
      "pdf_url": "https://...",
      "doi": "10.1109/...",
      "doi_link": "https://doi.org/10.1109/..."
    }
  ]
}

下载响应示例

{
  "success": true,
  "message": "PDF下载成功",
  "file_path": "./pdfs/10.1109_example.pdf",
  "doi": "10.1109/example",
  "publisher": "ieee"
}

配置MCP客户端

Claude Desktop配置

在Claude Desktop的配置文件中添加:

{
  "mcpServers": {
    "semantic-scholar": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/cktbarking/semanticMCP.git", "semantic-scholar-mcp", "--transport", "stdio"]
    }
  }
}

其他MCP客户端

支持任何兼容MCP协议的客户端,只需配置命令为:

uvx semantic-scholar-mcp --transport stdio

开发说明

项目结构

semantic-scholar-mcp/
├── main.py                 # MCP服务器主文件
├── publishers/             # 出版社下载器
│   ├── ieee_downloader.py
│   ├── acm_downloader.py
│   ├── elsevier_downloader.py
│   ├── springer_downloader.py
│   ├── arxiv_downloader.py
│   └── generic_downloader.py
├── pyproject.toml          # 项目配置
├── requirements.txt        # 依赖列表
└── README.md              # 说明文档

添加新的出版社支持

  1. publishers/目录下创建新的下载器文件

  2. 实现下载函数,接受doi, doi_link, output_dir参数

  3. publishers_dict.pyPUBLISHER_DICT字典中添加DOI前缀到出版社的映射

  4. download_paper_by_doi()函数中添加对应的处理分支

注意事项

  1. API限制 - Semantic Scholar API有调用频率限制,请合理使用

  2. 版权合规 - 下载的PDF文件仅供个人学术研究使用

  3. 网络要求 - 某些出版社可能需要机构访问权限,请合理使用。

  4. Python版本 - 需要Python 3.10或更高版本

许可证

GNU General Public License v3.0 - 详见LICENSE文件

贡献

欢迎提交Issue和Pull Request来改进这个项目!

致谢

  • Semantic Scholar 提供优秀的学术搜索API

  • FastMCP 简化MCP服务器开发

  • 各大学术出版社提供的研究资源

Available Tools

2 tools
download_paperA

根据DOI下载论文PDF

:param doi: 论文的DOI标识符 :param output_dir: PDF输出目录(可选) :return: 下载结果信息

ParametersJSON Schema
NameRequiredDescriptionDefault
doiYes
output_dirNo./pdfs

TDQS

A3.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the full burden. It discloses that the tool saves to an output directory and returns download result info, but it does not mention potential issues such as access restrictions, network requirements, file overwrite behavior, or failure handling. This is insufficient for a file-downloading tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded with the core purpose. It includes parameter and return documentation without any fluff or repetition. Every sentence contributes useful information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with two parameters and no output schema, the description covers the purpose, parameters, and return value. It lacks explicit error-handling or edge-case context, but given the tool's simplicity, it is reasonably complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description explicitly explains both parameters: doi is the paper's DOI identifier, and output_dir is the optional PDF output directory. This adds meaningful context beyond the schema, which only provides titles and defaults. The schema description coverage is 0%, but the description fully compensates.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's action: download a paper's PDF based on DOI. It uses a specific verb (download) and resource (paper PDF), and distinguishes itself from the sibling tool search_papers by focusing on downloading rather than searching.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is used when you have a DOI and want the PDF, but it does not explicitly mention when to use it versus alternatives, nor does it provide any exclusions or prerequisites. There is no comparison with the sibling tool search_papers.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_papersA

搜索学术论文 :param query: 搜索查询字符串 :param limit: 返回结果数量(默认5,最大100)

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It only repeats the parameter info from the schema and states the core function, adding no behavioral details such as what is returned, whether the operation is read-only, or any side effects. This is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, with the main purpose in one short sentence followed by clear parameter documentation. It is front-loaded and contains no unnecessary words or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of an output schema, the description should explain what the tool returns or other search behavior. It does not mention return format, pagination, or search syntax. The description covers only the basic function and parameters, leaving the agent guessing about the tool's full behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It does so effectively by explaining both parameters: 'query' is the search query string, and 'limit' is the number of results with default and max values. This adds meaning beyond the schema's type/default information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action with a specific verb and resource: '搜索学术论文' (search academic papers). This distinguishes it from the only sibling tool, download_paper, which has a different purpose. The tool name also aligns with the description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like download_paper. It does not mention use cases, prerequisites, or exclusions. The only context is the purpose statement itself.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv0.1.0
    • First observeddownload_paper
    • First observedsearch_papers

TDQS

A3.6/5.0
Disambiguation5/5

The two tools have completely distinct purposes: one searches for academic papers, the other downloads a PDF by DOI. There is no overlap or ambiguity between them.

Naming Consistency5/5

Both tool names follow the verb_noun pattern (search_papers, download_paper), which is consistent, predictable, and easy to understand.

Tool Count2/5

With only 2 tools, the server feels significantly under-scoped for a service like Semantic Scholar. A typical integration would include many more capabilities, such as retrieving paper metadata, authors, citations, and recommendations, making this count too low for the domain.

Completeness2/5

The tool surface covers only search and PDF download by DOI. Major functionalities like fetching paper details by ID, exploring citations/references, and author information are missing, leaving obvious gaps that could cause agent failures.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables retrieval of academic paper metadata, PDFs, full text, citations, and references by title via Semantic Scholar, arXiv, and other sources.
    6
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables searching, downloading, and exporting academic papers from 20+ scholarly sources including arXiv, PubMed, and Semantic Scholar. Supports multi-source concurrent search, citation network tracing, and export to CSV, RIS, and BibTeX.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables searching and retrieving academic paper metadata from Semantic Scholar, including paper details, citations, and author information.
    21
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables searching academic literature via Semantic Scholar with relevance filters, batch metadata retrieval, and citation-graph recommendations.
    5
    AGPL 3.0

Latest Blog Posts

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/cktbarking/semanticMCP'

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