BioMCP MCP Server: PubMed, ClinicalTrials, MyVariant
Access the MCP server to search PubMed, ClinicalTrials.gov, and MyVariant.info for biomedical research insights.
npx -y @genomoncology/biomcpOverview
The BioMCP MCP Server exposes biomedical search and annotation services through the Model Context Protocol (MCP). It aggregates three commonly used biomedical data sources — PubMed (literature), ClinicalTrials.gov (trials), and MyVariant.info (variant annotations) — and presents results in a consistent, machine-friendly MCP JSON format. This makes it easier to incorporate authoritative biomedical context into downstream applications such as retrieval-augmented generation, evidence citation layers, dashboards, and analysis pipelines.
For developers, the server simplifies access to multiple APIs behind a single interface and normalizes their outputs so LLMs, search clients, or indexing components can consume them consistently. The server is lightweight, can be hosted locally or in a container, and supports optional API keys and simple caching to reduce downstream rate limiting and latency.
Features
- Unified REST API that proxies PubMed, ClinicalTrials.gov, and MyVariant.info
- MCP-compliant JSON responses (metadata + content fragments suitable for context windows)
- Optional caching to reduce rate limits and improve performance
- Simple configuration via environment variables or Docker
- Endpoints for text-based search and identifier-based lookup
- Designed to integrate with RAG pipelines, search layers, or clinical/variant tools
Installation / Configuration
Clone and run locally (Python/uvicorn example)
# run (example)
Docker (build + run)
Common environment variables
- NCBI_API_KEY — optional NCBI/Entrez API key to increase PubMed throughput
- CACHE_TTL — integer seconds to cache API responses (default 0 = no cache)
- HOST — bind address (default: 0.0.0.0)
- PORT — port to listen on (default: 8080)
- MYVARIANT_BASE — override MyVariant.info base URL (optional)
If you expect heavy usage, provide an NCBI API key and configure a cache backend (Redis) where supported.
Available Resources
The server exposes simple endpoints to perform searches and lookups. Example endpoints:
| Path | Method | Description | Important query params |
|---|---|---|---|
| /mcp/search | GET | Search across a single source | source (pubmed |
| /mcp/lookup | GET | Lookup by identifier | source, id |
| /mcp/health | GET | Server health check | — |
Example: search PubMed for a phrase
Example: lookup a variant in MyVariant.info
Response format
- The API returns MCP-style JSON objects. Each result includes:
- id: stable identifier (e.g., PubMed ID, NCT number, variant ID)
- title / snippet: short human-readable headline
- text: longer textual fragment suitable for model context
- metadata: source-specific fields (authors, journal, dates, variants annotations)
- provenance: URL and raw API source reference
A minimal example result (abridged):
Use Cases
- Literature retrieval for RAG workflows: Query PubMed through the MCP server to collect succinct abstracts and metadata, then feed those fragments as context to an LLM for evidence-supported answers.
- Clinical trial discovery: Search ClinicalTrials.gov for trials matching disease names, biomarkers, or interventions and include trial summaries and recruitment statuses in downstream applications.
- Variant annotation: Use MyVariant.info lookups to retrieve aggregated variant annotations (clinically significant predictions, allele frequencies, gene context) and incorporate the normalized annotations into variant interpretation pipelines.
- Multisource citation assembly: Combine PubMed abstracts, trial summaries, and variant annotations to produce consolidated, MCP-formatted context blocks for clinical decision support or research summaries.
- Indexing and vectorization: Use the consistent MCP JSON output to build an indexing pipeline that stores text fragments and metadata into a vector database for semantic search.
Notes and best practices
- Be mindful of upstream API rate limits (NCBI Entrez and ClinicalTrials endpoints); configure an API key and caching where available.
- Normalize search queries (escape special characters) and paginate large result sets.
- Inspect provenance fields before surfacing results in clinical contexts; always display original sources and identifiers for traceability.
For additional examples and advanced configuration, consult the repository README and example clients in the project.