Ensembl_MCP

tanaylohia/Ensembl_MCP

3.2

If you are the rightful owner of Ensembl_MCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Ensembl MCP Server is a plug-and-play Model Context Protocol server designed to interface with Ensembl’s REST API, facilitating advanced genomic research and tool chaining.

Ensembl MCP Server

Developed by Mandrake Bio — Tanay Lohia

A plug-and-play Model Context Protocol (MCP) server for interacting with Ensembl’s REST API across genes, variants, sequences, and species.
Supports advanced genomic research and tool chaining in environments like Claude Desktop.


🔍 Overview

The Ensembl MCP Server bridges the Ensembl REST API with an MCP-compatible interface. Use it for:

  • Fast gene and transcript lookups
  • Cross-species comparative genomics
  • Variant analysis and regulatory annotation
  • Full support for sequence translation, repeat masking, and batch processing

✨ Key Capabilities

1. Gene & Transcript Analysis

  • lookup_gene — Retrieve detailed info via Ensembl ID or symbol
  • get_transcripts — Structural info for all gene transcripts
  • search_genes — Query by name, description, or identifier

2. Sequence Tools

  • get_sequence — Genomic or feature-based DNA retrieval
  • get_cds_sequence — Fetch CDS from transcripts
  • translate_sequence — Convert DNA to protein
  • Repeat masking (hard/soft) supported

3. Comparative Genomics

  • get_homologs — Orthologs/paralogs across species
  • get_gene_tree — Phylogenetic trees in multiple formats

4. Variant Exploration

  • get_variants — Retrieve variants from genomic regions
  • get_variant_consequences — Predict variant impact on genes

5. Regulatory Feature Mining

  • get_regulatory_features — Promoters, enhancers, TFBS
  • get_motif_features — Explore TF binding motifs

6. Annotation & Cross-References

  • get_xrefs — PDB, RefSeq, EMBL and more
  • map_coordinates — Convert across genome assemblies
  • Access GO terms and functional metadata

7. Species & Assembly Metadata

  • list_species, get_assembly_info, get_karyotype
  • Chromosome banding and genome stats

8. Batch Processing

  • batch_gene_lookup — Parallelize gene info extraction
  • batch_sequence_fetch — Fetch multiple regions at once

⚙️ Installation

# Clone repo
git clone https://github.com/tanaylohia/Ensembl_MCP.git
cd Ensembl_MCP

# Install dependencies
npm install

# Build the server
npm run build

🧠 Using with Claude Desktop

Step-by-Step Integration

  1. Build (if not already done):

    npm run build
    
  2. Configure MCP in Claude Desktop:

    • Open Settings → MCP Servers
    • Add:
      • Name: ensembl
      • Command: node
      • Args: /absolute/path/to/ensembl-server/build/index.js
  3. Restart Claude Desktop

Sample Prompts

  • "Look up the BRCA2 gene and fetch its protein sequence"
  • "What are the orthologs of TP53 in zebrafish?"
  • "Get variants in chr17:43044295-43125364 with consequences"
  • "Search for insulin-related genes"

🧬 Supported Inputs & Outputs

✅ Inputs

  • Genomic Regions: chr1:1000000-2000000, 1:1000000-2000000
  • Gene/Transcript IDs: Ensembl (ENSG...), RefSeq, gene symbols

📤 Outputs

TypeFormats
SequenceFASTA
VariantsVCF
FeaturesGFF
Data responsesJSON (default)
PhylogenyJSON, Newick, PhyloXML

🌍 Species Coverage

Supports all species available in Ensembl:

  • Vertebrates: Human, Mouse, Zebrafish
  • Plants: Rice, Arabidopsis, Wheat
  • Fungi: Yeast
  • Protists & Metazoa: Drosophila, C. elegans, and others

Default species: homo_sapiens unless specified


🧯 Error Handling

Robust, developer-friendly error messaging:

  • Invalid inputs
  • Unknown species
  • REST API timeouts
  • Coordinate format errors

📡 Data Sources

  • Powered by the official Ensembl REST API
  • Real-time querying of annotated genomic content

🤝 Contributing

Pull requests welcome — especially if you're:

  • Adding new species or MCP tools
  • Improving performance or modularity
  • Reporting bugs or API changes

📜 License

MIT License. See LICENSE for details.


📬 Contact

Tanay Lohia
For issues, ideas, or collaborations, visit the GitHub repo


🙏 Acknowledgments

Thanks to:

  • Ensembl Development Team
  • Model Context Protocol (MCP) Contributors