PyNCBI documentation
PyNCBI is a programmatic, AI-agent-ready Python engine, CLI (pyncbi) and Model Context
Protocol server (pyncbi mcp) for NCBI: GEO (Series, Samples, Platforms, DataSets), Entrez
search with pagination, PubMed abstracts and PMC full-text Methods, Gene and platform annotation,
SRA runs and FASTQ files, BioSample / BioProject / Taxonomy records, ClinVar and dbSNP variants,
and genome assemblies via NCBI Datasets — using only the Python standard library, with no third-party runtime dependencies.
Guides
- Quickstart
- Additional workflows
- Data and output contracts
- Configuration
- Migrating to 1.0
- Release validation and hosting
- Using PyNCBI from AI agents
- CLI Reference
pyncbi searchpyncbi inspectpyncbi samplespyncbi previewpyncbi filespyncbi downloadpyncbi pubmedpyncbi genepyncbi srapyncbi fastapyncbi linkpyncbi gplpyncbi variantpyncbi clinvarpyncbi bundlepyncbi taxonomypyncbi fastqpyncbi genomepyncbi gdspyncbi metadatapyncbi schemapyncbi expressionpyncbi screenpyncbi blastpyncbi cachepyncbi skillpyncbi statuspyncbi mcp
API Reference
- PyNCBI Package Reference
- Top-Level Package (PyNCBI)
- Core Subpackage (PyNCBI.core)
- Domains Subpackage (PyNCBI.domains)
- GEO Objects Subpackage (PyNCBI.geo)
- I/O Subpackage (PyNCBI.io)
- Metadata Subpackage (PyNCBI.metadata)
- Parsing Subpackage (PyNCBI.parsing)
- Domain Modules
- Sessions (PyNCBI.session)
- MCP Server Modules (PyNCBI.mcp)
- CLI Modules (PyNCBI.cli)
Installation
pip install PyNCBI
Optional: set NCBI_API_KEY for 10 requests/second (default 3) and PYNCBI_AGENT_MODE=1
for machine-oriented output (no progress bars or colors).