Metadata-Version: 2.4
Name: nature-academic-search
Version: 0.1.0
Summary: Academic literature search and citation workflows for PubMed, CrossRef, and arXiv
Project-URL: Homepage, https://github.com/wp-a/nature-academic-search
Project-URL: Issues, https://github.com/wp-a/nature-academic-search/issues
Project-URL: Repository, https://github.com/wp-a/nature-academic-search
Author: wp-a
License: MIT License
        
        Copyright (c) 2026 wp-a
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: academic-search,arxiv,citation,crossref,mcp,pubmed
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT 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 :: Information Analysis
Requires-Python: >=3.10
Requires-Dist: mcp<2,>=1.27
Requires-Dist: requests<3,>=2.28
Requires-Dist: toml<1,>=0.10.2
Provides-Extra: test
Requires-Dist: build<2,>=1.3; extra == 'test'
Requires-Dist: pytest<10,>=8; extra == 'test'
Requires-Dist: pyyaml<7,>=6; extra == 'test'
Requires-Dist: ruff<1,>=0.12; extra == 'test'
Requires-Dist: tomli<3,>=2; (python_version < '3.11') and extra == 'test'
Requires-Dist: twine<7,>=6; extra == 'test'
Description-Content-Type: text/markdown

# Nature Academic Search

[![CI](https://github.com/wp-a/nature-academic-search/actions/workflows/ci.yml/badge.svg)](https://github.com/wp-a/nature-academic-search/actions/workflows/ci.yml)
[![PyPI](https://img.shields.io/pypi/v/nature-academic-search.svg)](https://pypi.org/project/nature-academic-search/)
[![Python](https://img.shields.io/pypi/pyversions/nature-academic-search.svg)](https://pypi.org/project/nature-academic-search/)

面向 Codex 和 Claude Code 的学术检索技能与 MCP 服务。统一搜索 PubMed、
CrossRef 和 arXiv，解析 DOI/PMID/arXiv ID，构建 MeSH 检索式，并导出
RIS、BibTeX、NBIB 或 ENW。

## 主要能力

- 多源并发检索，按 DOI、PMID、arXiv ID、标题与年份去重
- 保留来源追踪和单数据源失败信息
- DOI、PMID、arXiv ID 自动识别与元数据核验
- APA、Nature、IEEE、Vancouver 等引用格式
- PubMed MeSH 词表查询
- Codex 与 Claude Code 插件和安装器

## PyPI 安装

推荐使用隔离工具环境：

```bash
uv tool install nature-academic-search
nature-academic-search install --client both --email researcher@example.com
```

也可使用 `pipx install nature-academic-search`。不要使用全局 `pip install`。

从仓库安装并保留旧命令兼容：

```bash
bash install.sh researcher@example.com
```

## 插件安装

Codex：

```bash
codex plugin marketplace add wp-a/nature-academic-search
codex plugin add nature-academic-search@wp-a-academic-tools
```

Claude Code：

```bash
claude plugin marketplace add wp-a/nature-academic-search
claude plugin install nature-academic-search@wp-a-academic-tools
```

插件通过 `uvx` 启动固定版本的 PyPI MCP 服务。启动客户端前设置
`PUBMED_EMAIL`；`NCBI_API_KEY` 可选。

```bash
export PUBMED_EMAIL=researcher@example.com
export NCBI_API_KEY=optional-key
```

详见 [安装说明](docs/installation.md)。

## CLI

```bash
nature-academic-search --help
nature-academic-search serve
nature-academic-search preflight
nature-academic-search citation --pmid 28344011 --format ris
nature-academic-search citation --input refs.txt --format bib --output references/
```

MCP 保留四个稳定工具名：

| Tool | Purpose |
|---|---|
| `search_papers` | Search one or more sources and deduplicate results |
| `get_paper_by_id` | Resolve DOI, PMID, or arXiv metadata |
| `get_citation` | Format one verified citation |
| `lookup_mesh` | Find PubMed MeSH descriptors |

## 开发

```bash
python -m pip install -e ".[test]"
python -m pytest
python -m pytest mcp-server/tests
python -m build
twine check dist/*
```

发布与维护流程见 [维护手册](docs/maintenance.md)。

## License

MIT
