文献搜索工具

提供基于INSPIRE-HEP的文献搜索服务,支持按标题、全文和作者进行检索,并优化返回结果以减少上下文消耗。

  • by hajifkd
  • Python
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 hajifkd/inspirehep-mcp

使用说明

inspirehep mcp

INSPIRE-hp(https://inspirehep.net)的文献检索,Python制的MCP服务器。

特性

  • inspirehep_search_by_title:在标题字符串中查找论文
  • inspirehep_search_by_fulltext:使用正文关键字查找论文
  • inspirehep_search_by_author:以作者姓名搜索论文
  • 默认情况下,这两种工具都不包括大型协作论文(large_collaboration=false)
  • 最小化返回项以减少上下文消耗
    • title
    • authors
    • abstract
    • year
    • citation_count
    • arxiv_url (仅当存在时)

设置

uv sync

运行(stdio MCP服务器)

uv run inspirehep-mcp

或

uvx --from git+https://github.com/hajifkd/inspirehep-mcp inspirehep-mcp

使用MCP检查器运行

npx -y @modelcontextprotocol/inspector uv run inspirehep-mcp

可以在浏览器中打开终端上显示的URL进行测试。

工具输入

共通:

  • large_collaboration (默认值: false)
  • sort_by_citation (默认值: true)
    • true:citation数顺
    • false:日期的新顺序
  • year (可选,例: 2020)
  • limit (默认值: 20)

标题搜索:

  • title (必填)

本文検索:

  • fulltext (必填)

著者検索:

  • author (required, string配列)

测试

uv run pytest