Skip to main content
Glama
MyGene MCP Server

MyGene MCP Server

by nickzren

MyGene MCP Server

CI MCP Server Python 3.12+ License: MIT

A Model Context Protocol (MCP) server that exposes the MyGene.info API as a set of tools for AI assistants.

Features

Core Capabilities

  • Gene Search: Query genes by symbol, name, Entrez ID, Ensembl ID, or other identifiers

  • Gene Annotations: Retrieve comprehensive gene information from multiple sources

  • Expression Queries: Search genes by tissue expression or retrieve expression profiles

  • Pathway Queries: Find genes in biological pathways or get pathway memberships

  • GO Annotations: Search by GO terms or retrieve GO annotations with evidence codes

  • Disease Associations: Find disease-associated genes or get gene-disease links

  • Drug/Chemical Interactions: Search genes by drug/chemical or get interaction data

  • Ortholog/Homology: Find orthologs across species or search homologous genes

  • Variant Information: Retrieve genetic variants and clinical significance

  • Batch Operations: Process up to 1000 genes in a single request

  • Genomic Interval Search: Find genes by chromosomal coordinates

  • Advanced Queries: Build complex queries with boolean logic and filters

  • Data Export: Export gene lists in TSV, CSV, JSON, or XML formats

Data Sources

  • NCBI: Entrez Gene, RefSeq, HomoloGene

  • Ensembl: Gene annotations, homology data

  • UniProt: Protein annotations, GO terms

  • Human Protein Atlas (HPA): Tissue expression, subcellular localization

  • GTEx: Gene expression in human tissues

  • BioGPS: Gene expression profiles

  • ExAC: Exome aggregation data

  • KEGG: Pathways and disease associations

  • Reactome: Biological pathways

  • WikiPathways: Community pathways

  • BioCarta: Pathway diagrams

  • NetPath: Signal transduction pathways

  • PID: Pathway Interaction Database

  • Gene Ontology: Functional annotations

  • DisGeNET: Disease-gene associations

  • ClinVar: Clinical variants

  • OMIM: Genetic disorders

  • PharmGKB: Pharmacogenomics

  • DrugBank: Drug targets

  • ChEMBL: Bioactive compounds

  • ChEBI: Chemical entities

  • InterPro: Protein families and domains

  • Pfam: Protein families

  • SMART: Protein domains

  • PANTHER: Gene function classification

Related MCP server: Unofficial BioThings.io MCP Server

Prerequisites

  • Python 3.12+ with pip

Quick Start

1. Install UV

UV is a fast Python package and project manager.

pip install uv

2. Install MCPM (MCP Manager)

MCPM is a package manager for MCP servers that simplifies installation and configuration.

pip install mcpm

3. Setup the MCP Server

cd mygene-mcp
uv sync

4. Add the Server to Claude Desktop

# Make sure you're in the project directory
cd mygene-mcp

# Set Claude as the target client
mcpm target set @claude-desktop

# Add the MyGene MCP server
mcpm import stdio mygene \
  --command "$(uv run which python)" \
  --args "-m mygene_mcp.server"

Then restart Claude Desktop.

Usage

Running the Server

uv run python -m mygene_mcp.server

You can choose a specific transport when starting the FastMCP server:

uv run python -m mygene_mcp.server --transport stdio        # default (Claude Desktop)
uv run python -m mygene_mcp.server --transport sse --host 0.0.0.0 --port 8000
uv run python -m mygene_mcp.server --transport http --host 0.0.0.0 --port 8000

When running with --transport sse or --transport http, the server exposes a discovery document at /.well-known/mcp.json and a health check at /.

Development

uv sync --extra dev
uv run pytest tests/ -v

Available Tools

26 tools
build_complex_queryC

Build complex boolean queries with filters and aggregations.

Inputs: must, size, should, filters, +2 more. Returns: object

export_gene_listD

Export gene data in various formats.

Inputs: gene_ids (required), fields, format. Returns: result

get_available_fieldsA

Get a list of all available fields in MyGene.info.

Inputs: no named parameters. Returns: object

get_field_statisticsD

Get statistics for a specific field.

Inputs: field (required), size, species. Returns: object

get_gene_annotationC

Get detailed annotation for a specific gene by ID.

Inputs: gene_id (required), fields, species, dotfield. Returns: object

get_gene_chemical_interactionsC

Get chemical/drug interactions for a gene.

