Skip to main content

A Model Context Protocol server for querying ClinVar genomic data.

Project description

GenomeMCP

AI-powered genomic intelligence through the Model Context Protocol

Python 3.10+ MCP License: MIT ClinVar gnomAD Reactome Deploy on Railway

GenomeMCP is a research-grade Model Context Protocol (MCP) server that enables AI agents to query clinical genomics databases, retrieve supporting scientific literature, analyze population genetics, and visualize biological pathways โ€” all in real-time.


๐Ÿ–ฅ๏ธ CLI Tool

GenomeMCP includes a beautiful command-line interface with rich formatting and an interactive TUI mode.

Quick Install

# Recommended (any platform with Python)
pipx install genomemcp

# macOS (Homebrew)
brew install nexisdev/tap/genomemcp

# Windows (Scoop)
scoop bucket add genomemcp https://github.com/nexisdev/scoop-genomemcp
scoop install genomemcp

# From source
git clone https://github.com/nexisdev/GenomeMCP.git
cd GenomeMCP && ./install.sh

Standalone binaries available on GitHub Releases.

CLI Commands

genomemcp search BRCA1              # ๐Ÿ” Search ClinVar
genomemcp variant 12345             # ๐Ÿ“‹ Get variant report
genomemcp gene TP53                 # ๐Ÿงฌ Get gene info
genomemcp pathway EGFR --visualize  # ๐Ÿ”ฌ Pathway analysis
genomemcp population 1-55516888-G-GA # ๐Ÿ‘ฅ gnomAD frequencies
genomemcp discover "Lynch Syndrome" # ๐Ÿ”— Discover related genes
genomemcp tui                       # ๐Ÿ–ฅ๏ธ Interactive mode

Theme Options

genomemcp --theme cyberpunk search BRCA1
genomemcp --theme professional gene TP53
genomemcp --theme minimal pathway EGFR

See CLI Guide for complete documentation.


๐ŸŽฏ Why GenomeMCP?

Problem GenomeMCP Solution
AI agents lack genomic knowledge Direct ClinVar, gnomAD, Reactome integration
No evidence for clinical claims Auto-retrieves PubMed abstracts
Variant interpretation is complex Population frequency + pathway context
Gene-disease links are opaque Automatic relationship discovery

๐Ÿงฌ Features

Core Genomics Tools

  • search_clinvar(term) โ€” Query ClinVar for genes, variants, or diseases
  • get_variant_report(id) โ€” Detailed clinical significance report
  • get_gene_info(symbol) โ€” Gene function, location, and aliases from NCBI Gene
  • get_supporting_literature(id) โ€” PubMed articles linked to a variant

Population Genetics

  • get_population_stats(variant) โ€” Allele frequency from gnomAD (Genome Aggregation Database)

Pathway Analysis

  • get_pathway_info(gene) โ€” Reactome biological pathways for a gene
  • visualize_pathway(gene) โ€” Generate Mermaid.js diagrams of gene-pathway relationships

Discovery & Synthesis

  • find_related_genes(phenotype) โ€” Discover genes associated with a disease
  • get_genomic_context(gene, position) โ€” Identify exon vs intron regions
  • get_discovery_evidence(phenotype) โ€” Aggregate PubMed abstracts for AI reasoning

๐Ÿš€ Quick Start

MCP Server Installation

# Clone the repository
git clone https://github.com/nexisdev/GenomeMCP.git
cd GenomeMCP

# Install dependencies with uv
uv sync

# Run the MCP server
uv run python src/main.py

CLI Installation

# Using the install script
./install.sh

# Or with pip
pip install genomemcp[cli]

# Or for development
./setup-dev.sh
source .venv/bin/activate

Claude Desktop Integration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "genomemcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/GenomeMCP",
        "run",
        "python",
        "src/main.py"
      ]
    }
  }
}

### โ˜๏ธ Cloud Deployment (Railway)

You can deploy the GenomeMCP server to the cloud with one click. It will be exposed as an SSE (Server-Sent Events) endpoint, ready for remote agents.

1. Click the **Deploy on Railway** button above.
2. Provide your `SUPABASE_URL` and `SUPABASE_KEY` (optional, for persistence).
3. Connect your agent to the deployment URL (e.g. `https://your-app.up.railway.app/sse`).

---

## ๐Ÿ“– Usage Examples

### Search for a Gene Variant

User: "What variants are associated with BRCA1?" Agent uses: search_clinvar("BRCA1")


### Get Population Frequency

