Python Wrapper Class for Europe PMC API to search and retrieve scientfic literature
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Mature repo (>1y old)
- ✓Documented (README)
- !README contains suspicious pattern: eval\s*\(
claude mcp add pyeuropepmc -- python -m pyeuropepmc{
"mcpServers": {
"pyeuropepmc": {
"command": "python",
"args": ["-m", "pyeuropepmc"]
}
}
}Resumen de MCP Servers
# PyEuropePMC
[](https://pypi.org/project/pyeuropepmc/)
[](https://pypi.org/project/pyeuropepmc/)
[](https://pypi.org/project/pyeuropepmc/)
[](https://opensource.org/licenses/MIT)
[](https://jonasheinickebio.github.io/pyEuropePMC/)
[](src/pyeuropepmc/mcp/README.md)
## 🔄 Build Status
[](https://github.com/JonasHeinickeBio/pyEuropePMC/actions/workflows/cdci.yml)
[](https://github.com/JonasHeinickeBio/pyEuropePMC/actions/workflows/unit-tests.yml)
[](https://github.com/JonasHeinickeBio/pyEuropePMC/actions/workflows/python-compatibility.yml)
[](https://github.com/JonasHeinickeBio/pyEuropePMC/actions/workflows/deploy-docs.yml)
[](https://github.com/JonasHeinickeBio/pyEuropePMC/security/code-scanning)
[](https://codecov.io/gh/JonasHeinickeBio/pyEuropePMC)
> Badges above are live — each links to its own workflow run or dashboard, so
> this section can never drift out of sync with reality the way a hand-typed
> "200+ tests passed" badge would. `CodeQL` is GitHub's default-setup code
> scanning (not a workflow file in this repo), so it links to the
> [alerts page](https://github.com/JonasHeinickeBio/pyEuropePMC/security/code-scanning)
> rather than a per-commit pass/fail badge.
**PyEuropePMC** is a robust Python toolkit for automated search, extraction, and analysis of scientific literature from [Europe PMC](https://europepmc.org/).
## ✨ Key Features
- 🔍 **Comprehensive Search API** - Query Europe PMC with advanced search options
- 🎯 **Advanced Query Builder** - Fluent API for building complex search queries with type safety
- 📄 **Full-Text Retrieval** - Download PDFs, XML, and HTML content from open access articles
- 🔬 **XML Parsing & Conversion** - Parse full text XML and convert to plaintext, markdown, extract tables and metadata
- 🏷️ **Text-Mining Annotations** - Retrieve and parse entity annotations, sentences, and relationships (genes, diseases, chemicals)
- 📊 **Multiple Output Formats** - JSON, XML, Dublin Core (DC)
- 📦 **Bulk FTP Downloads** - Efficient bulk PDF downloads from Europe PMC FTP servers
- 🔄 **Smart Pagination** - Automatic handling of large result sets
- 🛡️ **Robust Error Handling** - Built-in retry logic and connection management
- 🧑💻 **Type Safety** - Extensive use of type annotations and validation
- ⚡ **Rate Limiting** - Respectful API usage with configurable delays
- 🧪 **Extensively Tested** - 5,000+ tests; live coverage in the [codecov badge](https://codecov.io/gh/JonasHeinickeBio/pyEuropePMC) above
- 📋 **Systematic Review Tracking** - PRISMA-compliant search logging and audit trails
- 📈 **Advanced Analytics** - Publication trends, citation analysis, quality metrics, and duplicate detection
- 📉 **Rich Visualizations** - Interactive plots and dashboards using matplotlib and seaborn
- 🔗 **External API Enrichment** - Enhance metadata with CrossRef, Unpaywall, Semantic Scholar, and OpenAlex
- 🤖 **MCP Server** - 24 tools over the official [Model Context Protocol SDK](https://github.com/modelcontextprotocol/python-sdk) (stdio, streamable-http, and sse transports) for LLMs and AI agents
## 📁 Project Structure
The repository is organized as follows:
- `src/pyeuropepmc/` - Main package source code
- `tests/` - Unit and integration tests
- `docs/` - Documentation and guides
- `examples/` - Example scripts and usage demonstrations
- `benchmarks/` - Performance benchmarking scripts and results
- `data/` - Downloads, outputs, and generated data files
- `conf/` - Configuration files for RDF mapping and other settings
## 🚀 Quick Start
### Installation
```bash
pip install pyeuropepmc # light core
pip install "pyeuropepmc[all]" # everything (1.x-equivalent)
pip install "pyeuropepmc[analytics,agentic]" # pick what you need
```
> **Upgrading from 1.x?** See [docs/migration/v1-to-v2.md](docs/migration/v1-to-v2.md).
### Basic Usage
```python
from pyeuropepmc import SearchClient
# Search for papers
with SearchClient() as client:
results = client.search("CRISPR gene editing", pageSize=10)
for paper in results["resultList"]["result"]:
print(f"Title: {paper['title']}")
print(f"Authors: {paper.get('authorString', 'N/A')}")
print("---")
```
### Advanced Search with QueryBuilder
```python
from pyeuropepmc import QueryBuilder
# Build complex queries with fluent API
qb = QueryBuilder()
query = (qb
.keyword("cancer", field="title")
.and_()
.keyword("immunotherapy")
.and_()
.date_range(start_year=2020, end_year=2023)
.and_()
.citation_count(min_count=10)
.build())
print(f"Generated query: {query}")
# Output: (TITLE:cancer) AND immunotherapy AND (PUB_YEAR:[2020 TO 2023]) AND (CITED:[10 TO *])
```
### Advanced Search with Parsing
```python
# Search and automatically parse results
papers = client.search_and_parse(
query="COVID-19 AND vaccine",
pageSize=50,
sort="CITED desc"
)
for paper in papers:
print(f"Citations: {paper.get('citedByCount', 0)}")
print(f"Title: {paper.get('title', 'N/A')}")
```
### Full-Text Content Retrieval
```python
from pyeuropepmc import FullTextClient
# Initialize full-text client
fulltext_client = FullTextClient()
# Download PDF
pdf_path = fulltext_client.download_pdf_by_pmcid("PMC1234567", output_dir="./downloads")
# Download XML
xml_content = fulltext_client.download_xml_by_pmcid("PMC1234567")
# Bulk FTP downloads
from pyeuropepmc import FTPDownloader
ftp_downloader = FTPDownloader()
results = ftp_downloader.bulk_download_and_extract(
pmcids=["1234567", "2345678"],
output_dir="./bulk_downloads"
)
```
### Full-Text XML Parsing
Parse full text XML files and extract structured information:
```python
from pyeuropepmc import FullTextClient, FullTextXMLParser
# Download and parse XML
with FullTextClient() as client:
xml_path = client.download_xml_by_pmcid("PMC3258128")
# Parse the XML
with open(xml_path, 'r') as f:
parser = FullTextXMLParser(f.read())
# Extract metadata
metadata = parser.extract_metadata()
print(f"Title: {metadata['title']}")
print(f"Authors: {', '.join(metadata['authors'])}")
# Convert to different formats
plaintext = parser.to_plaintext() # Plain text
markdown = parser.to_markdown() # Markdown format
# Extract tables
tables = parser.extract_tables()
for table in tables:
print(f"Table: {table['label']} - {len(table['rows'])} rows")
# Extract references
references = parser.extract_references()
print(f"Found {len(references)} references")
```
### Text-Mining Annotations
Retrieve and parse entity annotations, sentences, and relationships from scientific literature:
```python
from pyeuropepmc import AnnotationsClient, parse_annotations
# Initialize annotations client
with AnnotationsClient() as client:
# Get annotations for specific articles
annotations = client.get_annotations_by_article_ids(
article_ids=["PMC3359311"],
section="abstract" # or "fulltext", "all"
)
# Parse annotations to extract structured data
parsed = parse_annotations(annotations)
print(f"Found {len(parsed['entities'])} entities")
print(f"Found {len(parsed['relationships'])} relationships")
# Display entities by type
for entity in parsed['entities'][:5]:
print(f"{entity['name']} ({entity['type']})")
# Search for specific entities (e.g., chemicals)
entity_annotations = client.get_annotations_by_entity(
entity_id="CHEBI:16236", # Ethanol
entity_type="CHEBI",
page_size=20
)
# Filter by annotation provider
provider_annotations = client.get_annotations_by_provider(
provider="Europe PMC",
annotation_type="Disease"
)
```
**Supported Entity Types:**
- 🧬 Genes and proteins
- 🦠 Diseases and conditions
- 🧪 Chemicals and drugs (CHEBI)
- 🔬 Gene Ontology terms
- 🌱 Organisms and species
- 🔗 Entity relationships
See [examples/10-annotations](examples/10-annotations/) for detailed examples.
### Advanced Analytics and Visualization
Analyze search results with built-in analytics and create visualizations:
```python
from pyeuropepmc import (
SearchClient,
to_dataframe,
citation_statistics,
quality_metrics,
remove_duplicates,
plot_publication_years,
create_summary_dashboard,
)
# Search and convert to DataFrame
with SearchClient() as client:
response = client.search("machine learning", pageSize=100)
papers = response.get("resultList", {}).get("result", [])
# Convert to pandas DataFrame for analysis
df = to_dataframe(papers)
# Remove duplicates
df = remove_duplicates(df, method="title", keep="most_cited")
# Get citation statistics
stats = citation_statistics(df)
print(f"Mean citations: {stats['mean_citations']:.2f}")
print(f"Highly cited (top 10%): {stats['citation_distribution']['90th_percenLo que la gente pregunta sobre pyEuropePMC
¿Qué es JonasHeinickeBio/pyEuropePMC?
+
JonasHeinickeBio/pyEuropePMC es mcp servers para el ecosistema de Claude AI. Python Wrapper Class for Europe PMC API to search and retrieve scientfic literature Tiene 8 estrellas en GitHub y su última actualización registrada es del 2026-09-15.
¿Cómo se instala pyEuropePMC?
+
Puedes instalar pyEuropePMC clonando el repositorio (https://github.com/JonasHeinickeBio/pyEuropePMC) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar JonasHeinickeBio/pyEuropePMC?
+
Nuestro agente de seguridad ha analizado JonasHeinickeBio/pyEuropePMC y le ha asignado un Trust Score de 82/100 (tier: Trusted). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene JonasHeinickeBio/pyEuropePMC?
+
JonasHeinickeBio/pyEuropePMC es mantenido por JonasHeinickeBio. La última actividad registrada en GitHub es del 2026-09-15, con 14 issues abiertos.
¿Hay alternativas a pyEuropePMC?
+
Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.
Despliega pyEuropePMC en tu cloud
Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.
¿Mantienes este repo? Añade un badge a tu README
Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.
[](https://claudewave.com/repo/jonasheinickebio-pyeuropepmc)<a href="https://claudewave.com/repo/jonasheinickebio-pyeuropepmc"><img src="https://claudewave.com/api/badge/jonasheinickebio-pyeuropepmc" alt="Featured on ClaudeWave: JonasHeinickeBio/pyEuropePMC" width="320" height="64" /></a>Más MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ
The fastest path to AI-powered full stack observability, even for lean teams.