Skip to main content
Glama

mgi-link

Python 3.14+ CI Conformance License: MIT

An MCP (Model Context Protocol) server that grounds mouse-genetics work in Mouse Genome Informatics (informatics.jax.org). It reproduces the data on an MGI gene/marker page — especially Mutations, Alleles, and Phenotypes — as structured tools an agent can call.

IMPORTANT

Research use only. Not clinical decision support. Do not use for diagnosis, treatment, triage, or patient management.

Why

The MGI gene page (e.g. Wt1, MGI:98968) is a rich JS app with no clean JSON API. The data behind it exists only as bulk TSV reports and an OBO ontology file — no endpoint answers "what phenotypes does knocking out this gene cause?".

mgi-link rebuilds that surface from MGI's canonical bulk reports into a fast, offline, deterministic SQLite index and exposes it as MCP tools with structured outputs, response_mode verbosity control, and _meta.next_commands chaining. It also closes the mouse↔human gap: pass a human symbol or HGNC id to any marker tool and it resolves through the ortholog.

Related MCP server: BioMCP

Quick start

Hosted — no install:

claude mcp add --transport http mgi-link https://mgi-link.genefoundry.org/mcp

Locally (Python 3.14+, uv). make data is required: the server has no data until the MGI reports are downloaded and the index is built.

make install      # uv sync --group dev
make data         # REQUIRED: download the MGI bulk reports, build the SQLite index
make dev          # unified server: FastAPI /health + MCP /mcp on 127.0.0.1:8000
make mcp-serve    # or: the stdio MCP server
claude mcp add mgi-link -- uv run mgi-link-mcp   # stdio

Deploying behind a reverse proxy? MGI_LINK_ALLOWED_HOSTS must list the public hostname — see configuration.md.

Tools

Tool

Purpose

resolve_marker

Resolve a mouse symbol / MGI id / human ortholog → canonical marker

get_marker

Full marker record: location, xrefs, ortholog, summary counts

search_markers

Full-text search over marker symbol / name / synonyms

get_marker_alleles

Mutations & Alleles + generation-method category counts

get_marker_phenotypes

MP annotations (allelic composition, background, PubMed) + summary

get_phenotype_overview

The 27-system MGI Phenotype Overview grid

get_marker_diseases

Human–mouse disease models (DO/OMIM)

get_marker_ortholog

Mouse ↔ human ortholog (HGNC/Entrez/Ensembl/OMIM)

get_mp_term

Mammalian Phenotype ontology term (parents/children/systems)

search_phenotype_terms

Full-text search over MP terms

find_markers_by_phenotype

Reverse lookup: MP term → mouse genes (descendants included)

get_server_capabilities

Discovery: the tool surface, vocabularies, limits, citation

get_diagnostics

Health and provenance: the loaded MGI release

Leaf names are intentionally unprefixed per the GeneFoundry Tool-Naming Standard v1. The canonical gateway namespace token is mgi: behind genefoundry-router these surface as mgi_<tool> (e.g. mgi_get_marker), with get_marker_phenotypes pinned as the entry point. Worked call sequences: usage.md.

Data & provenance

The index is built from the MGI bulk reports at informatics.jax.org/downloads/reports: MRK_List2, MGI_PhenotypicAllele, MGI_GenePheno, VOC_MammalianPhenotype, MPheno_OBO.ontology, HOM_MouseHumanSequence, MGI_DO and MRK_ENSEMBL. A live MouseMine (InterMine) enrichment client exists but is off by default and reserved for v2.

MGI publishes roughly weekly. mgi-link-data refresh is conditional (ETag / Last-Modified, so an unchanged release costs one 304) and is driven by an external cron job — the in-process scheduler is off by default. Full model: data.md.

Data licence. MGI data are freely available for research use; please cite MGI / The Jackson Laboratory (copyright). The Mammalian Phenotype Ontology is licensed CC BY 4.0, a separate grant.

