Metadata-Version: 2.5
Name: pubmed-search-mcp
Version: 0.10.0
Summary: MCP SDK v2 server for PubMed and multi-source biomedical literature research
Project-URL: Homepage, https://github.com/u9401066/pubmed-search-mcp
Project-URL: Repository, https://github.com/u9401066/pubmed-search-mcp
Project-URL: Issues, https://github.com/u9401066/pubmed-search-mcp/issues
Author-email: u9401066 <u9401066@gap.kmu.edu.tw>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: entrez,literature,mcp,medical,model-context-protocol,ncbi,pubmed,research,search
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Requires-Python: >=3.10
Requires-Dist: anyio<5,>=4.9
Requires-Dist: apscheduler<4,>=3.10.4
Requires-Dist: biopython<2,>=1.81
Requires-Dist: cachetools>=5.0.0
Requires-Dist: defusedxml>=0.7.1
Requires-Dist: fastapi>=0.128.0
Requires-Dist: httpx>=0.28.1
Requires-Dist: mcp<3,>=2.0
Requires-Dist: pydantic-settings<3,>=2.10
Requires-Dist: pydantic<3,>=2.12
Requires-Dist: pylatexenc>=2.10
Requires-Dist: pywin32>=311; sys_platform == 'win32'
Requires-Dist: pyyaml>=6.0
Requires-Dist: starlette<2,>=1.2
Requires-Dist: toons>=0.5.4
Requires-Dist: typing-extensions>=4.12
Provides-Extra: browser-broker
Requires-Dist: playwright>=1.52.0; extra == 'browser-broker'
Provides-Extra: institutional
Requires-Dist: trafilatura>=1.12; extra == 'institutional'
Provides-Extra: scripts
Requires-Dist: requests>=2.28.0; extra == 'scripts'
Description-Content-Type: text/markdown

# PubMed Search MCP

<!-- mcp-name: io.github.u9401066/pubmed-search-mcp -->

