
PubMed Search
io.github.u9401066由 GitHub 帳號 u9401066 發布v0.8.0更新於 Oct 25, 2026
多源生物醫學文獻檢索:PubMed、Europe PMC、OpenAlex、全文、引文
AI 翻譯由 AI 模型根據下方的原文描述翻譯,可能有誤。
原文描述
Multi-source biomedical literature search: PubMed, Europe PMC, OpenAlex, full text, citations
概覽
PubMed Search 的本機 MCP 服務;無需登入;STDIO。
暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 PubMed Search,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
PubMed Search MCP
[PyPI version] [Python 3.10+] [License: Apache 2.0] [MCP] [CI]
Professional Literature Research Assistant for AI Agents - More than just an API wrapper
[PubMed Search MCP research workflow]
A Domain-Driven Design (DDD) based MCP server that serves as an intelligent research assistant for AI agents, providing task-oriented literature search and analysis capabilities.
✨ What's Included:
- 🔧 41 MCP Tools - Streamlined PubMed, Europe PMC, CORE, NCBI database access, and the versioned Research Chronicle
- 🛡️ Multi-Agent Service Mode - Deploy once and serve many agents: per-tenant sessions, caches, and artifacts, bearer-token auth, and per-tenant fair-share limits. See DEPLOYMENT.md
- 🖼️ OA Figure Extraction - Pull figure captions, direct image URLs, and PDF links from PMC Open Access articles
- 📘 Docs Site - Browse the complete language-switchable handbook: user workflows, architecture, 41-tool reference, pipeline tutorials, source/broker contracts, integrations and operations, security, and deployment at u9401066.github.io/pubmed-search-mcp
- 📖 GitHub Wiki - GitHub-native mirror of the same canonical documentation at github.com/u9401066/pubmed-search-mcp/wiki
- 📚 26 Claude Skills - Ready-to-use workflow guides for AI agents (Claude Code-specific)
- 📖 Copilot Instructions - VS Code GitHub Copilot integration guide
- Research automation - Scheduled pipeline diffs/local notifications, Chronicle rebuild summaries, multi-seed citation snowballing, and opt-in session deduplication with
options="exclude_seen".
🌐 Language: English | 繁體中文
📘 Documentation Map: README is the quick project entry point. Use the Docs Site for the best reading experience, the GitHub Wiki for GitHub-native navigation, and source docs for edits: User guide | Advanced workflows | Capability-first guide | Unified Search architecture | 41-tool quality audit | 60-repository academic retrieval landscape | Provider data planes | BioMCP architecture analysis | Developer guide | Complete index
Documentation map · Maintenance scripts
Research automation and portable installation — v0.8.0
Scheduled pipelines report bounded changes and retain local notification summaries.
Chronicle rebuild summaries compare the previous revision; snowball pipelines
expand multiple citation seeds. Normal searches can opt into options="exclude_seen"
to filter previously returned PMID/DOI identities in this session before limit;
the option is rejected with pipeline=. The interface remains 41 tools.
See the usage guide and
pipeline tutorial.
Registry metadata and plugin drift are checked before PyPI upload. Release smoke verifies the exact wheel's ownership marker and all 41 installed tools under the registry environment contract; registry publication follows PyPI via GitHub OIDC.
Real workflow smoke and local pretest — v0.7.7
Local pretest runs the complete regression gate before push. CI focuses on
Ubuntu/Windows installed artifacts and real MCP/provider workflows; publication
verifies the exact wheel/sdist and a running non-root container. Removed 64 weak
or obsolete tests with documented replacement coverage. See the
testing policy and
phased release review.
Background fulltext and reliable section reads — v0.7.6
Opt-in XML prefetch shares downloads with later get_fulltext calls. Queued
articles become foreground reads when requested; search returns ready-to-use
read arguments. Missing sections report available titles without substituting
abstracts or repeating PDF retrieval. Prefetch remains off by default.
See the assessment and
release review.
Shared input normalization — v0.7.5
All 41 tools share automatic correction for JSON containers, decimal numeric strings, explicit boolean text, enum spelling and biomedical identifiers. Published schemas include accepted representations; pre-execution errors provide precise field paths and repair constraints. Native and normalized requests are verified across all tools, including one corrected retry. See input formats and validation.
Provider-safe scheduling — v0.7.4
Pipeline branches now proceed as their dependencies finish while API request-rate limits remain unchanged. Shared concurrency uses the most conservative caller limit; 429 cooldowns survive timeouts and cancelled PubMed workers. Historical plans are archived behind a documentation map. See the release review and offline latency experiment; fixed-delay timing is not a live-provider throughput or retrieval-quality claim.
Core review and reliability — v0.7.3
Completed the ten-phase core review: 223 source files and 2,901 definitions with authored decisions and current file hashes. This release repairs source-failure handling, article identity, persistence, cancellation, exports, and evaluation checkpoints while keeping all 41 tools. Harness installation preserves user customizations; contributors run the full local gate before push, with an independent smoke gate in ordinary CI. See the changelog for behavior changes. Local regression results do not establish a new public benchmark gain.
Research quality and evaluation — v0.7.2
This release improves query-aware ranking and fusion, cross-source article deduplication, bibliographic verification, section filtering, and concurrent cache fetches. The canonical 41-tool interface remains unchanged.
The benchmark report separates component quality from the value of the complete agent package. On public BEIR NFCorpus, an earlier BM25 component comparison improved test nDCG@10 from 0.293357 to 0.297831. That result does not measure this release's full agent performance. The three-question native Codex/package pilot is too small to establish a product-level gain; the complete 5,000-question evaluation is prepared but has not been started.
Read the reliability audit for reproduced defects, validation boundaries, and revision fingerprints. Reference verification checks bibliographic consistency; confirming that a paper supports a claim still requires inspecting the relevant passage.
🚀 Quick Install
MCP Registry and Agent Plugin
In clients that support the official MCP Registry
or GitHub MCP Registry, look up
io.github.u9401066/pubmed-search-mcp once the release is published. Registry
metadata launches uvx [email protected] over stdio; configure NCBI_EMAIL
and optionally NCBI_API_KEY in the client.
For Agent Plugins 1.0.0-compatible clients, install the repository's
plugins/pubmed-search/ directory using the client's
plugin installer. It bundles the version-pinned MCP launcher and research skills;
client plugin support and installation UI vary. See integrations.
Prerequisites
-
Python 3.10+ — Download
-
uv (recommended) — Install uv
-
NCBI Email — Required by NCBI API policy. Any valid email address.
-
NCBI API Key (optional) — Get one here for higher rate limits (10 req/s vs 3 req/s)
-
OpenAlex API Key (optional) — set
OPENALEX_API_KEYto use an authenticated credit allocation; without it, requests use OpenAlex's current anonymous casual-use budget.mailtois contact metadata, not authentication. Without source-specific emails, the server reuses the configured runtime contact email for OpenAlex, CrossRef, and Unpaywall.
Install & Run
Python SDK Facade
For in-process Python integrations, use the stable SDK facade instead of importing MCP tool modules:
Use uvx pubmed-search-mcp or /mcp for agent tool discovery. Use the SDK for
Python package/notebook calls where a typed object is easier than parsing an MCP
response string.
The SDK executes the application use case directly and intentionally has no MCP
session journal or artifact side effects; use the MCP tool when durable replay
and artifact locators are required.
The async context owns and closes every provider client and HTTP pool. If a
long-lived application does not use async with, call await client.aclose()
during shutdown.
Choose a Runtime Contract
Local and service deployments are intentionally separate contracts. Do not turn
the local HTTP command into a public service by changing only its bind address.
The explicit local profile retains pmids="last", sessions, cache, and exports
across MCP requests and reconnects in its durable default tenant; this is safe
only inside the enforced loopback/Host/Origin boundary. Service mode never
inherits that trust: it fails closed without a bearer principal. Use
DEPLOYMENT.md for the service environment and Compose profile.
The current service profile supports many authenticated principals in one
server process; keep one replica until sessions, locks, artifacts, and
subscriptions have shared backends.
The protocol baseline is MCP SDK v2 (mcp>=2.0,<3). Modern 2026-07-28 clients
send tools/list and tools/call directly, without an initialize handshake or
Mcp-Session-Id. Local mode retains filesystem features. Authenticated service
callers cannot load file: pipelines, select note output_dir/template_file,
or inherit a process-wide pipeline workspace. Note responses use tenant-relative
logical locators and never reveal server filesystem paths. The service Compose scheduler is
disabled. See the Integrations & Operations Guide
for the capability matrix.
⚙️ Configuration
This MCP server works with any MCP-compatible AI tool. Choose your preferred client:
VS Code / Cursor (.vscode/mcp.json)
Optional: enable browser-session PDF fallback once and let tools auto-use it:
With this setting, get_fulltext will automatically try the local broker for institutional or publisher landing pages. Pass allow_browser_session=false only when you want to suppress it for a specific call.
Run the local broker with download interception:
Copy the generated value into both commands/configurations; never reuse a
published example token. --token, BROWSER_FETCH_BROKER_TOKEN, or the
shared BROWSER_FETCH_TOKEN is required; the broker fails closed instead of
generating or logging a secret. The broker launches a persistent browser
profile with download interception enabled. Log in once inside that
broker-controlled browser window, and subsequent PDF downloads will be captured
automatically without a native "Save As" dialog.
Claude Desktop (claude_desktop_config.json)
Config file location:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json- Windows:
%APPDATA%\Claude\claude_desktop_config.json- Linux:
~/.config/Claude/claude_desktop_config.json
Claude Code
Or add to .mcp.json in your project root:
Zed AI (settings.json)
Zed editor (z.ai) supports MCP servers natively. Add to your Zed settings.json:
Tip: Open Command Palette →
zed: open settingsto edit, or go to Agent Panel → Settings → "Add Custom Server".
OpenClaw 🦞 (~/.openclaw/openclaw.json)
OpenClaw uses MCP servers via the mcp-adapter plugin. Install the adapter first:
Then add to ~/.openclaw/openclaw.json:
Restart the gateway after configuration:
Cline (cline_mcp_settings.json)
Other MCP Clients
Any MCP-compatible client can use this server via stdio transport:
Note:
NCBI_EMAILis required by NCBI API policy. Optionally setNCBI_API_KEYfor higher rate limits (10 req/s vs 3 req/s). 📖 Detailed Integration Guides: See docs/guides/INTEGRATIONS.md for all environment variables, Copilot Studio setup, Docker deployment, proxy configuration, and troubleshooting.
🎯 Design Philosophy
Core Positioning: The intelligent middleware between AI Agents and academic search engines.
Why This Server?
Other tools give you raw API access. We give you vocabulary translation + intelligent routing + research analysis:
Key Differentiators
- Vocabulary Translation Layer - Agent speaks naturally, we translate to each database's terminology (MeSH, ICD-10, text-mined entities)
- Unified Search Gateway - One
unified_search()call, capability-aware dispatch across PubMed, Europe PMC, CORE, OpenAlex, Semantic Scholar, and enabled preprint/commercial sources - PICO Handoff + Pipeline - the Agent extracts P/I/C/O,
validate_pico_plan()validates that structured handoff, and the backendtemplate: picopipeline executes O-aware precision/recall searches - Research Chronicle & Lineage Tree - Detect milestones with policy-driven heuristics, identify landmark papers via multi-signal scoring, surface diagnostics, persist versioned revisions you can diff, and visualize research evolution as branching trees by sub-topic
- Citation Network Analysis - Build multi-level citation trees to map an entire research landscape from a single paper
- Full Research Lifecycle - From search → discovery → full text → analysis → export, all in one server
- Agent-First Design - Output optimized for machine decision-making, not human reading
📡 External APIs & Data Sources
This MCP server integrates with multiple academic databases and APIs:
Core Data Sources
🔑 Key: ✅ = Full vocabulary support | ➡️ = Query pass-through (no controlled vocabulary)
ICD Codes: Auto-detected and converted to MeSH before PubMed search
Environment Variables
CrossRef and Unpaywall reuse the runtime server contact email (NCBI_EMAIL,
CLI --email, or detected git email) unless a source-specific email is
configured. OpenAlex accepts casual anonymous use and an optional API key; the
broker reads its response credit/rate metadata instead of assuming a permanent
"polite pool" quota.
Local note export resolves directories in this order: output_dir argument, PUBMED_NOTES_DIR, PUBMED_WORKSPACE_DIR/references, PUBMED_DATA_DIR/references, then ~/.pubmed-search-mcp/references.
This path/template selection applies only to trusted local mode. Authenticated
service notes always use a built-in format below the current tenant's isolated
references/ directory.
For LLM wiki compatibility, wiki and foam exports use stable link targets based on PMID, DOI, PMCID, or fallback identifiers; titles remain aliases/display labels, and the response includes wiki_validation for unresolved wikilink checks.
🔄 How It Works: The Middleware Architecture
🛠️ MCP Tools Overview
If you want to understand the tool surface as a usable system, do not start by memorizing 41 tool names.
Start with the Tools Usage Guide: it compresses the current 41 tools into 8 capability families, explains the theoretical lower bound, and gives intent-based routing for both humans and agents.
🔍 Search & Query Intelligence
[Search and query intelligence workflow]
One search entry, three retrieval policies
Generic literature discovery is intentionally exposed through exactly one MCP
tool: unified_search. Provider-specific APIs remain internal broker
capabilities:
native_semantic and systematic are mutually exclusive and disable the
multi-strategy deep-search expansion. Explicit source selections fail before a
network call when a requested retrieval mode is unsupported; automatic source
selection retains only capable providers. limit remains at most 100 per
source, so systematic means deterministic, bounded provider execution—not an
exhaustive systematic-review guarantee. Structured output and artifacts record
retrieval_mode plus per-source source_metadata (requested/provider mode,
canonical or compiled query, continuation availability, cost/rate metadata,
and warnings when available).
The public request boundary is fail-closed. limit must be an integer from 1
through 100; unknown or malformed filters / options, reversed or out-of-range
years, and unsupported ranking or output modes return a validation error before
provider I/O. In the default deep-search policy, limit is one total budget
per source divided across that source's query strategies—not limit results
for every strategy. Strategy calls use bounded global/per-source concurrency
and timeouts, and successful sources remain usable when another source times
out, is rate-limited, or fails.
PubMed, Europe PMC, Scopus, and Web of Science remain keyword-only in this release; explicit systematic requests for those sources fail before I/O instead of mislabeling a single page as systematic coverage.
See Source Contracts, Semantic Scholar, and OpenAlex for provider limits and operator data-plane boundaries.
🔬 Discovery Tools (After Finding Key Papers)
[Article discovery and citation workflow]
📚 Full Text, Figure Extraction & Export
For searches followed by close reading, unified_search(..., fulltext="prefetch")
prepares up to three eligible PMC XML articles in the background. Later
get_fulltext calls share ready/in-flight XML. Default is off; no polling or
speculative PDF/browser access. Tradeoffs and limits.
[Full text, figures, and biomedical image workflow]
get_fulltext reports coverage_status, exact sources_tried /
sources_completed, and sanitized source_errors. A usable article or link
from one source plus a failure from another is therefore partial, not a
misleading complete success or empty result. Extended PDF discovery carries the
same immutable typed coverage envelope through discovery, download, extraction,
tool output, and artifacts.
🖼️ OA Figure-First Exploration
Use the PMC Open Access path when an agent needs evidence figures, not just article text:
get_article_figures(source={"kind":"pmcid","value":"PMC12086443"})→ Figure labels, captions, image URLs, and PDF/article linksget_fulltext(source={"kind":"pmcid","value":"PMC7096777"}, include_figures=True)→ Structured fulltext with figures inline- Figure output preserves article context, so agents can connect each figure back to the sections where it is mentioned
🧬 NCBI Extended Databases
[NCBI extended biomedical data workflow]
🕰️ Research Chronicle & Lineage Tree
[Research Chronicle Architecture and Lineage Flow] [Evaluation and timeline workflow]
mermaid is the canonical combined view: a horizontal year spine (X-axis) with each
observed research line (Y-axis) branching at its earliest dated paper within the
retrieved scope. This is an explainable grouping, not a causal genealogy or a
claim about the field's true first paper. Lineages prefer MeSH descriptors and
author keywords shared by multiple papers; singleton-only or insufficient
signals trigger a warned research-stage fallback. Same-year display order is
stable, but does not assert precedence when publication precision cannot prove
it. See
Advanced Research Workflows (docs/guides/ADVANCED_RESEARCH_WORKFLOWS.md) and
docs/design/RESEARCH_CHRONICLE_REFACTOR_SPEC.md.
Chronicle Mermaid output is built from structured nodes and edges, with safe
label escaping, cycle/orphan repair, collision-resistant IDs, and bounded graph
size. It falls back from rich to safe to minimal syntax instead of failing the
whole chronicle. mermaid_validation.json records every correction, fallback,
and omitted visual item; chronicle.mmd remains pure Mermaid source.
Chronicle revisions are immutable and appended atomically. When session artifact persistence is enabled, artifact failure is surfaced explicitly while the saved Chronicle revision remains available.
Topic builds send year limits to PubMed before bounded retrieval, then preserve
the first and last observed papers while filling the cap with landmarks and
temporal spread. The audit records PubMed returned / available counts and
warns when availability is unknown or any retrieval/selection cap makes the
view non-exhaustive. PubMed errors or a scope with no article evidence do not
publish an empty revision.
Retrieval provenance separates ranking_requested from the effective
ranking. iCite ordering is claimed only when a validated citation count was
actually applied. The versioned citation-metrics coverage records complete,
partial, empty, error, and not-requested outcomes with safe counts and errors;
the audit warns or fails rather than treating an outage as zero citations.
Explicit PMID input is strict (12345678 or PMID:12345678, positive ASCII
digits, at most 20 digits); DOI or mixed text is rejected instead of being
coerced. Records without a reliable publication date appear as Undated after
dated entries and are excluded from the displayed year span. Entry IDs follow PMID/DOI evidence
identity across date or classifier corrections, and topic continuity uses one
Unicode/case/whitespace canonical key. Multi-signal papers keep one primary
branch plus explicit cross-links; overlap of 20% or more is audited as a
warning. In revision diffs, absence means not_observed_in_revision, never
conclusive retirement.
🏥 Institutional Access & ICD Conversion
[Institutional access workflow]
Resolver bases must be credential-free HTTP(S) URLs without a query or
fragment. PMID diagnosis reports resolved, not_found, or error for the
PubMed-to-DOI step, so an upstream outage is never described as a missing DOI.
💾 Session Management
[Session and pipeline workflow]
Dynamic MCP resources are also available for agents that can read resources directly:
session://context— active session statussession://last-search— latest search metadatasession://last-search/pmids— latest PMID list + CSV formsession://last-search/results— cached article payloads for the latest search
Persistent Artifacts
Persistent MCP output artifacts are saved for reusable unified_search and
get_fulltext responses when session persistence is configured. Tool responses
act like index cards: they include enough counts, source warnings, and artifact
hints for an agent to answer immediately, while the full evidence payload stays
in files that can be read repeatedly. The compact artifact locator includes
artifact_id, artifact_uri, primary_file, summary, file inventory,
read_order, audit status, and exact read_session(...) retrieval hints. Set
PUBMED_ARTIFACT_INCLUDE_LOCAL_PATHS=true only when a local MCP client should
also receive local_path and manifest_path directly.
Remote clients that cannot read the server filesystem can retrieve the same content through the session facade:
Recoverable search runs
When session management is active, every unified_search invocation receives a
stable run ID. This includes normal searches, validation/planning failures, and
inline, saved:<name>, or dry_run=true pipeline execution. Structured results
and errors attach the search_run handoff; Markdown returns the same run ID as
a compact recovery note. Normal literature-result envelopes expose two separate
machine contracts:
search_statusdescribes the bounded retrieval outcome:state(completed,empty,partial, orfailed),bounded=true,exhaustive=false, returned count, attempted/successful/failed/retryable sources, and continuation/unknown-completeness source lists.search_runis the recovery handoff: stablerun_id, journal status,recoverable, exactread_sessioninspect/replay arguments, and the artifact URI when one was committed.
The tenant-scoped search-run/v1 journal is published before provider I/O or a
terminal validation response and records the sanitized request, plan,
physical per-source or per-pipeline-step attempts, counts, safe failures,
result references, and artifact locator when applicable. It reaches a terminal
completed, partial, failed, or cancelled state; a valid zero-result
search is a completed run whose search_status.state is empty. On restart,
an unfinished started / planned / running entry is recovered once as
interrupted instead of disappearing. A non-dry-run saved pipeline additionally
keeps its PipelineStore report/run history; that is complementary to the
invocation-level search journal, not a replacement for it.
Pipeline replay preserves the original inline or saved:<name> argument plus
dry_run / stop_at. Pipeline text containing keys, tokens, cookies, passwords,
or other credential material is rejected and recorded as a failed run; provider
credentials belong in server environment/configuration, never pipeline YAML or
JSON.
replay_search only returns the original credential-free unified_search
kwargs. It never executes a network call automatically; the agent or user must
review and explicitly submit them. Provider cursor/token values are retained
as opaque provenance in source_metadata and query_strategy.json, but there
is no public cursor-resume parameter yet, so replay starts a new bounded search.
If the terminal journal write cannot be recovered, the response reports
search_run.status="history_unavailable", history_available=false, the
intended terminal status, and a warning. It deliberately omits inspect/replay
actions because durable recovery is not guaranteed; the search result itself
may still be usable.
unified_search artifacts use a research envelope. Start with audit.json for
source-count and completeness warnings, then query_strategy.json for the exact
executed plan, and finally results.json / results.toon for the complete
article list. This keeps MCP response tokens small without losing academic
traceability.
Artifacts are generated from the already-computed result object, so reading an
artifact does not rerun searches or fulltext retrieval.
If a crash occurs after an artifact directory is atomically published but
before the session index is updated, session reload discovers only complete,
checksum-indexed manifests and relinks the orphaned artifact to its search run
by search_run_id (with a conservative query match for older artifacts).
read_session redacts local filesystem paths by default; local_path and
manifest_path are server-local paths, not portable client paths. Artifacts
from get_fulltext may contain article body text, including subscription or
institutionally accessed content. Store and share them according to publisher,
license, and institutional access terms.
Large get_fulltext responses are returned inline as a preview when an artifact
is available; use the artifact locator to retrieve the saved full content.
When one source fails but the overall search can continue, JSON responses may
include source_errors; markdown responses show a Source warnings line. For
Semantic Scholar HTTP 429s, set SEMANTIC_SCHOLAR_API_KEY, retry
later, or temporarily exclude it with sources="auto,-semantic_scholar" or
PUBMED_SEARCH_DISABLED_SOURCES=semantic_scholar.
Pipeline Management
[Session and pipeline workflow]
Pipeline management uses seven single-purpose, schema-exact tools. Each tool accepts only the fields relevant to that operation, so misspelled or unrelated arguments fail closed instead of being silently ignored.
Authenticated service callers use named pipelines in their tenant-derived
store; workspace and file: access are local-only. The service Compose
profile does not execute schedules without a separately designed single leader.
Pipeline history is fail-closed: one malformed persisted run produces a safe
explicit error instead of a partial list or a false “no history” result.
Step-by-step tutorials:
👁️ Vision & Image Search
[Full text, figures, and biomedical image workflow]
Use prepare_figure_search when the user supplies an image and the agent
must interpret its meaning first. The tool returns MCP ImageContent plus
instructions for the LLM agent to extract English biomedical terms, then
continue with search_biomedical_images for similar Open-i images or
unified_search for related papers.
Open-i results carry typed per-source coverage. A valid total=0 and empty
list means no matches; a malformed response or source outage is failed, and
mixed valid/invalid rows are partial. Failed sources are excluded from
sources_used, their total stays unknown, and Markdown shows the sanitized
coverage instead of claiming “no images.”
📄 Preprint Search
Search arXiv, medRxiv, and bioRxiv preprint servers via unified_search options flags:
Source, filter, and option tokens use exact canonical spelling. Do not add whitespace around comma-separated tokens or repeat a token; aliases and case variants are rejected.
preprints: Search preprint servers and merge preprints into the main aggregated result set witharticle_type=PREPRINT.include_detected_preprints: Keep records identified by the preprint heuristic in otherwise selected scholarly sources, without adding a preprint-server crawl.
Preprint source metadata reports the provider query/window, result limit, unknown corpus total, and local year-filter counts. Unknown-year records are excluded when a hard year range is requested. medRxiv/bioRxiv use a bounded date feed with literal all-term filtering, so Boolean or grouped query syntax fails before network I/O instead of being silently reinterpreted.
Recommended combinations:
- Empty
options: Records detected as preprints are filtered. This heuristic does not prove that every remaining record was peer reviewed. options="preprints": Searches arXiv, medRxiv, and bioRxiv, then ranks/dedupes those preprints with the main results.options="include_detected_preprints": No preprint-server crawl; detected preprints already returned by selected sources are retained.
Preprint detection — articles are identified as preprints by:
- Article type from source API (OpenAlex, CrossRef, Semantic Scholar)
- arXiv ID present without PubMed ID
- Known preprint server source or journal name
- DOI prefix matching preprint servers (e.g.,
10.1101/→ bioRxiv/medRxiv,10.48550/→ arXiv)
For chronological research lineage, use build_research_chronicle; it is the
only research-chronology capability and supplies the audited timeline,
branching map, narrative, and revision history.
🧪 Clinical-Trial Registry Adjunct
ClinicalTrials.gov is never queried implicitly. Add options="clinical_trials" to a
search when a bounded registry adjunct is useful. It remains separate from the
literature-source plan, article ranking, and source counts. Markdown renders up
to three records; JSON/TOON returns the same requested adjunct as structured
data. The versioned clinical-trials-adjunct/v1 coverage records retrieval and
format status, returned count, completeness, warnings, and sanitized failures
consistently across the response and durable artifact.
📊 Count-First Orientation
unified_search can also front-load the existing source coverage and decision hints for agents that want routing help before reading the ranked list:
Example:
This mode is useful when the agent should decide whether to expand a source, inspect the lead PMID, fetch fulltext, extract figures, or pivot into timeline exploration.
⏱️ MCP Progress Reporting
When the MCP client provides a progress token, unified_search, build_research_chronicle, get_fulltext, and get_text_mined_terms emit progress updates for their major phases.
This reduces the "black box" wait time for agents during longer searches.
Progress callbacks are best-effort and have a 100 ms hard deadline. A stalled
callback is cancelled; if a broken host suppresses cancellation, its task is
quarantined in a server-owned pool capped at 32 entries so core tools remain
responsive without unbounded background work.
📋 Agent Usage Examples
1️⃣ Quick Search (Simplest)
2️⃣ PICO Clinical Question
[PICO clinical search workflow]
Simple path — unified_search can search directly (no PICO decomposition):
Agent workflow — agent-provided PICO + backend pipeline search (recommended for clinical questions):
3️⃣ Explore from Key Paper
4️⃣ Gene/Drug Research
5️⃣ Export Results
6️⃣ Preprint Search
7️⃣ Pipeline (Reusable Search Plans)
🔍 Search Mode Comparison
🤖 Claude Skills (AI Agent Workflows)
Pre-built workflow guides in .claude/skills/, divided into Usage Skills (for using the MCP server) and Development Skills (for maintaining the project):
📚 Usage Skills (11) — For AI Agents Using This MCP Server
🔧 Development Skills (15) — For Project Contributors
📁 Location:
.claude/skills/*/SKILL.md(Claude Code-specific, and the single source of truth for repo skills) Do not mirror or split repo skills into.github/skills/. These repo skills are project-scoped and should remain version-controlled. Personal cross-project skills belong in a user directory such as~/.copilot/skills/or~/.claude/skills/, not in this repository.
Research skill installation preserves existing customizations. See the installation and upgrade policy. Contributors run the full local gate before push; ordinary CI runs a smaller independent smoke gate.
The completed ten-phase core review covers all 223 Python files in src/pubmed_search/: 456 classes and 2,445 functions/methods/nested functions. Each of the 2,901 definitions has a recorded decision, evidence, and current file SHA-256; none are pending or stale. This is an authored self-review, separate from test results. Recheck the current tree with uv run python scripts/perf/symbol_inventory.py --require-reviewed src/; subsequent source edits invalidate affected reviews. Tests and scripts are inventoried but are outside this complete core-review claim.
Real MCP Regression Gate
Every one of the 41 public tools is called through the MCP protocol over source-tree stdio, Streamable HTTP, and stdio from a freshly installed wheel. The wheel path imports server code exclusively from its blank virtual environment; the external fixture supplies only deterministic provider seams. The deterministic child server replaces external-provider boundaries; registry, schemas, application services, persistence, artifacts, Chronicle revisions, pipelines, and scheduling remain real. The opt-in extended CI also renders the exact Chronicle and citation Mermaid sources returned over MCP with pinned Mermaid 11.16.1, so presentation-layer syntax damage fails the gate. An additional real-stdio rejection pass confirms that retired tool names, legacy flat request shapes, ambiguous scalar values, and malformed containers remain rejected.
See the Developer Guide for the test architecture, CI gates, and live-provider boundary.
🏗️ Architecture (DDD)
This project uses Domain-Driven Design (DDD) architecture, with literature research domain knowledge as the core model.
Internal Mechanisms (Transparent to Agent)
Vocabulary Translation Layer (Key Feature)
Our Core Value: We are the intelligent middleware between Agent and Search Engines, automatically handling vocabulary standardization so Agent doesn't need to know each database's terminology.
Different data sources use different controlled vocabulary systems. This server provides automatic conversion:
Automatic ICD → MeSH Conversion
When searching with ICD codes (e.g., I10 for Hypertension), unified_search() automatically:
- Detects ICD-10/ICD-9 patterns via
detect_and_expand_icd_codes() - Looks up corresponding MeSH terms from internal mapping (
ICD10_TO_MESH,ICD9_TO_MESH) - Expands query with MeSH synonyms for comprehensive search
📖 Full architecture documentation: ARCHITECTURE.md
MeSH Auto-Expansion + Query Analysis
When calling generate_search_queries("remimazolam sedation"), internally it:
- ESpell Correction - Fix spelling errors
- MeSH Query -
Entrez.esearch(db="mesh")to get standard vocabulary - Synonym Extraction - Get synonyms from MeSH Entry Terms
- Query Analysis - Analyze how PubMed interprets each query
Value of Query Analysis: Agent thinks
remimazolam AND sedationonly searches these two words, but PubMed actually expands to Supplementary Concept + synonyms, results go from 8 to 561. This helps Agent understand the difference between intent and actual search.
🔒 Local HTTPS Demo and Service Deployment
The bundled self-signed certificates and curl -k flow are a local TLS demo,
not a production security profile. For a shared service, use the authenticated
service Compose file and a trusted certificate as described in
DEPLOYMENT.md.
Local HTTPS Smoke Test
HTTPS Endpoints
Remote MCP Client Configuration
🏢 Microsoft Copilot Studio Integration
Integrate PubMed Search MCP with Microsoft 365 Copilot (Word, Teams, Outlook)!
Quick Start
Copilot Studio Configuration
📖 Full documentation: copilot-studio/README.md
Use
pubmed-search-mcp-http --copilot-compatiblefor packaged Copilot HTTP semantics.run_server.pyremains a source-tree development wrapper;run_copilot.pyis a loopback-only smoke launcher for the same canonical 41-tool strict registry, not a second compatibility surface. The tunnel script requires an assignedNGROK_DOMAIN, refuses occupied backend ports, and publishes only after--mode servicepasses readiness and unauthenticated-rejection checks.⚠️ Note: SSE transport deprecated since Aug 2025. Use
streamable-http.
📖 More documentation:
- Architecture → ARCHITECTURE.md
- Pipeline tutorial (English) → docs/guides/PIPELINE_MODE_TUTORIAL.en.md
- Pipeline tutorial (zh-TW) → docs/guides/PIPELINE_MODE_TUTORIAL.md
- Deployment guide → DEPLOYMENT.md
- Copilot Studio → copilot-studio/README.md
🔐 Security
Security Features
See DEPLOYMENT.md for detailed deployment instructions.
📤 Export Formats
[Export and local notes workflow]
Export your search results in formats compatible with major reference managers:
Exported Fields
- Core: PMID, Title, Authors, Journal, Year, Volume, Issue, Pages
- Identifiers: DOI, PMC ID, ISSN
- Content: Abstract (HTML tags cleaned)
- Metadata: Language, Publication Type, Keywords
- Access: DOI URL, PMC URL, Full-text availability
Special Character Handling
- BibTeX exports use pylatexenc for proper LaTeX encoding
- Nordic characters (ø, æ, å), umlauts (ü, ö, ä), and accents are correctly converted
- Example:
Søren Hansen→S{\o}ren Hansen
📚 Citation
The publication workspace contains the rewritten manuscript, reviewed references, evidence map and local PDF/arXiv source build. It is a working draft without an arXiv identifier; cite the released software below. Author: Tz-Ping Gau, Kaohsiung Medical University Hospital.
GitHub will show Cite this repository from CITATION.cff. If you use PubMed Search MCP in research, methods sections, or internal technical reports, prefer the GitHub-generated citation or reuse the repository metadata directly.
📄 License
Apache License 2.0 - see LICENSE
🔗 Links
來源:README.md,提交 d8ddc6a
工具
0版本歷史
1- v0.8.0最新Oct 20, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。