pubmed-search-mcp
PubMed Search MCP
面向 AI 代理的专业文献研究助手 - 不仅仅是 API 封装
一个基于领域驱动设计(DDD)的 MCP 服务器,作为 AI 代理的智能研究助手,提供面向任务的文献检索与分析能力。
✨ 包含内容:
🔧 45 个 MCP 工具 - 精简的 PubMed、Europe PMC、CORE、NCBI 数据库访问,以及 研究编年史 / 上下文图谱
🛡️ 多代理服务模式 - 一次部署,服务多个代理:按租户的会话、缓存和工件,Bearer 令牌认证,以及按租户的公平份额限制。参见 DEPLOYMENT.md
🖼️ OA 图表提取 - 从 PMC 开放获取文章中提取图表标题、直接图片 URL 和 PDF 链接
📘 文档站点 - 浏览完整的支持语言切换的手册:用户工作流、架构、45 个工具参考、管道教程、源/代理契约、集成与运维、安全以及部署,位于 u9401066.github.io/pubmed-search-mcp
📖 GitHub Wiki - 相同权威文档的 GitHub 原生镜像,位于 github.com/u9401066/pubmed-search-mcp/wiki
📚 26 个 Claude 技能 - 即用型 AI 代理工作流指南(特定于 Claude Code)
📖 Copilot 说明 - VS Code GitHub Copilot 集成指南
🌐 语言:English | 繁體中文
📘 文档地图:README 是快速项目入口。如需最佳阅读体验,请使用文档站点,如需 GitHub 原生导航,请使用 GitHub Wiki,编辑请查看源文档:用户指南 | 高级研究工作流 | 能力优先指南 | 提供商数据平面 | BioMCP 架构分析 | 开发者指南 | 完整索引
🚀 快速安装
先决条件
Python 3.10+ — 下载
uv(推荐)— 安装 uv
# macOS / Linux curl -LsSf https://astral.sh/uv/install.sh | sh # Windows powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"NCBI 邮箱 — NCBI API 政策要求提供。任何有效的电子邮件地址均可。
NCBI API 密钥 (可选) — 在此获取以获得更高的速率限制(10 请求/秒 vs 3 请求/秒)
OpenAlex API 密钥 (可选) — 设置
OPENALEX_API_KEY以使用经过认证的信用配额;未设置时,请求将使用 OpenAlex 当前的匿名临时使用预算。mailto是联系元数据,不是身份验证。如果没有特定于来源的电子邮件,服务器将复用配置的运行时联系电子邮件,用于 OpenAlex、CrossRef 和 Unpaywall。
安装与运行
# Option 1: Zero-install with uvx (recommended for trying out)
uvx pubmed-search-mcp
# Option 2: Add as project dependency
uv add pubmed-search-mcp
# Option 3: pip install
pip install pubmed-search-mcpPython SDK 门面
对于进程内 Python 集成,请使用稳定的 SDK 门面,而不是从 MCP 工具模块导入:
from pubmed_search.api import PubMedSearchClient, PubMedSearchConfig
client = PubMedSearchClient(PubMedSearchConfig(email="your@email.com"))
result = await client.unified_search("remimazolam ICU sedation", limit=20)
print(result.articles)
print(result.source_counts)
print(result.artifact) # artifact locator when persistence is enabled使用 uvx pubmed-search-mcp 或 /mcp 进行代理工具发现。对于 Python 包/笔记本调用,如果类型化对象比解析 MCP 响应字符串更容易,请使用 SDK。
选择运行时契约
契约 | 命令 | 网络与信任边界 |
本地 stdio |
| 建议用于单个本地 AI 客户端;不监听 MCP 端口 |
本地环回 HTTP |
| 受信任的单用户集成;MCP 请求共享持久的 |
多用户服务 |
| 在 HTTPS 后面的远程/团队使用;必须使用 bearer 认证、允许的主机/来源以及按主体存储 |
本地和服务部署是刻意分开的契约。不要仅通过更改绑定地址就将本地 HTTP 命令变成公共服务。显式本地配置在持久的 default 租户中跨 MCP 请求和重连保留 pmids="last"、会话、缓存和导出;这仅在强制的环回/主机/来源边界内才是安全的。服务模式绝不继承这种信任:如果没有 bearer 主体,它将安全失败。服务环境和 Compose 配置请使用 DEPLOYMENT.md。当前服务配置支持在一个服务器进程中包含多个经过身份验证的主体;在会话、锁、工件和订阅拥有共享后端之前,请保持一个副本。
协议基线是 MCP SDK v2(mcp>=2.0,<3)。现代的 2026-07-28 客户端直接发送 tools/list 和 tools/call,无需 initialize 握手或 Mcp-Session-Id。本地模式保留文件系统功能。经过身份验证的服务调用方无法加载 file: 管道、选择笔记 output_dir/template_file,或继承进程级管道工作区;服务 Compose 调度器已禁用。有关能力矩阵,请参阅 集成与运维指南。
Related MCP server: ScholarMCP
⚙️ 配置
此 MCP 服务器适用于任何兼容 MCP 的 AI 工具。选择你喜欢的客户端:
VS Code / Cursor (.vscode/mcp.json)
{
"servers": {
"pubmed-search": {
"type": "stdio",
"command": "uvx",
"args": ["pubmed-search-mcp"],
"env": {
"NCBI_EMAIL": "your@email.com"
}
}
}
}可选:启用一次浏览器会话 PDF 回退,让工具自动使用它:
{
"servers": {
"pubmed-search": {
"type": "stdio",
"command": "uvx",
"args": ["pubmed-search-mcp"],
"env": {
"NCBI_EMAIL": "your@email.com",
"BROWSER_FETCH_CONFIG": "{\"enabled\":true,\"auto_enabled\":true,\"broker_url\":\"http://127.0.0.1:8766/fetch\",\"token\":\"<random-32-byte-token>\",\"allowed_hosts\":[\"jamanetwork.com\",\"*.jamanetwork.com\",\"nejm.org\",\"*.nejm.org\"]}"
}
}
}
}使用此设置后,get_fulltext 将自动尝试使用本地代理来访问机构或出版商登录页。仅当你希望针对特定调用禁止它时,才传递 allow_browser_session=false。
运行带下载拦截的本地代理:
uv sync --extra browser-broker
uv run playwright install chromium
uv run python -c "import secrets; print(secrets.token_urlsafe(32))"
uv run pubmed-browser-fetch-broker --token "<same-random-32-byte-token>"将生成的值复制到两个命令/配置中;切勿重复使用已发布的示例令牌。如果省略 --token,代理将生成并打印一个高熵运行时令牌。代理会启动一个启用了下载拦截的持久浏览器配置文件。在该代理控制的浏览器窗口中登录一次,后续 PDF 下载将被自动捕获,无需原生“另存为”对话框。
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"pubmed-search": {
"command": "uvx",
"args": ["pubmed-search-mcp"],
"env": {
"NCBI_EMAIL": "your@email.com"
}
}
}
}配置文件位置:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Claude Code
claude mcp add pubmed-search -- uvx pubmed-search-mcp或者添加到项目根目录下的 .mcp.json 中:
{
"mcpServers": {
"pubmed-search": {
"command": "uvx",
"args": ["pubmed-search-mcp"],
"env": {
"NCBI_EMAIL": "your@email.com"
}
}
}
}Zed AI (settings.json)
Zed 编辑器(z.ai)原生支持 MCP 服务器。添加到你的 Zed settings.json 中:
{
"context_servers": {
"pubmed-search": {
"command": "uvx",
"args": ["pubmed-search-mcp"],
"env": {
"NCBI_EMAIL": "your@email.com"
}
}
}
}提示:打开命令面板 →
zed: open settings进行编辑,或转到代理面板 → 设置 → “添加自定义服务器”。
OpenClaw 🦞 (~/.openclaw/openclaw.json)
OpenClaw 通过 mcp-adapter 插件 使用 MCP 服务器。先安装适配器:
openclaw plugins install mcp-adapter然后添加到 ~/.openclaw/openclaw.json:
{
"plugins": {
"entries": {
"mcp-adapter": {
"enabled": true,
"config": {
"servers": [
{
"name": "pubmed-search",
"transport": "stdio",
"command": "uvx",
"args": ["pubmed-search-mcp"],
"env": {
"NCBI_EMAIL": "your@email.com"
}
}
]
}
}
}
}
}配置后重启网关:
openclaw gateway restart
openclaw plugins list # Should show: mcp-adapter | loadedCline (cline_mcp_settings.json)
{
"mcpServers": {
"pubmed-search": {
"command": "uvx",
"args": ["pubmed-search-mcp"],
"env": {
"NCBI_EMAIL": "your@email.com",
"S2_API_KEY": "your_semantic_scholar_key",
"PUBMED_SEARCH_DISABLED_SOURCES": ""
},
"alwaysAllow": [],
"disabled": false
}
}
}其他 MCP 客户端
任何兼容 MCP 的客户端都可以通过 stdio 传输使用此服务器:
# Command
uvx pubmed-search-mcp
# With environment variable
NCBI_EMAIL=your@email.com uvx pubmed-search-mcp注意:
NCBI_EMAIL是 NCBI API 政策所要求的。可选设置NCBI_API_KEY以获得更高的速率限制(10 请求/秒 vs 3 请求/秒)。 📖 详细集成指南:有关所有环境变量、Copilot Studio 设置、Docker 部署、代理配置和故障排除,请参阅 docs/INTEGRATIONS.md。
🎯 设计理念
核心定位:AI 代理与学术搜索引擎之间的智能中间件。
为什么选择此服务器?
其他工具只给你原始 API 访问。我们为你提供词汇翻译 + 智能路由 + 研究分析:
挑战 | 我们的解决方案 |
代理使用 ICD 编码,PubMed 需要 MeSH | ✅ 自动 ICD→MeSH 转换 |
多个数据库,不同的 API | ✅ 统一搜索 单一入口 |
临床问题需要结构化搜索 | ✅ PICO 交接 + 管道( |
医学术语中的拼写错误 | ✅ ESpell 自动纠正 |
单一来源结果过多 | ✅ 并行多源 并去重 |
需要追踪研究演变 | ✅ 研究编年史与树,支持里程碑检测、诊断、子主题分支和版本化修订 |
引文上下文不清晰 | ✅ 引文树 前向/后向/网络 |
无法访问全文 | ✅ 多源全文(Europe PMC XML、Unpaywall OA 位置、机构直连/EZproxy、CORE 和下载器回退) |
基因/药物信息分散在多个数据库 | ✅ NCBI 扩展(Gene、PubChem、ClinVar) |
需要前沿预印本 | ✅ 预印本搜索(arXiv、medRxiv、bioRxiv),带同行评审过滤 |
导出到参考文献管理器 | ✅ 一键导出(官方 RIS/MEDLINE/CSL JSON;本地 RIS/BibTeX/CSV/MEDLINE/JSON) |
主要差异化优势
词汇翻译层 - 智能体自然表达,我们将其翻译为每个数据库的术语(MeSH、ICD-10、文本挖掘实体)
统一搜索网关 - 一次
unified_search()调用,跨 PubMed、Europe PMC、CORE、OpenAlex、Semantic Scholar 以及已启用的预印本/商业来源进行能力感知调度PICO 交接 + 流水线 - 智能体提取 P/I/C/O,
parse_pico()验证该结构化交接,后端template: pico流水线执行 O 感知的精确率/召回率搜索研究编年史与谱系树 - 通过策略驱动启发式方法检测里程碑,利用多信号评分识别里程碑论文,呈现诊断信息,持久化可 diff 的版本化修订,并按子主题以分支树形式可视化研究演变
引文网络分析 - 构建多级引文树,从单篇论文出发绘制整个研究全景
完整研究生命周期 - 从搜索 → 发现 → 全文 → 分析 → 导出,全部在一个服务器内
智能体优先设计 - 输出针对机器决策优化,而非人类阅读
📡 外部 API 与数据源
此 MCP 服务器集成了多个学术数据库和 API:
核心数据源
来源 | 覆盖范围 | 词汇 | 自动转换 | 描述 |
NCBI PubMed | 3600 万+ 篇文献 | MeSH | ✅ 原生 | 生物医学主要文献 |
NCBI Entrez | 多数据库 | MeSH | ✅ 原生 | Gene、PubChem、ClinVar |
Europe PMC | 3300 万+ | 文本挖掘 | ✅ 提取 | 全文 XML 访问 |
CORE | 2 亿+ | 无 | ➡️ 自由文本 | 开放获取聚合器 |
Semantic Scholar | 不断演进的图谱 + 操作符数据集 | S2 字段 / 批量语法 | ✅ 代理编译模式 | 相关性、有界批量、批次、引文图谱以及仅元数据的发布/差异平面;无分区下载 |
OpenAlex | 不断演进的开放研究图谱 | 主题/关键词 | ✅ 关键词 + 有界原生语义 | 游标、成本来源、实体图谱以及声明的操作符快照路径;尚无本地索引 |
NIH iCite | PubMed | N/A | N/A | 引文指标(RCR) |
🔑 说明:✅ = 完整词汇支持 | ➡️ = 查询直通(无受控词汇)
ICD 代码:在 PubMed 搜索之前自动检测并转换为 MeSH
环境变量
# Required
NCBI_EMAIL=your@email.com # Required by NCBI policy
# Optional - For higher rate limits
NCBI_API_KEY=your_ncbi_api_key # Get from: https://www.ncbi.nlm.nih.gov/account/settings/
CORE_API_KEY=your_core_api_key # Get from: https://core.ac.uk/services/api
CROSSREF_EMAIL=your@email.com # Optional override; defaults to server/NCBI email
UNPAYWALL_EMAIL=your@email.com # Optional override; defaults to server/NCBI email
S2_API_KEY=your_s2_api_key # Alias: SEMANTIC_SCHOLAR_API_KEY
OPENALEX_API_KEY=your_openalex_key # Raises the OpenAlex credit budget; actual grant is response-driven
PUBMED_SEARCH_DISABLED_SOURCES= # Example: semantic_scholar
# Optional - Network settings
HTTP_PROXY=http://proxy:8080 # HTTP proxy for API requests
HTTPS_PROXY=https://proxy:8080 # HTTPS proxy for API requests
# Optional - Institutional fulltext access
INSTITUTIONAL_DIRECT_FETCH=true # Try DOI publisher pages before CORE fallback
EZPROXY_ENABLED=false # Enable only after configuring EZPROXY_HOST + cookie
EZPROXY_HOST=ezproxy.example.edu
EZPROXY_COOKIE_FILE=/path/to/cookies.json
# Optional - Local note export
PUBMED_NOTES_DIR=/path/to/wiki/references # save_literature_notes target folder
PUBMED_WORKSPACE_DIR=/path/to/project # fallback: references/ under this workspace
PUBMED_DATA_DIR=~/.pubmed-search-mcp # fallback: references/ under this data dirCrossRef 和 Unpaywall 复用运行时服务器的联系邮箱(NCBI_EMAIL、
CLI --email,或检测到的 git 邮箱),除非配置了特定于来源的邮箱。
OpenAlex 接受偶尔的匿名使用和可选的 API 密钥;代理读取其响应额度/速率元数据,
而不是假设永久的“礼貌池”配额。
本地笔记导出按以下顺序解析目录:output_dir 参数、PUBMED_NOTES_DIR、
PUBMED_WORKSPACE_DIR/references、PUBMED_DATA_DIR/references,然后是
~/.pubmed-search-mcp/references。
此路径/模板选择仅适用于可信本地模式。经过身份验证的服务笔记始终使用当前租户隔离的
references/ 目录下方的内置格式。
为兼容 LLM wiki,wiki 和 foam 导出使用基于 PMID、DOI、PMCID 或回退标识符的稳定链接目标;
标题仍为别名/显示标签,响应中包含 wiki_validation 以检查未解析的 wikilink。
🔄 工作原理:中间件架构
┌─────────────────────────────────────────────────────────────────────────────┐
│ AI AGENT │
│ │
│ "Find papers about I10 hypertension treatment in diabetic patients" │
│ │
└─────────────────────────────────┬───────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ 🔄 PUBMED SEARCH MCP (MIDDLEWARE) │
│ ┌─────────────────────────────────────────────────────────────────────────┐│
│ │ 1️⃣ VOCABULARY TRANSLATION ││
│ │ • ICD-10 "I10" → MeSH "Hypertension" ││
│ │ • "diabetic" → MeSH "Diabetes Mellitus" ││
│ │ • ESpell: "hypertention" → "hypertension" ││
│ └─────────────────────────────────────────────────────────────────────────┘│
│ ┌─────────────────────────────────────────────────────────────────────────┐│
│ │ 2️⃣ INTELLIGENT ROUTING ││
│ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ││
│ │ │ PubMed │ │Europe PMC│ │ CORE │ │ OpenAlex │ ││
│ │ │ 36M+ │ │ 33M+ │ │ 200M+ │ │ 250M+ │ ││
│ │ │ (MeSH) │ │(fulltext)│ │ (OA) │ │(metadata)│ ││
│ │ └────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘ ││
│ │ └──────────────┴──────────────┴──────────────┘ ││
│ │ ▼ ││
│ │ 3️⃣ RESULT AGGREGATION: Dedupe + Rank + Enrich ││
│ └─────────────────────────────────────────────────────────────────────────┘│
└─────────────────────────────────┬───────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────────┐
│ UNIFIED RESULTS │
│ • 150 unique papers (deduplicated from 4 sources) │
│ • Ranked by relevance + citation impact (RCR) │
│ • Full text links enriched from Europe PMC │
└─────────────────────────────────────────────────────────────────────────────┘🛠️ MCP 工具概览
如果你想将工具表面理解为一个可用的系统,不要从记住 45 个工具名称开始。
从 工具使用指南 开始:它将当前 45 个工具压缩为 8 个能力族, 解释理论下界,并为人类和智能体提供基于意图的路由。
🔍 搜索与查询智能
┌─────────────────────────────────────────────────────────────────┐
│ SEARCH ENTRY POINT │
├─────────────────────────────────────────────────────────────────┤
│ │
│ unified_search() ← 🌟 Single entry for all sources │
│ │ │
│ ├── Quick search → Direct multi-source query │
│ ├── Native semantic → Bounded OpenAlex semantic mode │
│ ├── Systematic → Bounded provider bulk/cursor mode │
│ ├── PICO hints → Detects comparison, shows P/I/C/O │
│ └── ICD expansion → Auto ICD→MeSH conversion │
│ │
│ Sources: PubMed · Europe PMC · CORE · OpenAlex · S2 │
│ Auto: Deduplicate → Rank → Enrich full-text links │
│ │
├─────────────────────────────────────────────────────────────────┤
│ QUERY INTELLIGENCE │
│ │
│ generate_search_queries() → MeSH expansion + synonym discovery │
│ parse_pico() → Agent-provided PICO handoff │
│ analyze_search_query() → Query analysis without execution │
│ │
└─────────────────────────────────────────────────────────────────┘一个搜索入口,三种检索策略
通用文献发现特意只通过一个 MCP 工具暴露:unified_search。特定提供商的 API 仍为内部代理能力:
# Default relevance/keyword routing across enabled sources
unified_search(query="treatment resistance")
# OpenAlex native semantic search (provider maximum 50 results)
unified_search(
query="mechanisms of treatment resistance",
sources="openalex",
options="native_semantic",
)
# Deterministic/bounded retrieval: OpenAlex cursor and S2 bulk where selected
unified_search(
query="melanoma AND immunotherapy",
sources="pubmed,openalex,semantic_scholar",
options="systematic",
)native_semantic 和 systematic 互斥,并禁用多策略深度搜索扩展。当请求的检索模式不受支持时,
显式来源选择会在网络调用之前失败;自动来源选择仅保留有能力的提供商。limit 每个来源最多为 100,
因此 systematic 意味着确定性、有界执行的提供商执行——而不是穷尽式系统综述保证。结构化输出和工件记录
retrieval_mode 以及每个来源的 source_metadata(请求/提供商模式、规范或编译查询、连续性可用性、
成本/速率元数据,以及可用时的警告)。
公共请求边界是失败关闭的。limit 必须是 1 到 100 之间的整数;未知或格式错误的 filters / options、
颠倒或超出范围的年份,以及不支持的排序或输出模式会在提供商 I/O 之前返回验证错误。在默认深度搜索策略中,
limit 是每个来源的总预算,分配给该来源的查询策略——而不是每个策略都有 limit 条结果。策略调用
使用有界的全局/每个来源并发和超时,当另一个来源超时、被限速或失败时,成功的来源仍然可用。
在本版本中,Europe PMC、Scopus 和 Web of Science 仍仅支持关键词;对这些来源的显式系统请求会在 I/O 之前失败, 而不是将单个页面错误标记为系统覆盖。
参见 来源契约、Semantic Scholar 和 OpenAlex 了解提供商限制和操作符数据平面边界。
🔬 发现工具(找到关键论文后)
Found important paper (PMID)
│
┌───────────────────────┼───────────────────────┐
│ │ │
▼ ▼ ▼
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ BACKWARD │ │ SIMILAR │ │ FORWARD │
│ ◀────── │ │ ≈≈≈≈≈≈ │ │ ──────▶ │
│ │ │ │ │ │
│ get_article │ │find_related │ │find_citing │
│ _references │ │ _articles │ │ _articles │
│ │ │ │ │ │
│ Foundation │ │ Similar │ │ Follow-up │
│ papers │ │ topic │ │ research │
└─────────────┘ └─────────────┘ └─────────────┘
fetch_article_details() → Detailed article metadata
get_citation_metrics() → iCite RCR, citation percentile
build_citation_tree() → Full network visualization (6 formats)
📚 全文、图表提取与导出
类别 | 工具 |
全文 |
|
图表 |
|
图表感知全文 |
|
文本挖掘 |
|
导出 |
|
🖼️ OA 图表优先探索
当智能体需要证据图表而不仅仅是文章文本时,使用 PMC 开放获取路径:
get_article_figures(identifier="PMC12086443")→ 图表标签、说明、图片 URL 和 PDF/文章链接get_fulltext(pmcid="PMC7096777", include_figures=True)→ 带有内嵌图表的结构化全文图表输出保留文章上下文,因此智能体可以将每个图表连接回其被提及的章节
🧬 NCBI 扩展数据库
工具 | 描述 |
| 搜索 NCBI Gene 数据库 |
| 按 NCBI Gene ID 获取基因详情 |
| 链接到某个基因的 PubMed 文章 |
| 搜索 PubChem 化合物 |
| 按 PubChem CID 获取化合物详情 |
| 链接到某个化合物的 PubMed 文章 |
| 搜索 ClinVar 临床变异 |
🕰️ 研究编年史与谱系树
工具 | 描述 |
| 构建持久化、带版本控制的编年史并检测里程碑。输出:summary、chronicle_map、timeline、tree、graph、evidence、milestones、mermaid、timeline_mermaid、mindmap、narrative、json |
| 加载、列出、比较修订差异、带引文叙述、分析里程碑分布,或比较最多五个主题 |
mermaid 是规范的综合视图:一个水平年份主干,每条观察到的研究线在其最早的论文处分支,在检索范围内。
这是一种可解释的分组,而非因果谱系或对该领域真正第一篇论文的断言。谱系偏好多个论文共有的 MeSH 描述符和作者关键词;
仅有单篇或不充分的信号会触发带警告的研究阶段回退。同一年份的显示顺序是稳定的,但当出版精度无法证明时,不宣称优先顺序。
timeline_mermaid 保留了旧的扁平时间线视图。参见已实现的契约
docs/RESEARCH_CHRONICLE_REFACTOR_SPEC.md.
Chronicle Mermaid 输出由结构化节点和边构建,具有安全的标签转义、环/孤立节点修复、抗冲突 ID 和有界图大小。它会从富语法回退到安全语法再到最小语法,而不是让整个 chronicle 失败。mermaid_validation.json 记录每次更正、回退和省略的视觉项;chronicle.mmd 仍然是纯 Mermaid 源。
Chronicle 修订是不可变的,并以原子方式追加。当会话工件持久化启用时,工件失败会被显式呈现,同时保存的 Chronicle 修订仍然可用。
主题构建在有界检索前将年份限制发送给 PubMed,然后保留观察到的第一篇和最后一篇论文,同时用地标和时间分布填满上限。审计记录 PubMed 的 returned / available 计数,并在可用性未知或任何检索/选择上限使视图非穷尽时发出警告。PubMed 错误或没有文章证据的范围不会发布空修订。
显式 PMID 输入是严格的(12345678 或 PMID:12345678,正 ASCII 数字,最多 20 位);DOI 或混合文本会被拒绝而不会被强制转换。没有可靠出版日期的记录在带日期条目之后以 Undated 形式出现,并从显示的年份跨度中排除。条目 ID 在日期或分类器更正时遵循 PMID/DOI 证据身份,主题连续性使用一个 Unicode/大小写/空白规范键。多信号论文保留一个主要分支加上显式交叉链接;重叠 20% 或更多会被审计为警告。在修订差异中,缺失意味着 not_observed_in_revision / removed_from_view,而不是确定的退役。
🏥 机构访问与 ICD 转换
工具 | 描述 |
| 配置机构的链接解析器 |
| 生成 OpenURL 访问链接 |
| 列出解析器预设 |
| 测试解析器配置 |
| 诊断直接 DOI、EZproxy 和 OpenURL 交接路径 |
| 在 ICD 代码和 MeSH 术语之间转换(双向) |
| 自动检测查询中的 ICD 代码并将其扩展为 MeSH |
💾 会话管理
工具 | 描述 |
| 检索缓存的 PMID 列表 |
| 从会话缓存获取文章(无 API 成本) |
| 会话状态概览 |
| PMID、缓存文章、持久搜索运行、重放参数、历史和持久化工件的门面 |
动态 MCP 资源也可供能够直接读取资源的代理使用:
session://context— 当前会话状态session://last-search— 最新搜索元数据session://last-search/pmids— 最新 PMID 列表 + CSV 形式session://last-search/results— 最新搜索的缓存文章负载
持久化工件
当配置了会话持久化时,持久化的 MCP 输出工件会为可复用的 unified_search 和 get_fulltext 响应保存。工具响应就像索引卡:它们包含足够的计数、来源警告和工件提示,使代理能够立即回答,而完整的证据负载则保留在可重复读取的文件中。紧凑的 artifact 定位器包含 artifact_id、artifact_uri、primary_file、summary、文件清单、read_order、审计状态以及精确的 read_session(...) 检索提示。仅当本地 MCP 客户端也应直接接收 local_path 和 manifest_path 时,才设置 PUBMED_ARTIFACT_INCLUDE_LOCAL_PATHS=true。
无法读取服务器文件系统的远程客户端可以通过会话门面检索相同内容:
read_session(action="list_artifacts")
read_session(action="artifact", artifact_id="...")
read_session(action="artifact", artifact_uri="artifact://...")
read_session(action="artifact", artifact_uri="artifact://...", artifact_file="audit.json")
read_session(action="artifact", artifact_uri="artifact://...", artifact_file="query_strategy.json")
read_session(action="artifact", artifact_uri="artifact://...", artifact_file="results.json", offset=0, max_chars=200000)
read_session(action="list_artifacts", include_local_paths=true)可恢复的搜索运行
当会话管理激活时,每次 unified_search 调用都会获得一个稳定的运行 ID。这包括正常搜索、验证/规划失败,以及内联、saved:<name> 或 dry_run=true 管道执行。结构化结果和错误会附加 search_run 交接信息;Markdown 返回相同的运行 ID 作为紧凑的恢复说明。正常的文献结果信封暴露两个独立的机器契约:
search_status描述有界检索结果:state(completed、empty、partial或failed)、bounded=true、exhaustive=false、返回计数、尝试/成功/失败/可重试的来源,以及延续/未知完整性来源列表。search_run是恢复交接信息:稳定的run_id、日志状态、recoverable、精确的read_session检查/重放参数,以及在已提交工件时的工件 URI。
租户作用域的 search-run/v1 日志在提供者 I/O 或终端验证响应之前发布,并记录经过清理的请求、计划、按来源或按管道步骤的实际尝试、计数、安全失败、结果引用以及适用时的工件定位器。它达到终端 completed、partial、failed 或 cancelled 状态;有效的零结果搜索是一个 completed 运行,其 search_status.state 为 empty。重新启动时,未完成的 started / planned / running 条目会被恢复一次为 interrupted,而不是消失。非 dry-run 的已保存管道还保留其 PipelineStore 报告/运行历史;这是对调用级搜索日志的补充,而不是替代。
管道重放保留原始内联或 saved:<name> 参数以及 dry_run / stop_at。包含密钥、令牌、cookie、密码或其他凭据材料的管道文本会被拒绝并记录为失败运行;提供者凭据属于服务器环境/配置,绝不应出现在管道 YAML 或 JSON 中。
read_session(action="search_runs")
read_session(action="search_runs", run_status="partial")
read_session(action="search_run", run_id="...")
read_session(action="replay_search", run_id="...")replay_search 仅返回原始的、无凭据的 unified_search kwargs。它永远不会自动执行网络调用;代理或用户必须审查并显式提交它们。提供者游标/令牌值作为不透明来源信息保留在 source_metadata 和 query_strategy.json 中,但目前还没有公开的游标恢复参数,因此重放会启动一次新的有界搜索。
如果终端日志写入无法恢复,响应会报告 search_run.status="history_unavailable"、history_available=false、预期的终端状态以及警告。它会刻意省略检查/重放操作,因为不保证持久恢复;搜索结果本身可能仍可使用。
unified_search 工件使用研究信封。从 audit.json 开始获取来源计数和完整性警告,然后使用 query_strategy.json 获取确切执行的计划,最后使用 results.json / results.toon 获取完整文章列表。这样既保持了 MCP 响应令牌的小巧,又不丢失学术可追溯性。
工件是根据已经计算出的结果对象生成的,因此读取工件不会重新运行搜索或全文检索。
如果在工件目录被原子发布之后、会话索引更新之前发生崩溃,会话重新加载只会发现完整的、基于校验和索引的清单,并通过 search_run_id 将孤立的工件重新链接到其搜索运行(对于较旧的工件使用保守的查询匹配)。
read_session 默认对本地文件系统路径进行脱敏;local_path 和 manifest_path 是服务器本地路径,不是可移植的客户端路径。
来自 get_fulltext 的工件可能包含文章正文,包括订阅或机构访问的内容。请根据出版商、许可和机构访问条款存储和共享它们。
当工件可用时,大型 get_fulltext 响应会以内联预览形式返回;使用工件定位器检索已保存的完整内容。
当某个来源失败但整体搜索可以继续时,JSON 响应可能包含 source_errors;Markdown 响应显示 Source warnings 行。对于 Semantic Scholar 的 HTTP 429,请设置 S2_API_KEY / SEMANTIC_SCHOLAR_API_KEY,稍后重试,或使用 sources="auto,-semantic_scholar" 或 PUBMED_SEARCH_DISABLED_SOURCES=semantic_scholar 临时排除它。
管道管理
manage_pipeline 是管道 CRUD、历史和调度的主要门面。更具体的管道工具仍作为兼容包装器可用。
工具 | 描述 |
| 保存、列出、加载、删除、历史和调度操作的主要门面 |
| 保存管道配置以供以后重用(YAML/JSON,自动验证) |
| 列出已保存的管道(按标签/作用域筛选) |
| 按保存的名称加载;受信任的本地调用者也可以加载文件 |
| 删除管道及其执行历史 |
| 查看带有文章差异分析的执行历史 |
| 创建、更新或删除定期管道调度 |
经过身份验证的服务调用者在其租户派生的存储中使用命名管道;workspace 和 file: 访问仅限本地。服务 Compose 配置在没有单独设计的单一领导者的情况下不会执行调度。
分步教程:
👁️ 视觉与图像搜索
工具 | 描述 |
| 将上传的图像、图像 URL 或数据 URI 交给代理视觉以提取搜索词 |
| 在 Open-i 中搜索生物医学图像(X 射线、显微镜、照片、图表) |
当用户提供图像且代理必须首先解释其含义时,请使用 analyze_figure_for_search。该工具返回 MCP ImageContent 以及供 LLM 代理提取英文生物医学术语的说明,然后继续使用 search_biomedical_images 搜索类似的 Open-i 图像,或使用 unified_search 搜索相关论文。
📄 预印本搜索
通过 unified_search options 标志搜索 arXiv、medRxiv 和 bioRxiv 预印本服务器:
preprints:搜索预印本服务器,并将预印本合并到主聚合结果集中,使用article_type=PREPRINT。all_types:即使没有进行预印本服务器爬取,也保留所选学术来源已返回的非同行评审内容。
推荐组合:
空
options:仅返回同行评审结果;类似预印本的记录会被过滤。options="preprints":搜索 arXiv、medRxiv 和 bioRxiv,然后对这些预印本与主要结果进行排名/去重。options="preprints, all_types":执行相同的预印本服务器爬取,并保留所选来源中的其他非同行评审记录。options="all_types":不进行预印本服务器爬取,但保留来自已搜索来源的非同行评审条目。
预印本检测 —— 文章通过以下方式被识别为预印本:
来自来源 API(OpenAlex、CrossRef、Semantic Scholar)的文章类型
存在 arXiv ID 但无 PubMed ID
已知的预印本服务器来源或期刊名称
DOI 前缀匹配预印本服务器(例如,
10.1101/→ bioRxiv/medRxiv,10.48550/→ arXiv)
🌳 研究上下文图
unified_search 可以附加一个基于 PMID 支撑的排名结果构建的轻量级研究谱系视图:
选项标志 | 描述 |
| 将当前 PMID 支撑的排名集中的轻量级研究上下文图预览附加到 Markdown 输出,并在 JSON 输出中包含 |
当智能体需要快速进行主题分支探索而无需再次调用 build_research_chronicle 时,这很有用。
🧪 临床试验注册库辅助
ClinicalTrials.gov 永远不会被隐式查询。当有界注册库辅助功能有用时,可将 options="trials" 添加到
Markdown 搜索中。它与文献来源计划和来源计数保持分离;持久化工件会将其截断后的物理查询和结果记录在 adjunct_queries 下。结构化
JSON/TOON 搜索不会运行这种仅用于显示的辅助功能。
unified_search(query="remimazolam ICU sedation", options="trials")📊 计数优先导向
unified_search 还可以预先加载现有的来源覆盖范围和决策提示,供希望在阅读排名列表之前获得路由帮助的智能体使用:
选项标志 | 描述 |
| 向响应中添加来源计数表、覆盖范围摘要和下一步工具建议 |
示例:
unified_search(query="remimazolam ICU sedation", options="counts_first")当智能体需要决定是否扩展来源、检查领头 PMID、获取全文、提取图表或转向时间线探索时,此模式很有用。
⏱️ MCP 进度报告
当 MCP 客户端提供进度令牌时,unified_search、build_research_chronicle、get_fulltext 和 get_text_mined_terms 会在其主要阶段发出进度更新。
这减少了智能体在较长搜索期间的“黑箱”等待时间。
进度回调是尽力而为的,并且在工具调用激活期间不会被服务器取消,从而避免因进度通知背压而导致的主机端 Canceled: Canceled 消息。
📋 智能体使用示例
1️⃣ 快速搜索(最简单)
# Agent just asks naturally - middleware handles everything
unified_search(query="remimazolam ICU sedation", limit=20)
# Or with clinical codes - auto-converted to MeSH
unified_search(query="I10 treatment in E11.9 patients")
# ↑ ICD-10 ↑ ICD-10
# Hypertension Type 2 Diabetes2️⃣ PICO 临床问题
简单路径 —— unified_search 可以直接搜索(无需 PICO 分解):
# unified_search searches as-is; detects "A vs B" pattern and shows PICO hints in metadata
unified_search(query="Is remimazolam better than propofol for ICU sedation?")
# → Multi-source keyword search + PICO hint metadata in output
# ⚠️ This does NOT auto-decompose PICO or expand MeSH!
# For structured PICO search, use the Agent workflow below智能体工作流 —— 智能体提供的 PICO + 后端流水线搜索(推荐用于临床问题):
┌─────────────────────────────────────────────────────────────────────────┐
│ "Is remimazolam better than propofol for ICU sedation?" │
└─────────────────────────────────┬───────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ parse_pico() │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ P │ │ I │ │ C │ │ O │ │
│ │ ICU │ │remimaz- │ │propofol │ │sedation │ │
│ │patients │ │ olam │ │ │ │outcomes │ │
│ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ │
└───────┼────────────┼────────────┼────────────┼──────────────────────────┘
│ │ │ │
▼ ▼ ▼ ▼
┌─────────────────────────────────────────────────────────────────────────┐
│ generate_search_queries() × 4 (parallel) │
│ │
│ P → "Intensive Care Units"[MeSH] │
│ I → "remimazolam" [Supplementary Concept], "CNS 7056" │
│ C → "Propofol"[MeSH], "Diprivan" │
│ O → "Conscious Sedation"[MeSH], "Deep Sedation"[MeSH] │
└─────────────────────────────────┬───────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ Agent combines with Boolean logic │
│ │
│ (P) AND (I) AND (C) AND (O) ← High precision │
│ (P) AND (I OR C) AND (O) ← High recall │
└─────────────────────────────────┬───────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────────┐
│ unified_search() (auto multi-source + dedup) │
│ │
│ PubMed + Europe PMC + CORE + OpenAlex → Auto deduplicate & rank │
└─────────────────────────────────────────────────────────────────────────┘# Step 1: Agent extracts P/I/C/O, then validates the structured handoff
pico = parse_pico(
description="Is remimazolam better than propofol for ICU sedation?",
p="ICU patients requiring sedation",
i="remimazolam",
c="propofol",
o="sedation efficacy, delirium, hypotension"
)
# Returns validation plus a ready-to-run `template: pico` pipeline.
# Step 2: Get MeSH for each element (parallel!)
generate_search_queries(topic="ICU patients") # P
generate_search_queries(topic="remimazolam") # I
generate_search_queries(topic="propofol") # C
generate_search_queries(topic="sedation") # O
# Step 3: Either pass expanded fragments back as p_query/i_query/c_query/o_query
# or let the backend pipeline use the structured P/I/C/O labels.
# Step 4: Search (backend runs O-aware precision/recall searches, dedup, rank)
unified_search(
query="Is remimazolam better than propofol for ICU sedation?",
pipeline=pico["pipeline"]
)3️⃣ 从关键论文探索
# Found landmark paper PMID: 33475315
find_related_articles(pmid="33475315") # Similar methodology
find_citing_articles(pmid="33475315") # Who built on this?
get_article_references(pmid="33475315") # What's the foundation?
# Build complete research map
build_citation_tree(pmid="33475315", depth=2, output_format="mermaid")4️⃣ 基因/药物研究
# Research a gene
search_gene(query="BRCA1", organism="human")
get_gene_literature(gene_id="672", limit=20)
# Research a drug compound
search_compound(query="propofol")
get_compound_literature(cid="4943", limit=20)5️⃣ 导出结果
# Export last search results
prepare_export(pmids="last", format="ris") # → EndNote/Zotero
prepare_export(pmids="last", format="bibtex", source="local") # → LaTeX
prepare_export(pmids="last", format="csl") # → CSL JSON from the official NCBI Citation API
save_literature_notes(pmids="last") # → local wiki note + Foam-compatible wikilinks + CSL JSON
save_literature_notes(pmids="last", note_format="medpaper", output_dir="./references")
save_literature_notes(pmids="last", template_file="./reference-template.md")
# Retrieve full text for a selected paper from the last search
get_fulltext(pmid="12345678", extended_sources=True)6️⃣ 预印本搜索
# Include preprints alongside peer-reviewed results
unified_search(query="COVID-19 vaccine efficacy", options="preprints")
# → Main aggregated results include labelled arXiv, medRxiv, and bioRxiv preprints
# Include preprints and retain non-peer-reviewed items in main results
unified_search(query="CRISPR gene therapy", options="preprints, all_types")
# → Preprint-server crawl + non-peer-reviewed items retained in main results
# Only peer-reviewed (default behavior)
unified_search("diabetes treatment")
# → Preprints from any source automatically filtered out
# Add a research context graph preview to the same search response
unified_search("remimazolam ICU sedation", options="context_graph")7️⃣ 流水线(可复用的搜索计划)
# Save a template-based pipeline through the primary facade
manage_pipeline(
action="save",
name="icu_sedation_weekly",
config="template: pico\nparams:\n P: ICU patients\n I: remimazolam\n C: propofol\n O: delirium",
tags="anesthesia,sedation",
description="Weekly ICU sedation monitoring"
)
# Save a custom DAG pipeline
manage_pipeline(
action="save",
name="brca1_comprehensive",
config="""
steps:
- id: expand
action: expand
params: { topic: BRCA1 breast cancer }
- id: pubmed
action: search
params: { query: BRCA1, sources: pubmed, limit: 50 }
- id: expanded
action: search
inputs: [expand]
params: { strategy: mesh, sources: pubmed,openalex, limit: 50 }
- id: merged
action: merge
inputs: [pubmed, expanded]
params: { method: rrf }
- id: enriched
action: metrics
inputs: [merged]
output:
limit: 30
ranking: quality
"""
)
# Execute a saved pipeline
unified_search(pipeline="saved:icu_sedation_weekly")
# List & manage
manage_pipeline(action="list", tag="anesthesia")
manage_pipeline(action="load", source="brca1_comprehensive") # Review YAML
manage_pipeline(action="history", name="icu_sedation_weekly") # View past runs🔍 搜索模式对比
┌─────────────────────────────────────────────────────────────────────────┐
│ SEARCH MODE DECISION TREE │
├─────────────────────────────────────────────────────────────────────────┤
│ │
│ "What kind of search do I need?" │
│ │ │
│ ├── Know exactly what to search? │
│ │ └── unified_search(query="topic keywords") │
│ │ → Quick, auto-routing to best sources │
│ │ │
│ ├── Have a clinical question (A vs B)? │
│ │ └── Agent P/I/C/O → parse_pico() handoff │
│ │ → unified_search(template:pico) or expanded Boolean │
│ │ │
│ ├── Need comprehensive systematic coverage? │
│ │ └── generate_search_queries() → parallel search │
│ │ → MeSH expansion, multiple strategies, merge │
│ │ │
│ └── Exploring from a key paper? │
│ └── find_related/citing/references → build_citation_tree │
│ → Citation network, research context │
│ │
└─────────────────────────────────────────────────────────────────────────┘模式 | 入口点 | 最适合 | 自动功能 |
快速 |
| 快速主题搜索 | ICD→MeSH、多来源、去重 |
PICO | 智能体 P/I/C/O -> | 临床问题 | 验证交接 -> |
系统化 |
| 可复现的综述种子 | MeSH/同义词加上有界批量/游标执行;并非穷尽性声明 |
原生语义 |
| 标题/摘要空间中的概念相似性 | 能力验证;OpenAlex 语义模式,最多 50 条 |
探索 |
| 从关键论文出发 | 引文网络、相关文献 |
🤖 Claude 技能(AI 智能体工作流)
预构建的工作流指南位于 .claude/skills/,分为使用技能(用于使用 MCP 服务器)和开发技能(用于维护项目):
📚 使用技能(11)——适用于使用此 MCP 服务器的 AI 智能体
技能 | 描述 |
| 使用过滤器进行基本搜索 |
| MeSH 扩展,全面综合 |
| 临床问题分解 |
| 引文树、相关文章 |
| 持久化、版本化的研究演进 |
| 基因/PubChem/ClinVar |
| Europe PMC、CORE 全文 |
| RIS/BibTeX/CSV/CSL 导出指南 |
| 跨数据库统一搜索 |
| 完整工具参考指南 |
| 保存、加载、重用搜索计划 |
🔧 开发技能(15)——适用于项目贡献者
技能 | 描述 |
| 自动更新 CHANGELOG.md |
| DDD 架构重构 |
| 代码质量与安全审查 |
| 新功能的 DDD 脚手架 |
| 提交前同步文档 |
| 预提交工作流编排 |
| 将上下文保存到 Memory Bank |
| 更新 Memory Bank 文件 |
| 提取并盘点可引用的 PDF 资产 |
| 初始化新项目 |
| 多语言 README 同步 |
| 将 README 与代码更改同步 |
| 更新 ROADMAP.md 状态 |
| 生成测试套件 |
| 保持 MCP 注册表与生成的工具文档对齐 |
📁 位置:
.claude/skills/*/SKILL.md(Claude Code 专用,并且是仓库技能的唯一事实来源) 不要将仓库技能镜像或拆分到.github/skills/。 这些仓库技能是项目范围的,应保持版本控制。个人跨项目技能应放在用户目录中,例如~/.copilot/skills/或~/.claude/skills/,而不是此仓库中。
🏗️ 架构(DDD)
本项目使用**领域驱动设计(DDD)**架构,以文献研究领域知识为核心模型。
src/pubmed_search/
├── domain/ # Core business logic
│ └── entities/article.py # UnifiedArticle, Author, etc.
├── application/ # Use cases
│ ├── search/ # QueryAnalyzer, ResultAggregator
│ ├── export/ # Citation export (RIS, BibTeX...)
│ └── session/ # SessionManager
├── infrastructure/ # External systems
│ ├── ncbi/ # Entrez, iCite, Citation Exporter
│ ├── sources/ # Europe PMC, CORE, CrossRef...
│ └── http/ # HTTP clients
├── presentation/ # User interfaces
│ ├── mcp_server/ # MCP tools, prompts, resources
│ │ └── tools/ # discovery, strategy, pico, export...
│ └── api/ # Auxiliary HTTP API routes (not pubmed_search.api)
└── shared/ # Cross-cutting concerns
├── exceptions.py # Unified error handling
└── async_utils.py # Rate limiter, retry, circuit breaker内部机制(对智能体透明)
机制 | 描述 |
会话 | 自动创建、自动切换 |
缓存 | 自动缓存搜索结果,避免重复 API 调用 |
速率限制 | 自动遵守 NCBI API 限制(0.34s/0.1s) |
MeSH 查找 |
|
ESpell | 自动拼写校正( |
查询分析 | 每个建议查询都显示 PubMed 实际如何解释它 |
词汇转换层(关键特性)
我们的核心价值:我们是智能体与搜索引擎之间的智能中间件,自动处理词汇标准化,因此智能体无需了解每个数据库的术语。
不同的数据源使用不同的受控词表系统。此服务器提供自动转换:
API / 数据库 | 词表系统 | 自动转换 |
PubMed / NCBI | MeSH(医学主题词表) | ✅ 通过 |
ICD 代码 | ICD-10-CM / ICD-9-CM | ✅ 自动检测并转换为 MeSH |
Europe PMC | 文本挖掘实体(基因、疾病、化学物质) | ✅ 通过 |
OpenAlex | 主题/关键词(模型推断) | ✅ Broker 关键词模式;选中时有界原生语义模式 |
Semantic Scholar | S2 字段 / 批量查询语法 | ✅ Broker 选择相关性或有界批量模式;提供者注释保留来源信息 |
CORE | 无 | ❌ 仅自由文本 |
CrossRef | 无 | ❌ 仅自由文本 |
自动 ICD → MeSH 转换
当使用 ICD 代码(例如,高血压的 I10)搜索时,unified_search() 会自动:
通过
detect_and_expand_icd_codes()检测 ICD-10/ICD-9 模式从内部映射(
ICD10_TO_MESH、ICD9_TO_MESH)查找对应的 MeSH 术语使用 MeSH 同义词扩展查询以进行全面搜索
# Agent calls unified_search with clinical terminology
unified_search(query="I10 treatment outcomes")
# Server auto-expands to PubMed-compatible query
"(I10 OR Hypertension[MeSH]) treatment outcomes"📖 完整架构文档:ARCHITECTURE.md
MeSH 自动扩展 + 查询分析
当调用 generate_search_queries("remimazolam sedation") 时,内部处理如下:
ESpell 校正 - 修复拼写错误
MeSH 查询 - 使用
Entrez.esearch(db="mesh")获取标准词汇同义词提取 - 从 MeSH 入口词中获取同义词
查询分析 - 分析 PubMed 如何解释每个查询
{
"mesh_terms": [
{
"input": "remimazolam",
"preferred": "remimazolam [Supplementary Concept]",
"synonyms": ["CNS 7056", "ONO 2745"]
}
],
"all_synonyms": ["CNS 7056", "ONO 2745", ...],
"suggested_queries": [
{
"id": "q1_title",
"query": "(remimazolam sedation)[Title]",
"purpose": "Exact title match - highest precision",
"estimated_count": 8,
"pubmed_translation": "\"remimazolam sedation\"[Title]"
},
{
"id": "q3_and",
"query": "(remimazolam AND sedation)",
"purpose": "All keywords required",
"estimated_count": 561,
"pubmed_translation": "(\"remimazolam\"[Supplementary Concept] OR \"remimazolam\"[All Fields]) AND (\"sedate\"[All Fields] OR ...)"
}
]
}查询分析的价值:Agent 认为
remimazolam AND sedation只搜索这两个词,但 PubMed 实际上会扩展到补充概念 + 同义词,结果从 8 条增加到 561 条。这有助于 Agent 理解意图与实际搜索之间的差异。
🔒 本地 HTTPS 演示与服务部署
随附的自签名证书和 curl -k 流程是本地 TLS 演示,不是生产安全配置。对于共享服务,请使用经过身份验证的服务 Compose 文件以及 DEPLOYMENT.md 中所述的受信任证书。
本地 HTTPS 冒烟测试
# Step 1: Generate SSL certificates
./scripts/generate-ssl-certs.sh
# Step 2: Start HTTPS service (Docker)
./scripts/start-https-docker.sh up
# Verify deployment
curl -k https://localhost/HTTPS 端点
服务 | URL | 描述 |
MCP |
| Streamable HTTP MCP 端点 |
Health |
| 健康检查 |
Ready |
| 就绪检查 |
Info |
| 运行时传输和端点元数据 |
Exports |
| 本地预生成的导出列表;服务模式需要 Bearer 认证和租户范围 |
远程 MCP 客户端配置
{
"mcpServers": {
"pubmed-search": {
"url": "https://localhost/mcp"
}
}
}🏢 Microsoft Copilot Studio 集成
将 PubMed Search MCP 与 Microsoft 365 Copilot(Word、Teams、Outlook)集成!
快速入门
# Unpublished local schema/protocol smoke only; never tunnel local mode
pubmed-search-mcp-http --mode local --transport streamable-http \
--copilot-compatible --host 127.0.0.1 --port 8765
# Public Copilot endpoint: authenticated service mode is mandatory
export PUBMED_AUTH_TOKENS="copilot:$(openssl rand -hex 32)"
export NGROK_DOMAIN="your-assigned-domain.ngrok.dev"
./scripts/start-copilot-studio.sh --with-ngrokCopilot Studio 配置
字段 | 值 |
服务器名称 |
|
服务器 URL |
|
身份验证 | 服务模式使用 Bearer 令牌;仅未发布的本地演示使用 |
📖 完整文档:copilot-studio/README.md
将
pubmed-search-mcp-http --copilot-compatible用于打包后的 Copilot HTTP 语义。run_server.py仍是源代码树内的开发包装器;run_copilot.py仅用于仅回环的 12 工具原始模式冒烟测试。该简化接口仍通过unified_search(query, limit, min_year, max_year, sources, options)调用共享运行器,并暴露原始模式read_session以支持搜索运行、重放参数和产物恢复;它不暴露仅限 PubMed 的通用搜索别名。隧道脚本要求已分配NGROK_DOMAIN,拒绝已被占用的后端端口,并且仅在--mode service通过就绪检查和未认证拒绝检查后才发布。⚠️ 注意:SSE 传输自 2025 年 8 月起弃用。请使用
streamable-http。
📖 更多文档:
架构 → ARCHITECTURE.md
流水线教程(英文) → docs/PIPELINE_MODE_TUTORIAL.en.md
流水线教程(中文繁体) → docs/PIPELINE_MODE_TUTORIAL.md
部署指南 → DEPLOYMENT.md
Copilot Studio → copilot-studio/README.md
🔐 安全
安全特性
层 | 特性 | 描述 |
HTTPS | TLS 终结 | 远程凭据必需;随附的自签名配置仅限本地 |
Bearer 认证 | 稳定主体 | 服务模式中强制要求,并用于租户授权 |
租户存储 | 文件系统隔离 | 会话、产物、导出、时间线和流水线均存储在已认证主体目录下 |
公平性与速率策略 | 租户并发 + 共享上游预算 | 防止单个调用方成倍消耗上游 API 配额 |
安全标头 | 点击劫持/MIME 加固 | 反向代理标头补充身份验证;它们不是 CSRF 授权 |
机密处理 | 运行时机密注入 | API 密钥和 Bearer 令牌必须来自部署机密/环境变量,且不得提交或记录 |
详细部署说明请参阅 DEPLOYMENT.md。
📤 导出格式
以与主流文献管理工具兼容的格式导出您的搜索结果:
格式 | 来源 | 兼容 | 用途 |
RIS | 官方或本地 | EndNote、Zotero、Mendeley | 通用导入 |
MEDLINE | 官方或本地 | PubMed 工具 | 原生 PubMed 风格存档 |
CSL JSON | 官方 | 引文处理器 | 编程化引文样式 |
BibTeX | 本地 | LaTeX、Overleaf、JabRef | 学术写作 |
CSV | 本地 | Excel、Google Sheets | 数据分析 |
JSON | 本地 | 编程访问 | 自定义处理 |
导出字段
核心:PMID、标题、作者、期刊、年份、卷、期、页码
标识符:DOI、PMC ID、ISSN
内容:摘要(HTML 标签已清理)
元数据:语言、出版物类型、关键词
访问:DOI URL、PMC URL、全文可用性
特殊字符处理
BibTeX 导出使用 pylatexenc 进行正确的 LaTeX 编码
北欧字符(ø、æ、å)、变音符号(ü、ö、ä)和重音符号均可正确转换
示例:
Søren Hansen→S{\o}ren Hansen
📚 引用
GitHub 将显示来自 CITATION.cff 的引用此仓库。如果您在研究、方法部分或内部技术报告中使用 PubMed Search MCP,请优先使用 GitHub 生成的引用,或直接复用仓库元数据。
@software{pubmed_search_mcp,
title = {PubMed Search MCP},
author = {u9401066},
url = {https://github.com/u9401066/pubmed-search-mcp}
}📄 许可证
Apache License 2.0 - 请参阅 LICENSE
🔗 链接
Available Tools
42 toolsanalyze_search_queryA
Analyze a query locally, or preview explicit PubMed Boolean combinations.
With comparison, query is the fixed PubMed scope. Supply 2–5 named blocks ANDed in the baseline, and optional seed_pmids. Get up to two single-block changes with added counts, prioritizing recovered seeds. Read the artifact's drop-ID.json for a difference query and sample PMIDs.
Args: query: The search query to analyze
Returns: Analysis including: - Complexity level (SIMPLE/MODERATE/COMPLEX/AMBIGUOUS) - Intent (LOOKUP/EXPLORATION/COMPARISON/SYSTEMATIC) - PICO elements (if detected) - Recommended sources - Recommended strategies
Inputs: query (required), comparison.
build_citation_treeARead-onlyIdempotent
Build a citation tree (network) from a single article.
🌳 Creates a visual citation network showing research lineage:
Forward (citing): Who cites this paper? (newer research)
Backward (references): What does this paper cite? (foundational work)
⚠️ IMPORTANT: Only accepts ONE PMID at a time to control API load. For multiple papers, call this tool separately for each.
📊 Output Formats (output_format parameter):
"cytoscape": Cytoscape.js format (default, academic standard)
"g6": AntV G6 format (modern, high-performance)
"d3": D3.js force graph format (flexible, Observable)
"vis": vis-network format (simple, quick prototypes)
"graphml": GraphML XML (desktop tools: Gephi, yEd, VOSviewer)
"mermaid": Mermaid diagram (VS Code preview, Markdown)
Args: pmid: Single PubMed ID (e.g., "12345678"). Only ONE PMID accepted - do NOT pass multiple. depth: How many levels to traverse (1-3, default 2). - depth=1: Direct citations/references only - depth=2: Also get citations of citations (recommended) - depth=3: Maximum depth (can be slow, ~100+ API calls) direction: Which direction to build the tree: - "forward": Only citing articles (who cites this) - "backward": Only references (what this cites) - "both": Both directions (default, recommended) limit_per_level: Max articles to fetch per node per level (default 5) output_format: Graph format for visualization (default "cytoscape") - "cytoscape": Cytoscape.js (academic standard, bioinformatics) - "g6": AntV G6 (modern, TypeScript, great for large graphs) - "d3": D3.js force layout (most flexible, Observable notebooks) - "vis": vis-network (simple and easy) - "graphml": GraphML XML (Gephi, VOSviewer, yEd, Pajek) - "mermaid": Mermaid diagram (preview in VS Code Markdown)
Returns: Markdown summary followed by JSON with graph data in the requested format. Includes metadata and statistics regardless of format.
Example usage: # Build 2-level tree for a paper (default Cytoscape.js format) build_citation_tree(pmid="33475315", depth=2, direction="both")
# Use AntV G6 format for modern web visualization
build_citation_tree(pmid="33475315", depth=2, output_format="g6")
# Export GraphML for Gephi analysis
build_citation_tree(pmid="33475315", depth=2, output_format="graphml")
Inputs: pmid (required), depth, direction, output_format, +1 more.
build_research_chronicleA
Build a persisted, versioned, evidence-backed Research Chronicle.
A chronicle is the durable record of how a research topic evolved, and the single entry point for research-evolution work (it replaces the older one-shot timeline tools). It is stored with a monotonic revision number, so re-running it later produces revision N+1 and you can diff revisions to see exactly what changed.
The primary axis is chronological; research branches are a secondary
organizing dimension. Both come from the same stored snapshot, and
preserve shared provenance in output="timeline" and output="tree".
Agreement between projections is not independent evidence verification.
Use output="chronicle_map" for potential forks, earlier counterexamples,
comparative or consensus documents, and annual counts within this revision.
Every entry carries:
a one-sentence claim with inline citations
supporting / contradicting / updating evidence articles
a research branch (lineage) assignment
provenance and a confidence score
The typed provenance graph links Topic → Branch → Entry → EvidenceArticle and is validated against edge invariants. The audit reports evidence coverage, identifier coverage, branch coverage, graph integrity, and chronology gaps, so you always know how complete the picture is.
Args:
topic: Research topic (drug, gene, disease, intervention).
Required unless pmids or a stored chronicle_id is supplied.
pmids: Delimited PMIDs, a string array or JSON array string, or "last" to chronicle the previous
search results instead of running a new search.
max_events: Maximum timeline events to consider (topic mode).
Omit to inherit the continued revision's value, else 30.
min_year: Earliest publication year to include (topic mode).
max_year: Latest publication year to include (topic mode).
chronicle_id: Continue an existing chronicle (creates revision N+1)
instead of deriving the ID from the topic. Passing it
alone re-runs the stored scope. Changes can reflect
revised indexing as well as newly retrieved papers.
output: "summary" (default compact Markdown with the chronological
spine), "json", "chronicle_map", "timeline", "tree",
"graph", "evidence", "milestones", "mermaid" (horizontal
time spine with lineage branches), or "narrative".
"json", "chronicle_map", "timeline", "tree", "graph",
"evidence", and "milestones" return JSON; the rest return
Markdown.
Returns:
The requested rendering plus an artifact locator when durable
artifact persistence is enabled and succeeds. The artifact contains
the full snapshot, projections, evidence table, milestone analysis,
and audit regardless of output. Artifact failure is reported but
does not roll back the already saved Chronicle revision.
Examples: build_research_chronicle(topic="remimazolam") build_research_chronicle(pmids="last", topic="My Reading List") build_research_chronicle(topic="CAR-T therapy", output="mermaid") build_research_chronicle(chronicle_id="remimazolam-9f2b1c4d")
Inputs: pmids, topic, output, max_year, +3 more.
configure_institutional_accessADestructiveIdempotent
Configure your institution's link resolver for full-text access.
═══════════════════════════════════════════════════════════════════════════════ 🏛️ INSTITUTIONAL ACCESS CONFIGURATION ═══════════════════════════════════════════════════════════════════════════════
This tool configures OpenURL link resolver integration, allowing you to access paywalled articles through your institution's library subscription.
Remote service callers may call this tool with no configuration arguments to inspect the operator-installed configuration, but cannot mutate the server-owned, deployment-wide OpenURL settings. Configure those at deployment time or from a trusted local server instead.
═══════════════════════════════════════════════════════════════════════════════ HOW IT WORKS: ═══════════════════════════════════════════════════════════════════════════════
Your library subscribes to journals through publishers
Library provides a "Link Resolver" service (SFX, 360 Link, Primo, etc.)
OpenURL passes article metadata to the resolver
Resolver checks your subscriptions and provides full-text access
═══════════════════════════════════════════════════════════════════════════════ USAGE: ═══════════════════════════════════════════════════════════════════════════════
Option 1: Use a preset (easiest) ───────────────────────────────── configure_institutional_access(preset="ntu")
Available presets:
台灣: "ntu" (台大), "ncku" (成大), "nthu" (清大), "nycu" (陽明交大)
美國: "harvard", "stanford", "mit", "yale"
英國: "oxford", "cambridge"
通用: "sfx", "360link", "primo" (需要 resolver_url)
Option 2: Custom URL ───────────────────── configure_institutional_access( resolver_url="https://your.library.edu/openurl" )
Option 3: Disable ───────────────────── configure_institutional_access(enable=False)
═══════════════════════════════════════════════════════════════════════════════ FINDING YOUR RESOLVER URL: ═══════════════════════════════════════════════════════════════════════════════
Go to your library's website
Look for "Find Full Text", "Link Resolver", or "OpenURL"
Or search: "[Your University] link resolver"
The URL usually looks like:
Args: resolver_url: Your institution's link resolver URL preset: Use a known institution's preset configuration enable: Whether to enable OpenURL links (default: True) Returns: Configuration status message
Inputs: enable, preset, resolver_url.
convert_icd_meshARead-onlyIdempotent
Query the curated ICD/MeSH crosswalk in one explicit direction.
Use icd_to_mesh with one complete ICD-9-CM or ICD-10-CM code, or
mesh_to_icd with a MeSH term. The returned mapping is a limited
convenience crosswalk, not a substitute for a current licensed UMLS
terminology service.
Inputs: value (required), direction (required).
delete_pipelineADestructiveIdempotent
Permanently delete a saved pipeline configuration and execution history.
For the default tenant, any process-level schedule is removed only after the stored pipeline deletion succeeds. Isolated tenants never mutate the shared process scheduler.
Args: name: Name of the saved pipeline to delete.
Returns: Confirmation of deletion.
Inputs: name (required).
diagnose_institutional_accessARead-onlyIdempotent
Diagnose why institutional fulltext access succeeds or fails for an article.
Runs up to three probes and reports each path's outcome:
Direct fetch (Phase 1, IP-aware) — follows
https://doi.org/<doi>and classifies whether the publisher served fulltext, a paywall, or a login page. Works automatically when your network IP is on the publisher's institutional allow-list (campus / VPN).EZproxy fetch (Phase 2, BYO-cookie) — rewrites the publisher hostname to your library's EZproxy host and replays your exported browser session cookie. Configured via env vars:
EZPROXY_HOST(e.g.ezproxy.lib.ntu.edu.tw)EZPROXY_COOKIE_FILE(path to browser-exported cookies.json)EZPROXY_ENABLED=1
OpenURL handoff — generated for you to open manually in a browser when the automated paths fail.
Usage: diagnose_institutional_access( source={"kind": "doi", "value": "10.1097/ALN.0000000000003599"} )
diagnose_institutional_access(
source={"kind": "pmid", "value": "38353755"},
try_ezproxy=False
)Args: source: Exactly one PMID or DOI. A PMID is resolved to a DOI when possible so direct and EZproxy probes can run. try_direct: Run the Phase 1 direct probe (default True). try_ezproxy: Run the Phase 2 EZproxy probe (default True).
Returns: Markdown report listing every probe's status, classification, and advice on the next action to take.
Inputs: source (required), try_direct, try_ezproxy.
fetch_article_detailsBRead-onlyIdempotent
Fetch detailed information for one or more PubMed articles.
Args: pmids: PubMed IDs - accepts multiple formats: - "12345678" (single) - "12345678,87654321" (comma-separated) - "PMID:12345678" (with prefix) - ["12345678", "87654321"] (list) - '["12345678", "87654321"]' (JSON array string) - Newlines, semicolons, pipes, and Chinese separators are also accepted. Inputs are string-only and fail as a complete batch when any PMID is invalid.
Returns: Detailed information for each article.
Inputs: pmids (required), output_format.
find_citing_articlesARead-onlyIdempotent
Find articles that cite a given PubMed article. Uses PubMed Central's citation data to find papers that reference this article.
═══════════════════════════════════════════════════════════════ 📈 FORWARD CITATION SEARCH (Impact Tracking) ═══════════════════════════════════════════════════════════════
Direction: Source Paper → Papers that cite it (FORWARD in time)
USE CASES: ──────────
🔬 Track research impact: Who built on this work?
📊 Find follow-up studies: What happened after this discovery?
🔄 Identify controversies: Papers that challenge or refute findings
📚 Literature review: Ensure you have the latest developments
COMPLEMENTARY TOOLS: ────────────────────
get_article_references(): BACKWARD search (what this paper cited)
find_related_articles(): Similar papers (topic-based, not citation-based)
═══════════════════════════════════════════════════════════════ EXAMPLE: ═══════════════════════════════════════════════════════════════
Find papers that cite a landmark CRISPR paper
find_citing_articles(pmid="23287718", limit=20) → Returns papers published AFTER 2012 that reference this work
Then analyze citation metrics
get_citation_metrics(pmids="last") → See which citing papers are most influential
Args: pmid: PubMed ID of the source article ("12345678" or "PMID:12345678"). limit: Maximum number of citing articles to return (1-100, default: 10).
Returns: List of citing articles with details.
Inputs: pmid (required), limit.
generate_search_queriesARead-onlyIdempotent
Gather search intelligence for a topic - returns RAW MATERIALS for Agent to decide.
This tool provides the BUILDING BLOCKS for search, not finished queries. The Agent decides how to use them.
══════════════════════════════════════════════════════════════════════ TWO USAGE MODES: ══════════════════════════════════════════════════════════════════════
MODE 1: KEYWORD SEARCH (single topic) ───────────────────────────────────── User: "搜尋 remimazolam 的文獻"
Step 1: generate_search_queries("remimazolam") Step 2: Build a Boolean query from returned materials Step 3: analyze_search_query(query="<combined_boolean_query>") Step 4: unified_search(query="<combined_boolean_query>")
══════════════════════════════════════════════════════════════════════
MODE 2: PICO SEARCH (clinical question) ─────────────────────────────────────── User: "remimazolam 在 ICU 鎮靜比 propofol 好嗎?會減少 delirium 嗎?"
Step 1: Agent extracts P/I/C/O from the clinical question, then calls validate_pico_plan(description=..., p=..., i=..., c=..., o=...) to validate the structured handoff and get a runnable PICO pipeline.
Step 2: For EACH PICO element, call generate_search_queries() IN PARALLEL: - generate_search_queries("ICU patients") → P materials - generate_search_queries("remimazolam") → I materials - generate_search_queries("propofol") → C materials - generate_search_queries("delirium") → O materials
Step 3: Combine materials using Boolean logic: High precision: (P_terms) AND (I_terms) AND (C_terms) AND (O_terms) Recall-oriented: (P_terms) AND (I_terms OR C_terms); validate against eligible seed papers
Step 4: Add Clinical Query filter if appropriate: - filters="clinical_query:therapy" → 治療效果比較 - filters="clinical_query:diagnosis" → 診斷相關 - filters="clinical_query:prognosis" → 預後相關 - filters="clinical_query:etiology" → 病因相關
Step 5: Validate the final query with analyze_search_query()
Step 6: Execute unified_search() with the final Boolean query══════════════════════════════════════════════════════════════════════
Features:
Spelling correction via NCBI ESpell
MeSH term lookup for standardized vocabulary
Synonym expansion from MeSH database
Query analysis: Shows how PubMed actually interprets each query (Agent's understanding vs PubMed's actual interpretation)
Args: topic: Search topic - can be a single keyword or PICO element strategy: Affects suggested_queries (if included) - "comprehensive": Multiple angles, includes reviews (default) - "focused": Adds RCT publication-type filter; study quality still requires appraisal - "exploratory": Broader search with more synonyms check_spelling: Whether to check/correct spelling (default: True) include_suggestions: Include pre-built query suggestions (default: True)
Returns: JSON with RAW MATERIALS: - corrected_topic: Spell-checked topic - keywords: Extracted significant keywords - mesh_terms: MeSH data with preferred terms and synonyms - all_synonyms: Flattened list of all synonyms - suggested_queries: Optional pre-built queries with: - estimated_count: How many results PubMed would return - pubmed_translation: How PubMed actually interprets the query
Inputs: topic (required), strategy, check_spelling, include_suggestions.
get_article_figuresARead-onlyIdempotent
Get structured figure metadata (label, caption, image URL) and PDF links from a PMC Open Access article.
Returns all figures with their captions and direct image URLs, plus PDF download links for the complete article.
source is a discriminated identifier object, so the schema itself
requires exactly one explicit PMID or PMCID.
Args: source: {"kind":"pmcid","value":"PMC12086443"} or {"kind":"pmid","value":"40384072"}. include_subfigures: Parse sub-figures (e.g., Figure 3A, 3B) as separate entries. include_tables: Also extract tables rendered as images.
Returns: Structured figure data with image URLs, captions, and PDF links.
Example: get_article_figures(source={"kind":"pmcid","value":"PMC12086443"})
Inputs: source (required), output_format, include_tables, include_subfigures.
get_article_referencesARead-onlyIdempotent
Get the references (bibliography) of a PubMed article.
Returns the list of articles that this paper cites in its bibliography. This is the OPPOSITE of find_citing_articles:
get_article_references: Papers THIS article cites (backward in time)
find_citing_articles: Papers that cite THIS article (forward in time)
═══════════════════════════════════════════════════════════════ 📚 BACKWARD CITATION SEARCH (Foundation Discovery) ═══════════════════════════════════════════════════════════════
Direction: Source Paper → Papers it cited (BACKWARD in time)
USE CASES: ──────────
🏛️ Find foundational papers: Core works the field builds on
⚗️ Methodology sources: Papers describing techniques used
📖 Background reading: Build understanding of a topic
🔍 Verify claims: Check sources for specific assertions
═══════════════════════════════════════════════════════════════ EXAMPLE WORKFLOW: ═══════════════════════════════════════════════════════════════
Start with a recent review article
get_article_references(pmid="38123456", limit=50) → Get the bibliography of this review
Find most-cited foundational papers
get_citation_metrics(pmids="last", sort_by="citation_count") → Identify which references are the most influential
Read a foundational paper
fetch_article_details(pmids="12345678") → Get full details of an important reference
Args: pmid: PubMed ID of the source article ("12345678" or "PMID:12345678"). limit: Maximum number of references to return (1-100, default: 20).
Returns: List of referenced articles with details.
Inputs: pmid (required), limit.
get_citation_metricsARead-onlyIdempotent
Get citation metrics from NIH iCite for articles.
Returns field-normalized citation data including:
citation_count: Total number of citations
relative_citation_ratio (RCR): Field-normalized metric (1.0 = average)
nih_percentile: Percentile ranking (0-100)
citations_per_year: Citation velocity
apt: Approximate Potential to Translate (clinical relevance 0-1)
Can sort and filter results by citation metrics.
Args: pmids: PubMed IDs - accepts multiple formats: - "12345678,87654321" (comma-separated) - ["12345678", "87654321"] (list) - '["12345678", "87654321"]' (JSON array string) - "PMID:12345678" (with prefix) - "last" to use PMIDs from the last search Batches are fail-closed and limited to 1,000 items before deduplication. sort_by: Metric to sort by: - "citation_count": Raw citation count (default) - "relative_citation_ratio": Field-normalized (recommended) - "nih_percentile": Percentile ranking - "citations_per_year": Citation velocity min_citations: Filter out articles with fewer citations min_rcr: Filter out articles with RCR below threshold (e.g., 1.0 = average) min_percentile: Filter out articles below percentile (e.g., 50 = top half)
Returns: Articles with citation metrics, sorted and filtered as requested. iCite transport or response failures return an explicit retryable error and are never rendered as an empty/unindexed result.
Inputs: pmids (required), min_rcr, sort_by, min_citations, +2 more.
get_compound_detailsBRead-onlyIdempotent
Get detailed information about a compound by PubChem CID.
Args: cid: PubChem Compound ID
Returns: JSON with compound details including formula, SMILES, properties
Inputs: cid (required).
get_compound_literatureARead-onlyIdempotent
Get PubMed articles linked to a compound.
Uses NCBI's curated compound-to-publication links.
Args: cid: PubChem Compound ID limit: Maximum PubMed IDs to return (1-100)
Returns: JSON with linked PubMed IDs
Inputs: cid (required), limit.
get_fulltextA
🔥 Enhanced multi-source fulltext retrieval.
Automatically tries multiple sources to find the best fulltext:
Europe PMC (if PMC ID available)
Unpaywall (finds OA versions via DOI)
Institutional direct/EZproxy fetch (when DOI-backed and enabled)
CORE (open-access repository metadata and available text)
With extended_sources=True, also searches: 5. CrossRef (publisher links) 6. DOAJ (Gold OA journals) 7. Zenodo (research repository) 8. PubMed LinkOut (external providers) 9. Semantic Scholar, OpenAlex, arXiv, bioRxiv, medRxiv
source is a discriminated identifier object, so the schema itself
requires exactly one explicit PMID, PMCID, or DOI kind.
Args: source: One object such as {"kind":"pmid","value":"12345678"}, {"kind":"pmcid","value":"PMC7096777"}, or {"kind":"doi","value":"10.1001/jama.2024.1234"}. sections: Filter body sections (e.g., "introduction,methods,results"). Missing titles are reported with available sections; abstracts are never substituted for missing body evidence. include_pdf_links: Include PDF download links (default: True). False skips link enrichment when structured fulltext is already available. include_figures: Include figure metadata with image URLs (default: False) extended_sources: Search the extended downloader chain after the standard policy (default: False) output_format: Response format - "markdown" (default), "json", or "toon" allow_browser_session: Control browser-session fallback. - True: force broker fallback when configured - False: disable broker fallback - None: use auto mode from broker configuration
Returns: Fulltext content with PDF links from all available sources.
Example: get_fulltext(source={"kind":"pmcid","value":"PMC7096777"}) get_fulltext(source={"kind":"doi","value":"10.1038/s41586-021-03819-2"})
Inputs: source (required), sections, output_format, include_figures, +3 more.
get_gene_detailsARead-onlyIdempotent
Get detailed information about a gene by NCBI Gene ID.
Args: gene_id: NCBI Gene ID (from search results or known)
Returns: JSON with gene details including symbol, name, summary, location
Inputs: gene_id (required).
get_gene_literatureARead-onlyIdempotent
Get PubMed articles linked to a gene.
This uses NCBI's curated gene-to-publication links, which are more precise than keyword searches.
Args: gene_id: NCBI Gene ID limit: Maximum PubMed IDs to return (1-100)
Returns: JSON with linked PubMed IDs
Inputs: gene_id (required), limit.
get_institutional_linkARead-onlyIdempotent
Generate institutional access link (OpenURL) for an article.
═══════════════════════════════════════════════════════════════════════════════ 🔗 GET LIBRARY ACCESS LINK ═══════════════════════════════════════════════════════════════════════════════
Generate an OpenURL that will take you through your library's link resolver to access the full text of an article.
PREREQUISITES: ───────────────── Must first call configure_institutional_access() to set up your resolver.
USAGE: ─────────────────
With PMID (easiest): get_institutional_link( source={"kind": "pmid", "value": "38353755"} )
With DOI: get_institutional_link( source={"kind": "doi", "value": "10.1001/jama.2024.1234"} )
With full metadata (most reliable): get_institutional_link( source={ "kind": "metadata", "title": "Some Article Title", "journal": "JAMA", "year": 2024, "volume": "331", "issue": "1", "pages": "45-52" } )
Args: source: Exactly one explicit PMID, DOI, or bounded metadata object.
Returns: OpenURL link or error message
Inputs: source (required).
get_pipeline_historyARead-onlyIdempotent
Get execution history for a saved pipeline.
Shows past execution results with diff analysis: which articles are new compared to the previous run.
Args: name: Name of the saved pipeline. limit: Maximum number of history entries to return (default: 5).
Returns: Execution history with date, article count, new/removed articles, status.
Inputs: name (required), limit.
get_text_mined_termsBRead-onlyIdempotent
Get text-mined annotations from Europe PMC.
Returns entities extracted from the article text including genes, diseases,
chemicals, organisms, and more. source is exactly one PMID or PMCID.
Args: source: {"kind":"pmid","value":"12345678"} or {"kind":"pmcid","value":"PMC7096777"}. semantic_type: Filter by entity type. Options: - "GENE_PROTEIN": Genes and proteins - "DISEASE": Diseases and conditions - "CHEMICAL": Drugs and chemicals - "ORGANISM": Species and organisms - "GO_TERM": Gene Ontology terms - None: Return all types (default)
Returns: List of text-mined entities with counts and sections.
Inputs: source (required), output_format, semantic_type.
list_pipelinesARead-onlyIdempotent
List all saved pipeline configurations.
Args: tag: Filter by tag (e.g., "sedation"). Empty = show all. scope: Filter by scope: "workspace", "global", or "" (show all).
Returns: Table of saved pipelines with name, scope, description, tags.
Inputs: tag, scope.
list_resolver_presetsARead-onlyIdempotent
List available institutional link resolver presets.
═══════════════════════════════════════════════════════════════════════════════ 📚 AVAILABLE RESOLVER PRESETS ═══════════════════════════════════════════════════════════════════════════════
These presets contain pre-configured URLs for common institutions. Use them with configure_institutional_access(preset="name").
Returns: List of available presets with URLs
Inputs: no named parameters.
load_pipelineARead-onlyIdempotent
Load a pipeline configuration for review or editing.
Loads from either source:
Saved name: "weekly_remimazolam" or "saved:weekly_remimazolam"
Local-only file: "file:path/to/pipeline.yaml" (disabled for authenticated service callers)
The returned YAML can be reviewed, modified, and then:
Executed directly: unified_search(pipeline="")
Saved with changes: save_pipeline(name="...", config="")
Args: source: Pipeline source identifier (see above).
Returns: Full pipeline YAML content + metadata.
Inputs: source (required).
prepare_exportA
Export citations to reference manager formats.
╔═══════════════════════════════════════════════════════════════════╗ ║ RECOMMENDED: Use source="official" (default) for best quality ║ ╚═══════════════════════════════════════════════════════════════════╝
When to Use
Exporting references to EndNote, Zotero, Mendeley
Creating BibTeX for LaTeX documents
Generating citation lists for manuscripts
Source Options
Source | Formats | Quality | Speed |
official | ris, medline, csl | ★★★★★ | Fast |
local | ris, bibtex, csv, medline, json | ★★★★ | Fast |
Format Selection Guide
ris: EndNote, Zotero, Mendeley (official recommended)
medline: NBIB format for PubMed tools
csl: JSON for programmatic citation styling
bibtex: LaTeX documents (local only)
csv: Data analysis, Excel (local only)
Args: pmids: Articles to export. Accepts: - "last" → results from previous search - "12345678,87654321" → comma-separated PMIDs - ["12345678", "87654321"] → list of PMIDs - '["12345678", "87654321"]' → JSON array string - "PMID:12345678" → with prefix format: Export format (default: "ris") - official API: ris, medline, csl - local only: bibtex, csv, json include_abstract: Include abstracts in output (default: True). False requires source="local"; official payloads are returned unmodified. source: Citation source (default: "official") - "official": NCBI Citation API (recommended, best quality) - "local": Local formatting (more formats, offline capable)
Returns: JSON with status and export_text containing formatted citations.
Examples: # Export last search results (recommended) prepare_export(pmids="last", format="ris")
# Export specific PMIDs to BibTeX
prepare_export(pmids="12345678,87654321", format="bibtex", source="local")
# Get CSL-JSON for programmatic use
prepare_export(pmids="last", format="csl", source="official")
Inputs: pmids (required), format, source, include_abstract.
prepare_figure_searchARead-onlyIdempotent
Analyze a scientific figure or image for literature search.
═══════════════════════════════════════════════════════════════════════ 🔬 VISION-TO-LITERATURE SEARCH (Experimental) ═══════════════════════════════════════════════════════════════════════
This tool enables searching for scientific literature based on images.
WORKFLOW (the host agent performs the analysis and search): ─────────────────────────────────────────────────────────
Provide an image (URL or base64-encoded)
This tool returns the image using MCP ImageContent protocol
YOU (the Agent) analyze the image using your vision capabilities
Extract relevant ENGLISH search terms from the image
Call
search_biomedical_images()orunified_search()with extracted terms when literature retrieval is within the user-requested scopeReturn both the analysis and search results to the user
⚠️ IMPORTANT RULES: ────────────────
ALL search queries must be in ENGLISH (Open-i requirement)
This tool returns an image and guidance; it does not invoke a vision model
The host agent controls any subsequent search within its permissions
If the image shows a medical condition, extract the medical term in English
SEARCH TYPES: ─────────────
"comprehensive": General analysis, extract all relevant terms (default)
"methodology": Focus on methods, equipment, techniques shown
"results": Focus on data, graphs, statistical findings
"structure": Focus on molecular/chemical structures
"medical": Focus on clinical/medical imaging findings
USE CASES: ──────────
📊 Scientific figures → Find papers with similar data/charts
🔬 Microscopy images → Find related research
🧬 Molecular structures → Find papers about the compound
📈 Graphs/plots → Find papers with similar analyses
🏥 Medical images → Find case reports or clinical studies
⚗️ Lab equipment → Find methodology papers
IMPORTANT: ────────── Image observations are search hypotheses that require source verification. Follow the user-requested scope and the host agent's execution rules. Use English medical terminology in all search queries.
Args: source: Exactly one typed image source: {"kind": "base64", "data": "data:image/png;base64,..."} or {"kind": "url", "url": "https://example.org/figure.png"}. context: Optional context about what to look for in the image search_type: Type of analysis focus (comprehensive/methodology/results/structure/medical)
Returns: List containing: - ImageContent: The image for you to analyze - TextContent: Instructions for next steps
Example: prepare_figure_search(source={"kind": "url", "url": "https://example.com/figure1.png"}) prepare_figure_search( source={"kind": "base64", "data": "data:image/png;base64,iVBORw0..."} )
Inputs: source (required), context, search_type.
read_research_chronicleARead-onlyIdempotent
Read stored Research Chronicles: load, list, diff, narrate, analyze, compare.
This is the read facade over chronicles created by
build_research_chronicle. Chronicles persist across sessions, so you
can revisit a topic weeks later and see precisely what moved. Because the
evidence is already stored, analysis and comparison are instant and do
not re-run any search.
Actions:
"load": read one revision (defaults to latest) in any output format
"list": list stored chronicles, most recently updated first
"diff": compare two revisions — added, not observed/removed from the later view, and updated entries, evidence, branches and audit status. For each added branch, inspect evidence already in the earlier revision and evidence newly observed in this comparison, with publication years.
"narrate": render evidence-backed Markdown where every claim carries its entry ID and article identifiers
"milestones": inspect landmark ranking inputs and a reading sample from each branch with evidence, alongside activity and evidence quality
"compare": compare 2-5 chronicles side by side, including the evidence articles they share
The required request discriminator makes invalid field combinations
unrepresentable. compare takes one typed selection containing
either 2-5 topic strings or 2-5 Chronicle IDs.
Returns: Markdown or JSON text depending on the action and output format.
Examples: read_research_chronicle(request={"action":"list"}) read_research_chronicle(request={"action":"load","chronicle_id":"remimazolam-9f2b1c4d","output":"tree"}) read_research_chronicle(request={"action":"diff","chronicle_id":"remimazolam-9f2b1c4d","from_revision":1}) read_research_chronicle(request={"action":"narrate","chronicle_id":"remimazolam-9f2b1c4d","mode":"full"}) read_research_chronicle(request={"action":"milestones","chronicle_id":"remimazolam-9f2b1c4d"}) read_research_chronicle(request={"action":"compare","selection":{"kind":"topics","values":["remimazolam","propofol"]}})
Inputs: request (required).
read_sessionARead-onlyIdempotent
Read session data through one schema-exact discriminated request.
Actions:
pmids: return PMIDs for one recorded search
article: return one cached article payload
summary: return current session summary and optional history
list_artifacts: list persistent MCP output artifact manifests
artifact: read one persistent artifact by artifact_id or artifact_uri
search_runs: list durable unified_search run envelopes
search_run: read one run by stable run_id
replay_search: return credential-free unified_search replay arguments
Each action accepts only its own fields. For remote artifact reads, select an artifact_id or artifact_uri locator and use artifact_file plus offset/max_chars to page through large files. Local paths remain redacted unless both include_local_paths and the server setting allow them.
Inputs: request (required).
research_workspaceAIdempotent
Create, record, list or resume a research workspace across sessions.
Use create with a stable workspace_id and question. Record explore, expand, examine or explain activities with source_refs, parent_ids and a next_action. Use resolves to close an earlier record's action. Every record remains an unverified observation. Set evidence_scope to what was inspected; fulltext requires source_refs and a passage locator. Read returns recent records and open actions. Set after=0 to page from the beginning. Follow next_after and next_open_offset for subsequent pages. Large responses may return fewer than the requested limit.
Inputs: request (required).
save_literature_notesADestructive
Save searched articles as guided local wiki/Foam/Markdown notes.
When to Use
After unified_search, persist the selected literature into a local note library.
Give agents a structured alternative to generic write_file calls.
Create wiki notes with Foam-compatible wikilinks, MedPaper-like reference notes, and frontmatter.
Use stable wiki/Foam link targets and return wiki_validation for unresolved-link checks.
Local Directory Resolution
output_dir argument, if provided
PUBMED_NOTES_DIR environment variable
PUBMED_WORKSPACE_DIR/references
PUBMED_DATA_DIR/references
Authenticated Service Boundary
Remote authenticated callers cannot choose output_dir or template_file. Their notes always go to references/ under the current tenant's installed SessionManager data root; process-wide notes/workspace environment paths are intentionally ignored.
Args: pmids: Articles to save. Accepts "last", delimited PMID text, a string array, or a JSON array string. output_dir: Optional target folder for notes. note_format: "wiki" (default, Foam-compatible), "foam", "markdown", or "medpaper". include_abstract: Include abstracts in article notes. overwrite: Overwrite existing per-article notes when filenames collide. create_index: Create a collection index note linking saved articles. collection_name: Optional title/file stem for the index note. template_file: Optional Markdown template with placeholders like {title}, {pmid}, {citation_key}. include_csl_json: Write references.csl.json beside notes for citation-manager handoff.
Returns: JSON with written/skipped files, index information, and wiki_validation. Local callers receive filesystem paths. Authenticated callers receive tenant-relative logical locators and never receive server host paths.
Examples: save_literature_notes(pmids="last") save_literature_notes(pmids="last", note_format="medpaper", output_dir="./references") save_literature_notes(pmids="12345678,87654321", template_file="./ref-template.md")
Inputs: pmids, overwrite, output_dir, note_format, +5 more.
save_pipelineADestructive
Save a pipeline configuration for later reuse.
The config format is identical to unified_search's pipeline parameter (YAML or JSON). Saved pipelines can be loaded later by name: unified_search(pipeline="saved:weekly_remimazolam")
Args: name: Unique identifier (alphanumeric + hyphens/underscores, max 64 chars). Overwrites if name already exists (upsert semantics). config: Pipeline YAML/JSON string. Same format as unified_search pipeline param. tags: Bounded array of canonical tags (e.g., ["anesthesia", "sedation"]). description: Human-readable description of the pipeline's purpose. scope: Storage scope - "workspace" (project-level, git-trackable), "global" (user-level, cross-project), or "auto" (workspace if available, otherwise global). Default: "auto".
Returns: Confirmation with pipeline metadata.
Inputs: name (required), config (required), tags, scope, +1 more.
schedule_pipelineBDestructive
Schedule a saved pipeline for periodic execution.
Args: name: Saved pipeline name. cron: Required 5-field cron expression. Example: "0 9 * * 1" (Mon 9am). diff_mode: When True, store diff-mode preference with the schedule. notify: When True, store notify preference with the schedule.
Returns: Schedule confirmation or removal result.
Inputs: cron (required), name (required), notify, diff_mode.
search_biomedical_imagesARead-onlyIdempotent
🖼️ Search biomedical images from NLM Open-i.
Searches medical/scientific images from Open-i and returns image URLs with metadata (caption, article info, MeSH terms).
═══════════════════════════════════════════════════════════════ ⚠️ CRITICAL - LANGUAGE REQUIREMENT: ═══════════════════════════════════════════════════════════ Open-i ONLY supports English queries. If the user queries in non-English (Chinese, Japanese, Korean, etc.), you MUST:
Translate the query to English medical terminology first
Then call this tool with the English query Example: "喉頭水腫" → "laryngeal edema" "胸部X光肺炎" → "chest X-ray pneumonia"
The tool has built-in translation hints for common CJK medical terms, but YOU should always verify the translation is correct.
═══════════════════════════════════════════════════════════ SOURCES: ═══════════════════════════════════════════════════════════════
Open-i (NLM): X-ray, microscopy, clinical images
═══════════════════════════════════════════════════════════════ EXAMPLES: ═══════════════════════════════════════════════════════════════
General image search: search_biomedical_images("chest pneumonia CT scan")
X-ray only: search_biomedical_images("fracture", image_type="x")
Microscopy images: search_biomedical_images("histology liver", image_type="mc")
Clinical teaching images (MedPix): search_biomedical_images("pneumothorax", collection="mpx")
Case reports with CC-BY license, sorted by date: search_biomedical_images( "lung cancer", article_type="cr", license_type="by", sort_by="d" )
Cardiology specialty images: search_biomedical_images("echocardiogram", specialty="c")
Video content only: search_biomedical_images("surgery technique", video_only=True)
═══════════════════════════════════════════════════════════════
Args: query: Search query (e.g., "chest X-ray pneumonia") image_type: Filter by image type (Open-i only): Positive filters: - "c": CT scan images - "g": Graphics / line art / diagrams - "m": MRI images - "mc": Microscopy / histology images - "p": PET scan images - "ph": Photographs / clinical photos - "u": Ultrasound images - "x": X-ray images Exclusion filters: - "xg": Exclude Graphics (removes graphic images from results) - "xm": Exclude Multipanel (removes multipanel images) - None: All types (default) collection: Filter by collection (Open-i only): - "pmc": PubMed Central articles - "mpx": MedPix clinical teaching images (high quality) - "cxr": Chest X-ray collection - "hmd": History of Medicine - "usc": USC collection - None: All collections (default) limit: Maximum number of images to return (default 10, max 50) sort_by: Sort results by (Open-i only): - "r": Relevance (default) - "d": Date (newest first) - "o": Oldest first - "t": Title - "e": Education relevance - "g": Graphics priority article_type: Filter by article type (Open-i only): - "cr": Case Report - "or": Original Research - "re": Review - "sr": Systematic Review - "ra": Research Article - "ed": Editorial - "lt": Letter - "bk": Book - and more... (see API docs) specialty: Filter by medical specialty (Open-i only): - "r": Radiology - "c": Cardiology - "ne": Neurology - "pu": Pulmonology - "d": Dermatology - "g": Gastroenterology - "or": Orthopedics - "o": Ophthalmology - "s": Surgery - "p": Pediatrics - "id": Infectious Disease - "i": Immunology - and more... (see API docs) license_type: Filter by Creative Commons license (Open-i only): - "by": CC-BY (Attribution) - "bync": CC-BY-NC (Attribution-NonCommercial) - "byncnd": CC-BY-NC-ND (Attribution-NonCommercial-NoDerivs) - "byncsa": CC-BY-NC-SA (Attribution-NonCommercial-ShareAlike) subset: Filter by subject subset (Open-i only): - "b": Behavioral Sciences - "c": Cancer - "e": Ethics - "s": Surgery - "x": Toxicology search_fields: Search in specific fields (Open-i only): - "t": Title only - "m": MeSH terms only - "ab": Abstract only - "msh": MeSH heading only - "c": Caption only - "a": Author only video_only: If True, only return video content (default False) hmp_type: History of Medicine publication type. Requires collection="hmd".
Returns: Formatted image results with URLs, captions, and article metadata
Inputs: query (required), limit, subset, sort_by, +8 more.
search_clinvarARead-onlyIdempotent
Search ClinVar for clinical variants.
═══════════════════════════════════════════════════════════════ USE CASES: ═══════════════════════════════════════════════════════════════
Look up clinical significance of genetic variants
Find variants associated with diseases
Research gene-disease associations
Get variant pathogenicity classifications
Args: query: Gene name, variant, or disease condition limit: Maximum results (1-50)
Returns: JSON with variant records including significance and conditions
Inputs: query (required), limit.
search_compoundBRead-onlyIdempotent
Search PubChem for chemical compounds.
═══════════════════════════════════════════════════════════════ USE CASES: ═══════════════════════════════════════════════════════════════
Look up drug/compound information
Find molecular formula and structure
Get compound synonyms and identifiers
Research chemical properties
Args: query: Compound name or description limit: Maximum results (1-50)
Returns: JSON with compound records including names, formulas, properties
Inputs: query (required), limit.
search_geneARead-onlyIdempotent
Search NCBI Gene database for gene information.
═══════════════════════════════════════════════════════════════ USE CASES: ═══════════════════════════════════════════════════════════════
Look up gene function and description
Find gene aliases and official symbols
Get chromosome location
Find genes by name or function
Args: query: Gene name, symbol, or function keyword organism: Filter by organism (e.g., "human", "Homo sapiens", "mouse") limit: Maximum results (1-50)
Returns: JSON with gene records including symbols, names, locations
Inputs: query (required), limit, organism.
test_institutional_accessARead-onlyIdempotent
Test your institutional link resolver configuration.
═══════════════════════════════════════════════════════════════════════════════ 🧪 TEST INSTITUTIONAL ACCESS ═══════════════════════════════════════════════════════════════════════════════
Tests if your configured link resolver is:
Properly configured
Reachable (network connection)
Returns a valid response
NOTE: This only tests if the resolver endpoint is reachable. Actual full-text access depends on your institution's subscriptions.
═══════════════════════════════════════════════════════════════════════════════ FREE TEST OPTIONS: ═══════════════════════════════════════════════════════════════════════════════
If you don't have institutional access, you can test with:
Use "test_free" preset (EBSCO public resolver): configure_institutional_access(preset="test_free") test_institutional_access()
Most university resolvers will respond even without VPN, they just won't provide full-text (shows "Access options" page)
Args: pmid: PMID to use for testing (default: 38353755)
Returns: Test results including: - Configuration status - Network reachability - Generated OpenURL - Link to test manually
Inputs: pmid.
unified_searchA
🔍 Unified Search - Single entry point for multi-source academic search.
Automatically analyzes your query and searches the best sources. No need to choose between PubMed, OpenAlex, CrossRef, etc.
═══════════════════════════════════════════════════════════════════ WHAT IT DOES: ═══════════════════════════════════════════════════════════════════
Analyzes your query (complexity, intent, PICO elements)
Automatically selects best sources based on query type
Searches multiple sources in parallel
Deduplicates and merges results
Ranks by configurable criteria
Enriches with OA links (Unpaywall)
Auto-detects ICD-9/10 codes and expands to MeSH terms
Optionally searches preprints (arXiv, medRxiv, bioRxiv)
═══════════════════════════════════════════════════════════════════ EXAMPLES (most calls only need 1-2 params): ═══════════════════════════════════════════════════════════════════
Simple (1 param): unified_search("remimazolam ICU sedation")
With limit (2 params): unified_search("machine learning in anesthesia", limit=20)
Specify sources: unified_search("CRISPR gene therapy", sources="pubmed,openalex")
Auto minus one source: unified_search("sepsis biomarkers", sources="auto,-semantic_scholar")
Search all enabled sources except enrichment-only CrossRef: unified_search("icu sedation", sources="all,-crossref")
Clinical filters: unified_search("diabetes treatment", filters="year:2020-2025,age_group:aged,clinical_query:therapy")
Include preprints + shallow search: unified_search("COVID-19 vaccine", options="preprints,shallow")
Provider-native semantic retrieval (OpenAlex capability): unified_search("mechanisms of treatment resistance", sources="openalex", options="native_semantic")
Reproducible systematic retrieval (bulk/cursor where supported): unified_search("melanoma AND immunotherapy", sources="openalex,semantic_scholar", options="systematic")
Full control: unified_search("propofol vs remimazolam", sources="pubmed,semantic_scholar,europe_pmc", ranking="impact", filters="year:2020-,sex:female,species:humans", options="preprints,no_relax")
ICD Code Auto-Detection: unified_search("E11 complications") → Auto-expands E11 to "Diabetes Mellitus, Type 2"[MeSH]
Args:
query: Search query (natural language, ICD codes, or structured).
Required unless pipeline is provided.
limit: Maximum results per source (default 10, max 100)
sources: Comma-separated list of sources to search.
Available: "pubmed", "openalex", "semantic_scholar",
"europe_pmc", "crossref", "core".
Commercial connectors may also appear when enabled via env,
e.g. "scopus" when SCOPUS_ENABLED=true and
SCOPUS_API_KEY are configured, or "web_of_science"
when WEB_OF_SCIENCE_ENABLED=true and
WEB_OF_SCIENCE_API_KEY are configured.
Default: auto-select based on query complexity.
Supports "auto" and "all" with exclusions.
Source keys are exact and canonical; legacy hyphenated,
spaced, abbreviated, or case-folded aliases are rejected.
Examples: "pubmed,openalex", "auto,-semantic_scholar",
or "all,-crossref"
Global disable env: PUBMED_SEARCH_DISABLED_SOURCES
Example: PUBMED_SEARCH_DISABLED_SOURCES=semantic_scholar,core
ranking: Ranking strategy:
- "balanced": Default, considers all factors
- "impact": Prioritize high-citation papers
- "recency": Prioritize recent publications
- "quality": Prioritize publication-type heuristics (RCTs, meta-analyses); not a quality assessment
output_format: "markdown" (human-readable), "json", or "toon" (programmatic)
fulltext: "off" (default) or "prefetch" for normal searches. Prefetch
prepares open-access XML for up to three top-ranked articles
with known PMCIDs in the background. Search does not wait.
Later get_fulltext calls reuse ready or in-flight XML; no polling
is needed. No speculative PDF, browser or institutional access.
Not supported with pipeline; use "off" for pipeline calls.
filters: Comma-separated key:value pairs for filtering results.
Supported keys:
year:2020-2025 → publication year range
year:2020- → from 2020 onwards
year:-2025 → up to 2025
year:2024 → from 2024 onwards
age_group: → age group filter (PubMed).
Values: newborn, infant, preschool, child,
adolescent, young_adult, adult, middle_aged,
aged, aged_80
sex: → sex filter: male, female
species: → species filter: humans, animals
language: → language filter: english, chinese, etc.
clinical_query:
→ clinical query filter (PubMed EBM).
Values: therapy, therapy_narrow, diagnosis,
diagnosis_narrow, prognosis, prognosis_narrow,
etiology, etiology_narrow,
clinical_prediction, clinical_prediction_narrow
Tokens, keys, and values use exact canonical spelling with
no surrounding whitespace.
Example: "year:2020-2025,age_group:aged,sex:female,clinical_query:therapy"
options: Comma-separated flags to toggle behaviors.
Supported flags:
preprints → also search arXiv, medRxiv, bioRxiv
include_detected_preprints
→ retain records identified by the preprint
heuristic in otherwise selected sources;
this does not establish peer-review status
clinical_trials → add a bounded ClinicalTrials.gov adjunct
section to Markdown output (explicit opt-in)
no_oa → skip Unpaywall OA link enrichment
no_analysis → hide query analysis section in output
no_scores → hide ranking scores and rank percentiles
compact → compact structured JSON/TOON output
no_next → hide next-tool suggestions in structured output
no_provenance → hide section provenance in structured output
no_relax → disable auto-relaxation on 0 results
exclude_seen → omit prior session results by PMID/DOI (not supported with pipeline)
native_semantic → use provider-native semantic retrieval;
currently OpenAlex, max 50 results
systematic → use deterministic bulk/cursor retrieval where
supported (for example S2 and OpenAlex)
shallow → disable deep search (faster, keyword-only)
native_semantic and systematic are mutually exclusive
Option tokens use exact canonical spelling with no
surrounding whitespace.
and automatically disable multi-strategy query expansion.
Tokens use exact canonical spelling without surrounding
whitespace or duplicates.
Example: "preprints,shallow" or "no_analysis,no_scores"
pipeline: YAML/JSON string defining a multi-step search pipeline.
When provided, other parameters (except output_format) are
ignored and the pipeline DAG is executed instead.
Accepts **YAML** (recommended, human-friendly) or **JSON** format.
**Template mode — YAML** (shortcut for common workflows):
template: pico
template_params:
P: ICU patients
I: remimazolam
C: propofol
O: sedation
Other templates:
template: comprehensive
template_params:
query: CRISPR gene therapy
template: exploration
template_params:
pmid: "12345678"
template: gene_drug
template_params:
term: BRCA1
template: snowball
template_params:
query: CRISPR gene therapy
seed_limit: 5
limit: 20
**Custom pipeline — YAML** (full DAG control, max 20 steps):
name: My Custom Search
steps:
- id: s1
action: search
params:
query: remimazolam ICU
sources: [pubmed, europe_pmc]
limit: 50
- id: s2
action: search
params:
query: propofol ICU
sources: [pubmed]
limit: 50
- id: merged
action: merge
inputs: [s1, s2]
params:
method: rrf
- id: enriched
action: metrics
inputs: [merged]
output:
format: markdown
limit: 20
ranking: impact
Shared params:
globals: default params inherited only by actions that
declare the same canonical parameter key
variables: typed values available as ${name} placeholders;
embedded replacements must be strings
Debugging controls:
dry_run: validate/preview the pipeline without searches
stop_at: execute through one step id, e.g. "merged"
**JSON also supported** (for programmatic use):
{"template": "pico", "template_params": {"P": "ICU patients", "I": "remimazolam"}}
Available actions:
search — literature search (params: query, sources, limit, min_year, max_year)
pico — PICO elements (params: P, I, C, O)
expand — MeSH/synonym expansion (params: topic)
details — fetch article details (params: pmids)
related — find related articles (params: pmid OR seed_limit, limit)
citing — find citing articles (params: pmid OR seed_limit, limit)
references — get article references (params: pmid OR seed_limit, limit)
metrics — enrich with iCite citation metrics (inputs only)
merge — combine results (params: method=union|intersection|rrf)
filter — post-filter (params: min_year, max_year, article_types, min_citations, has_abstract)
seed_limit (1-10) snowballs from the first unique input PMIDs;
it needs inputs, is exclusive with pmid, and excludes seeds.Returns: Formatted search results with: - Query analysis (complexity, intent, PICO) - ICD code expansions (if detected) - Search statistics (sources, dedup count) - Ranked articles with metadata - Open access links where available - Preprints (if options includes "preprints") - Relaxation info (if auto_relax triggered) - Pipeline step summary (if pipeline mode)
Inputs: limit, query, dry_run, filters, +7 more.
unschedule_pipelineADestructiveIdempotent
Remove the active schedule for a saved pipeline.
Args: name: Saved pipeline name whose schedule will be removed.
Returns: Removed schedule metadata, or a native MCP error when none exists.
Inputs: name (required).
validate_pico_planARead-onlyIdempotent
Validate agent-provided P/I/C/O and return a runnable PICO pipeline.
question_type and profile are closed enums. sources is an
explicit array of supported unified-search providers; malformed values
fail instead of being silently replaced. When question_type is
omitted, the application service infers it from the clinical question.
Inputs: c, i, o, p, +9 more.
verify_reference_listARead-onlyIdempotent
Verify a plain-text reference list against PubMed evidence.
First version scope: - Reference-list verification only - Client supplies the extracted reference list text - Backend parses entries and resolves them via PMID / DOI / ECitMatch
Second version scope:
- Adds unresolved review workflow for partial_match and unresolved rows
- Returns a manual-review queue with retry queries and review checklist
- Supports human-in-the-loop acceptance/rejection in client-side workflows
Args: reference_text: Plain-text references, ideally one per line or a numbered reference list extracted from a file. Limited to 200,000 characters / 400,000 UTF-8 bytes; each entry is limited to 4,000 characters / 8,000 UTF-8 bytes. source_name: Optional single-line file label for reporting (up to 255 characters / 512 UTF-8 bytes). max_references: Hard input-entry limit from 1 through 200. Inputs above the selected limit are rejected instead of truncated.
Returns:
JSON verification report with parsed fields, matched PubMed evidence,
per-reference verification status, and explicit
source_unavailable / not_checked rows when evidence could
not be assessed.
Inputs: reference_text (required), source_name, max_references.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 42 tools
Some clusters overlap: query-preparation tools (validate_pico_plan, analyze_search_query, generate_search_queries), citation exploration vs build_citation_tree, research_workspace vs build/read_research_chronicle, and institutional test vs diagnose. The detailed descriptions do provide explicit workflow guidance, but with 42 tools the boundaries are not always immediately obvious.
The tool names are overwhelmingly consistent snake_case verb_noun forms (get_, search_, find_, build_, save_, list_, etc.). A few exceptions such as unified_search and research_workspace break the imperative-verb pattern but are still readable and easy to classify.
At 42 tools, the surface is far beyond the typical 3-15 range and feels heavy even for a broad literature-research platform. Many capabilities are useful, but the count creates real selection and maintenance overhead.
The set covers literature search, query construction, article details, fulltext, citation networks, metrics, export, notes, pipelines, sessions, chronicles, gene/compound/ClinVar lookups, images, and institutional access. Minor gaps remain in lifecycle management for saved notes/workspaces and some read-only session surfaces.
Maintenance
Related MCP Connectors
Academic research MCP server for paper search, citation checks, graphs, and deep research.
Research paper search with real citations and reference formatting for AI assistants
Academic papers, reference verification and research data for AI agents.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server enabling AI agents to search and retrieve scientific papers, citations, and author profiles from Crossref, OpenAlex, and Semantic Scholar with no API keys required.523 PyPI3MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that enables coding agents to search academic papers, ingest full-text PDFs, extract structured details, and manage citations in literature research workflows.33MIT
- FlicenseAqualityDmaintenanceAI-powered research assistant MCP server for searching academic papers and answering research questions with DOI citations.3-
- FlicenseNot gradedqualityDmaintenanceAn advanced scholarly research MCP server that enables AI assistants to discover, fetch, process, and manage academic papers across multiple sources like arXiv, PubMed, and Semantic Scholar, with capabilities for summarization, citation analysis, and concept relationship extraction.2-