[繁體中文](README.zh-TW.md) · [Documentation site](https://u9401066.github.io/pubmed-search-mcp/) · [Release history](CHANGELOG.md)

An agent plugin for biomedical literature research. The host agent chooses a search strategy, follows citations and records what it read. The MCP server queries providers and keeps identifiers, search runs and evidence artifacts. A colleague using the same research workspace can pick up the outstanding reading.

The PubMed search code can be traced to November 25, 2025 in `med-paper-assistant`. GitHub records December 2, 2025 as the creation date of this repository. The first PyPI distribution followed on December 8. [Project history and primary records](docs/publication/README.md#project-history)

![How an agent explores, expands, examines and explains a literature question](docs/images/research-workflow.svg)

## Quick install

| Choose a version | Start here |
| --- | --- |
| Published v0.10.0 | Configure the client's stdio command as `uvx`, with `pubmed-search-mcp@0.10.0` as its argument. Set `NCBI_EMAIL` to your research contact. The release exposes **42 MCP Tools**, including a persistent research workspace. |
| Development checkout | Build the plugin from this checkout with the command below to test local changes. |

```sh
uv run --frozen python scripts/build_agent_plugin.py --dev-output build/pubmed-research-plugin
```

Select the generated directory in your agent's plugin installer. Keep the checkout available. The generated launcher uses this source tree. The version-pinned launcher in `plugins/pubmed-search/` uses the published package. [Client configurations and plugin installation](docs/guides/INTEGRATIONS.md)

Four blinded review cases tested whether MeSH previews improve search decisions. [Methods, screening costs and results](docs/reports/mesh-preflight-2017/README.md)

## Start with a research question

For example, ask the agent to trace the early development of cochlear implants and leave the next paper to read for a colleague. Choose a workflow before memorizing 42 tool names.

| Research task | What the agent can do |
| --- | --- |
| Define the scope | Expand MeSH and synonyms, validate agent-supplied PICO, or compare which papers a Boolean condition excludes. [PubMed combination example](docs/guides/TOOLS_USAGE_GUIDE.md#compare-pubmed-concept-blocks) |
| Search and extend | Search several providers, inspect per-source failures, then follow related papers, references or citing articles. [User guide](docs/guides/USER_GUIDE.md) |
| Read and verify | Inspect an abstract, an available full-text passage, figures or bibliography matches. Use `diagnose_institutional_access` for a configured resolver. Record the source and what was actually read. [Tool guide](docs/guides/TOOLS_USAGE_GUIDE.md) |
| Reuse a review strategy | Save a PICO or citation-expansion pipeline, run it again and inspect its history. Eligibility screening and statistical pooling remain researcher tasks. [Pipeline tutorial](docs/guides/PIPELINE_MODE_TUTORIAL.en.md) |
| Explore research history | Review dated Chronicle branches, landmarks, earlier alternatives and revision differences. [Historical case and workspace handoff](docs/guides/ADVANCED_RESEARCH_WORKFLOWS.md) |
| Share results | Export citations or notes, record source identifiers and leave an open action. The host can cross-check an authorized local Zotero library. [Capability inventory and evidence](docs/README.md#capability-inventory) |

For each of the 16 registry categories, see the implementation evidence and remaining limits in the [inventory](docs/README.md#capability-inventory). The [tool-by-tool audit](docs/research/TOOL_QUALITY_AUDIT.md) and [generated index](src/pubmed_search/presentation/mcp_server/TOOLS_INDEX.md) give individual contracts.

## Search limits and recovery

Generic literature discovery uses exactly one MCP entry point, `unified_search`. A source's result budget is divided across that source's query strategies. Inspect `search_status` and the run artifact before interpreting a small or empty result. OA identifiers, authorized institutional access and local copies determine which full-text passages can be read.

The `search-run/v1` journal also covers inline, `saved:<name>`, or `dry_run=true` pipeline execution. Use `read_session(request={"action":"replay_search","run_id":"..."})` to recover the original credential-free arguments. There is no public cursor-resume parameter yet. Submitting the recovered request starts a new search. A reply with `search_run.status="history_unavailable"` has no guaranteed durable replay. [Recovery and artifact formats](docs/guides/TOOLS_USAGE_GUIDE.md)

## Configuration

| Runtime | State and access |
| --- | --- |
| stdio or loopback HTTP | Trusted single-user deployment with a durable `default` tenant. The HTTP entry point is `pubmed-search-mcp-http --mode local --host 127.0.0.1`. |
| Authenticated service | `--mode service` fails closed without a bearer principal. Authenticated callers cannot load `file:` pipelines or choose a server-host note path. The service Compose scheduler is disabled. [Deployment](DEPLOYMENT.md) |
| Copilot Studio | Set `PUBMED_AUTH_TOKENS` and an assigned `NGROK_DOMAIN` before using `scripts/start-copilot-studio.sh --with-ngrok`. The local smoke launcher exercises the same canonical 42-tool strict registry. [Copilot integration](copilot-studio/README.md) |

Modern 2026-07-28 clients use MCP SDK v2 requests. Python applications can call `pubmed_search.api` directly. The optional `pubmed-browser-fetch-broker` runs on a machine with an authorized browser session. [Integration guide](docs/guides/INTEGRATIONS.md) · [Python facade](docs/design/PYTHON_SDK_AND_HTTP_CLI_DESIGN.md)

## Skills and development

**Usage Skills (12)** are shipped with the release plugin. **Development Skills (15)** stay in the repository for contributors. [Plugin skills](plugins/pubmed-search/skills/) · [Architecture](ARCHITECTURE.md) · [Testing](docs/development/TESTING.md) · [Contributing](CONTRIBUTING.md)

## Citation and license

We welcome patches, reproducible search cases, historically sourced Chronicle corrections and documentation updates. Include the version or commit you used and the observation you want someone else to reproduce. [Contribution guide](CONTRIBUTING.md) · [Issues](https://github.com/u9401066/pubmed-search-mcp/issues)

The software is distributed under Apache License 2.0. When redistributing it, include the license, retain applicable notices and mark files you change. Articles, figures and datasets retrieved through the tools remain subject to their source terms. [License text](LICENSE)

Cite the software version used, and the commit for a branch experiment. Cite original papers for research claims. The manuscript is a working draft. [Software citation](CITATION.cff) · [Manuscript and evaluation](docs/publication/README.md) · [Apache License 2.0](LICENSE)