User: "How common is the variant 1-55516888-G-GA?" Agent uses: get_population_stats("1-55516888-G-GA") โ†’ Returns gnomAD allele frequency: 0.000123 (0.01%)


### Discover Gene-Disease Relationships

User: "What genes are linked to Lynch Syndrome?" Agent uses: find_related_genes("Lynch Syndrome") โ†’ Returns: MSH2 (12 variants), MLH1 (8 variants), PMS2 (5 variants)


### Visualize Pathways

User: "Show me the pathways for TP53" Agent uses: visualize_pathway("TP53") โ†’ Returns Mermaid diagram:


```mermaid
graph TD
    TP53((TP53))
    TP53 --> P_123["Transcriptional Regulation by TP53"]
    TP53 --> P_456["Cell Cycle Checkpoints"]
    TP53 --> P_789["DNA Damage Response"]

๐Ÿ”ฌ Data Sources

Source Description API
ClinVar Clinical variant interpretations NCBI E-utilities
gnomAD Population allele frequencies gnomAD GraphQL
Reactome Biological pathway database Reactome Content Service
PubMed Scientific literature NCBI E-utilities
NCBI Gene Gene annotations NCBI E-utilities

๐Ÿ—๏ธ Architecture

GenomeMCP/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ main.py          # MCP server & tool definitions
โ”‚   โ”œโ”€โ”€ clinvar.py       # ClinVar & PubMed API client
โ”‚   โ”œโ”€โ”€ genomics.py      # Exon/Intron mapping
โ”‚   โ”œโ”€โ”€ population.py    # gnomAD integration
โ”‚   โ”œโ”€โ”€ pathways.py      # Reactome integration
โ”‚   โ”œโ”€โ”€ utils.py         # Shared utilities
โ”‚   โ””โ”€โ”€ cli/             # Command-line interface
โ”‚       โ”œโ”€โ”€ app.py       # Typer CLI application
โ”‚       โ”œโ”€โ”€ formatters/  # Rich output formatters
โ”‚       โ”œโ”€โ”€ tui/         # Textual interactive UI
โ”‚       โ””โ”€โ”€ config.py    # Theme configuration
โ”œโ”€โ”€ tests/               # Unit tests
โ”œโ”€โ”€ docs/                # Documentation
โ”œโ”€โ”€ install.sh           # Quick install script
โ”œโ”€โ”€ setup-dev.sh         # Development setup
โ””โ”€โ”€ pyproject.toml       # Project configuration

๐Ÿงช Testing

# Run all tests
uv run pytest

# Run CLI tests
uv run pytest tests/test_cli.py -v

# Run specific test suite
uv run pytest tests/test_phase4.py tests/test_phase5.py

๐Ÿ“š Documentation


๐Ÿค Contributing

Contributions are welcome! Please open an issue or submit a pull request.


๐Ÿ“„ License

MIT License โ€” see LICENSE for details.


๐Ÿ”— Keywords

genomics bioinformatics clinvar gnomad mcp model-context-protocol ai-agent claude variant-interpretation population-genetics reactome pathway-analysis pubmed ncbi gene-discovery clinical-genomics precision-medicine llm-tools cli tui terminal


Built for AI agents. Powered by open genomic data.

Nexis AI Banner

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_eldergenix_genomemcp-0.1.1.tar.gz (196.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iflow_mcp_eldergenix_genomemcp-0.1.1-py3-none-any.whl (54.4 kB view details)

Uploaded Python 3

File details

Details for the file iflow_mcp_eldergenix_genomemcp-0.1.1.tar.gz.

File metadata

  • Download URL: iflow_mcp_eldergenix_genomemcp-0.1.1.tar.gz
  • Upload date:
  • Size: 196.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_eldergenix_genomemcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7481d61727c3d260cf1e155bd451698d848e7e1cf389a47bb6f491e2a1a954cd
MD5 a1185c5d99f97d9659e66ef58716b199
BLAKE2b-256 6946dad62cb6ef736c60c555ba04a5d4a7e54847525177d1d606fc67ed8acc75

See more details on using hashes here.

File details

Details for the file iflow_mcp_eldergenix_genomemcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_eldergenix_genomemcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 54.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_eldergenix_genomemcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b2a706e379fa769c7410381441363d57be12412b010af78f8a2f1d3060285db6
MD5 7d6f930f7a09dcfaadda4acd0c0c0953
BLAKE2b-256 931877fbb7fffd32342595b6debc731b1d581e083cc3a1085e821d134b7c9c5e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page