Inputs: gene_id (required), sources. Returns: object

get_gene_disease_associationsB

Get disease associations for a gene.

Inputs: gene_id (required), sources. Returns: object

get_gene_expression_profileC

Get expression profile across tissues/cell types.

Inputs: gene_id (required), datasets. Returns: object

get_gene_go_annotationsC

Get GO annotations with evidence codes.

Inputs: gene_id (required), aspect, evidence_codes. Returns: object

get_gene_orthologsC

Get orthologs across species.

Inputs: gene_id (required), sources, target_species. Returns: object

get_gene_pathwaysC

Get all pathways for a gene.

Inputs: gene_id (required), sources. Returns: object

get_genes_batchC

Get annotations for multiple genes in a single request.

Inputs: gene_ids (required), email, fields, filter_, +2 more. Returns: object

get_gene_variantsC

Get variants from ClinVar and other sources.

Inputs: gene_id (required), variant_type, clinical_significance. Returns: object

get_mygene_metadataA

Get metadata about the MyGene.info API service.

Inputs: no named parameters. Returns: object

get_species_listA

Get a list of all supported species in MyGene.info.

Inputs: no named parameters. Returns: object

query_genesC

Search for genes using the MyGene.info query API.

Inputs: q (required), size, sort, from_, +6 more. Returns: object

query_genes_batchC

Query multiple genes in a single request.

Inputs: gene_ids (required), fields, scopes, species, +2 more. Returns: object

query_genes_by_chemicalC

Find genes that interact with chemicals/drugs.

Inputs: size, species, chemical_id, chemical_name, +1 more. Returns: object

query_genes_by_diseaseC

Find genes associated with diseases.

Inputs: size, source, species, disease_id, +1 more. Returns: object

query_genes_by_expressionC

Query genes by expression patterns.

Inputs: size, tissue, dataset, species, +2 more. Returns: object

query_genes_by_go_termC

Query genes by GO terms with evidence filtering.

Inputs: size, go_id, aspect, go_name, +3 more. Returns: object

query_genes_by_intervalB

Query genes by genomic interval (chromosome position).

Inputs: chr (required), end (required), start (required), size, +2 more. Returns: object

query_genes_by_pathwayC

Find genes in specific pathways.

Inputs: size, source, species, pathway_id, +1 more. Returns: object

query_homologous_genesC

Find homologous genes across species.

Inputs: gene_symbol (required), species_list (required), size, homology_type. Returns: object

query_with_filtersD

Query with multiple filters applied.

Inputs: q (required), size, taxid, chromosome, +5 more. Returns: object

search_by_fieldC

Search by specific fields with boolean operators.

Inputs: field_queries (required), size, fields, species, +1 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.3/5.0

    Scored across 26 tools

    Disambiguation2/5

    There are overlapping tools like query_homologous_genes and get_gene_orthologs, which both find cross-species homologs. Additionally, query_with_filters, build_complex_query, and search_by_field all appear to serve similar flexible querying purposes, causing confusion.

    Naming Consistency3/5

    Most tools follow a consistent get_gene_* or query_genes_by_* pattern, but there are deviations such as query_with_filters, build_complex_query, search_by_field, and export_gene_list that break the convention. The mixing of verbs like query, search, and build adds inconsistency.

    Tool Count2/5

    With 26 tools, the server exceeds the recommended range and feels heavy, even for a comprehensive gene API. While each tool may target a specific aspect, the sheer number makes it harder for agents to select the appropriate one.

    Completeness4/5

    The tool set covers a wide range of gene-related queries including diseases, chemicals, pathways, GO terms, expression, variants, and orthologs, with batch operations and export functionality. Minor redundancies exist but no obvious gaps for the MyGene.info domain.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables AI assistants to query genetic variant data, gene constraints, and population genetics information from the gnomAD (Genome Aggregation Database) through its GraphQL API. Supports searching for genes and variants, retrieving constraint scores, analyzing population frequencies, and accessing genomic coverage data.
      9
      10
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      MCP server for querying gene annotations, full-text gene search, and species taxonomy via MyGene.info. Enables AI agents to access gene data through natural language questions.
      70 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to resolve and cross-reference biological entities such as genes, proteins, and aliases across authoritative databases like HGNC, NCBI Entrez, and UniProt, with confidence scores and source citations.
      16
      2
      Apache 2.0