Cite (served verbatim at mgi://citation): Baldarelli RM, Smith CL, Bello SM, et al. Mouse Genome Informatics: an integrated knowledgebase system for the laboratory mouse. Genetics. 2024;227(1):iyae031. doi:10.1093/genetics/iyae031. RRID:SCR_006460.

Documentation

  • Usage — canonical workflows, the tool reference, and what is out of scope in v1.

  • Configuration — every MGI_LINK_* variable, the entry points, and the Host/Origin allowlists.

  • Data — the source reports, the refresh model, licensing and citation.

  • Deployment — cron, systemd, Docker, and running behind a proxy.

  • Architecture — the data plane, the SQLite schema, and the MCP plane.

  • AGENTS.md — engineering conventions and architecture invariants.

Contributing

See AGENTS.md for engineering conventions and the invariants not to break. make ci-local is the definition-of-done gate: format, lint, line budget, README standard, mypy strict, and tests. It must be green before a change lands.

License

Code: MIT © mgi-link contributors. Data: MGI data are free for research use (cite MGI / The Jackson Laboratory); the Mammalian Phenotype Ontology is CC BY 4.0.

Available Tools

13 tools
find_markers_by_phenotypeFind Markers by PhenotypeA
Read-onlyIdempotent

Reverse lookup: return the mouse markers (genes) annotated with a Mammalian Phenotype term. include_descendants defaults to TRUE and changes WHICH genes are returned: it rolls up annotations to more-specific child terms via the MP ontology (e.g. MP:0005367 renal/urinary system phenotype gathers all kidney phenotypes); the flag is echoed in the response. Returns a truncation contract {total, returned, limit, truncated}; when truncated, next_commands includes a widen step. Resolve a term first with search_phenotype_terms. Signature: find_markers_by_phenotype(mp_id, include_descendants=, limit=).

Inputs: mp_id (required), limit, include_descendants.

get_diagnosticsGet MGI DiagnosticsA
Read-onlyIdempotent

Report the local MGI index status: whether the data is built, the loaded release, marker/allele/phenotype/ortholog/disease counts, schema version, and when it was built. Use this to confirm freshness or diagnose a data_unavailable error. Signature: get_diagnostics().

Inputs: no named parameters.

get_markerGet Marker RecordA
Read-onlyIdempotent

Return the full MGI marker record, resolved from an MGI id, mouse symbol/synonym, or human ortholog. Includes name, marker/feature type, GRCm39 location, NCBI/Ensembl ids, synonyms, the human ortholog (symbol/HGNC/OMIM), and summary counts (alleles, phenotypes, phenotype references, diseases). response_mode controls verbosity. Signature: get_marker(query, response_mode=).

Inputs: query (required), response_mode.

get_marker_allelesGet Marker Alleles & MutationsA
Read-onlyIdempotent

Return the phenotypic alleles / mutations for a mouse marker — the gene page's 'All Mutations and Alleles' panel. Includes per-allele {allele_id, symbol, name, allele_type, attributes, pubmed_ids} and the generation-method category_counts (Targeted, Endonuclease-mediated, Radiation induced, Chemically induced, Transgenic, ...). allele_type optionally filters (accepts friendly tokens like 'knockout', 'crispr', 'targeted'). Returns a truncation contract {total, returned, limit, truncated}; when truncated, next_commands includes a widen step. Signature: get_marker_alleles(query, allele_type=, limit=, response_mode=).

Inputs: query (required), limit, allele_type, response_mode.

get_marker_diseasesGet Marker Disease ModelsA
Read-onlyIdempotent

Return the human-mouse disease models associated with a marker (Disease Ontology id + name + OMIM ids), from MGI's curated DO annotations. Accepts a mouse symbol/MGI id or a human ortholog. Signature: get_marker_diseases(query).

Inputs: query (required).

get_marker_orthologGet Marker OrthologA
Read-onlyIdempotent

Return the mouse<->human ortholog mapping and cross-references for a marker: human symbol, HGNC id, NCBI Gene (human), Ensembl (human), OMIM gene id, and human GRCh38 coordinates. Accepts a mouse symbol/MGI id OR a human symbol/HGNC id (resolved to the mouse marker first). Signature: get_marker_ortholog(query, response_mode=).

Inputs: query (required), response_mode.

get_marker_phenotypesGet Marker PhenotypesA
Read-onlyIdempotent

Return the Mammalian Phenotype (MP) annotations for a mouse marker. By default (minimal/compact/standard) returns a DEDUPLICATED, support-ordered list of DISTINCT MP terms — each {mp_id, mp_term, genotype_count} (standard adds systems[]) — so the most replicated phenotypes come first and none are buried alphabetically. response_mode=full returns the per-genotype rows {mp_id, mp_term, allelic_composition, genetic_background, pubmed_id, genotype_id, ...}. Every response carries a phenotype summary and a truncation contract {total, returned, limit, truncated}; when truncated, next_commands includes a widen step. mp_system optionally restricts to one top-level system (name like 'renal/urinary system' or its MP id). SCOPE: annotations are single-locus, NON-conditional genotypes (MGI_GenePheno); conditional/Cre-driven and multi-genic genotypes are EXCLUDED (see the response 'scope'/'scope_note'), so a zero or empty result does not mean the gene lacks that phenotype in mouse — confirm on the MGI gene page. Signature: get_marker_phenotypes(query, mp_system=, limit=, response_mode=).

Inputs: query (required), limit, mp_system, response_mode.

get_mp_termGet Mammalian Phenotype TermA
Read-onlyIdempotent

Return a Mammalian Phenotype (MP) ontology term: id, name, definition, direct parents and children (is_a edges), and the top-level system(s) it rolls up to. Use with find_markers_by_phenotype to go from a phenotype to the mouse genes that model it. Signature: get_mp_term(mp_id).

Inputs: mp_id (required).

get_phenotype_overviewGet Phenotype Overview GridA
Read-onlyIdempotent

Return a per-system phenotype overview grid: for each top-level MP system annotated for the marker (adipose tissue, cardiovascular system, renal/urinary system, nervous system, neoplasm, vision/eye, ...), the distinct annotated MP terms rolled up via the MP ontology. Use this for the system-level overview, then get_marker_phenotypes(mp_system=) to drill into one system. SCOPE: built from single-locus, NON-conditional genotypes (MGI_GenePheno); conditional/Cre-driven and multi-genic genotypes are EXCLUDED (see the response 'scope'/'scope_note'), so this grid is NOT a full mirror of the MGI gene page and a system may be absent here while the gene page shows it. Signature: get_phenotype_overview(query).

Inputs: query (required).

get_server_capabilitiesGet Server CapabilitiesA
Read-onlyIdempotent

Return the mgi-link discovery surface. detail='summary' (default) is light: identity/build/MGI release, the tool list WITH call signatures, accepted argument aliases, response modes, recommended workflows, error taxonomy, and limits. detail='full' adds vocabularies (allele types, marker types, match types) and the ortholog field catalogue. Call this first in a cold session, or read mgi://tools / mgi://capabilities. Signature: get_server_capabilities(detail=).

Inputs: detail.

resolve_markerResolve Mouse MarkerA
Read-onlyIdempotent

Resolve any mouse marker reference to its canonical MGI record. Accepts a mouse symbol (current or synonym, case-insensitive), an MGI id (MGI:98968 or 98968), OR a human gene symbol / HGNC id (resolved to the mouse ortholog). Returns {mgi_id, symbol, name, marker_type, match_type (mgi_id|current|synonym|ortholog)}. An ambiguous symbol returns an ambiguous_query error with the candidate list (not silently picked). A human symbol identical to the mouse symbol resolves as match_type=current (case collision) rather than ortholog; the marker is the same. Signature: resolve_marker(query, response_mode=).

Inputs: query (required), response_mode.

search_markersSearch MarkersA
Read-onlyIdempotent

Free-text search over mouse marker symbols, names, and synonyms (FTS, relevance-ranked). Returns ranked {mgi_id, symbol, name, marker_type, score, match} summaries. Exact symbol/synonym hits are PINNED first (match: exact_symbol|exact_synonym|fts) so an exact gene is never buried under transgenes or lncRNAs. Returns a truncation contract {total, returned, limit, truncated}; when truncated, next_commands includes a widen step. marker_type optionally restricts to a type (e.g. 'Gene'). Nomenclature-only: no phenotype semantics — use search_phenotype_terms + find_markers_by_phenotype for phenotype-driven discovery, or resolve_marker for an exact symbol/id. Signature: search_markers(query, marker_type=, limit=, response_mode=).

Inputs: query (required), limit, marker_type, response_mode.

search_phenotype_termsSearch Mammalian Phenotype TermsA
Read-onlyIdempotent

Free-text search over Mammalian Phenotype (MP) term names and definitions (FTS, relevance-ranked). Returns {mp_id, name, definition, score} plus a truncation contract {total, returned, limit, truncated} (widen step in next_commands when truncated). Use this to resolve a phenotype description to an MP id, then find_markers_by_phenotype or get_mp_term. Signature: search_phenotype_terms(query, limit=).

Inputs: query (required), limit.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 13 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: marker retrieval, allele lookup, phenotype annotations, disease associations, ortholog mapping, ontology term search, and server diagnostics. No two tools overlap in function.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (e.g., get_marker, search_phenotype_terms, resolve_marker). The convention is uniform and predictable.

    Tool Count5/5

    With 13 tools covering marker resolution, alleles, phenotypes, diseases, orthologs, ontology, and diagnostics, the count is well-scoped for the domain. No tool seems redundant or missing.

    Completeness4/5

    The tool surface covers the core MGI data: markers, alleles, phenotypes, diseases, orthologs, and ontology. Some advanced features (e.g., conditional genotypes, expression data) are excluded, but the stated scope is honest and the set is complete for the primary use case.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that provides access to Monarch Initiative's biomedical data through the Biolink API, enabling agents to query biological entities, associations, and knowledge graphs using natural language.
      -
    • A
      license
      A
      quality
      B
      maintenance
      A high-performance MCP server that gives LLMs access to 25 biomedical tools federated across 50+ upstream APIs for genes, variants, drugs, diseases, literature, clinical trials, and structural biology.
      43
      179 npm
      12
      Apache 2.0
    • A
      license
      A
      quality
      A
      maintenance
      An MCP server that gives AI assistants access to biological and biomedical RDF databases via SPARQL at the RDF Portal, as well as selected REST APIs (NCBI E-utilities, UniProt, ChEMBL, PDB, Reactome, Rhea, MeSH, and more).
      2
      29
      21
      MIT