Skip to main content
Glama

hgnc-link

Python 3.14+ CI Conformance License: MIT

An MCP (Model Context Protocol) server that grounds gene-nomenclature work in the HUGO Gene Nomenclature Committee (HGNC) dataset from genenames.org, served from a local index of HGNC's bulk downloads over Streamable HTTP or stdio.

IMPORTANT

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

Why

Every downstream genetics tool needs the same thing from HGNC: turn any gene symbol — current, outdated (previous), or alias — and any HGNC ID form into the canonical {hgnc_id, approved_symbol}, then pull cross-references.

HGNC does publish a REST API, but it is field-scoped (/fetch/{field}/{value}): the caller must already know whether a string is a current symbol, a previous symbol, an alias or an ID, and query the matching field — a network round-trip per guess. It will not tell you how a symbol matched, and it will not warn you that an alias belongs to several genes.

hgnc-link collapses that into one local call against a SQLite index of the bulk dumps. It runs the full cascade (HGNC ID → current → previous → alias → withdrawn redirect), returns the match provenance in match_type, and surfaces ambiguity as an ambiguous_query error with the candidate list rather than silently collapsing it to one gene.

Related MCP server: plant-genomics-mcp

Quick start

Hosted — no install:

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

Local (Python 3.14+, uv). make data is mandatory — the server has no data until the HGNC dumps (~33 MB) are downloaded and the local index is built:

make install          # uv sync --group dev
make data             # download the HGNC dumps, build the local SQLite index
make dev              # unified REST + MCP on http://127.0.0.1:8000/mcp
make mcp-serve        # ...or a stdio MCP server, for Claude Desktop
claude mcp add --transport http hgnc-link --scope user http://127.0.0.1:8000/mcp

For stdio see claude-desktop-config.json. Keep the index fresh with make data-refresh from cron — it is conditional, so an unchanged dump costs one 304 and no rebuild (Deployment). Serving over HTTP behind a proxy requires adding the public hostname to the exact Host allowlist — read Configuration first.

Tools

Tool

Purpose

resolve_symbol

Start here. Any symbol/ID → {hgnc_id, approved_symbol, match_type} + candidates.

resolve_symbols_batch

Resolve many symbols/IDs at once; never fails the batch on a miss.

get_gene

Full HGNC record for one gene (alias- and previous-symbol aware).

search_genes

Full-text search over symbol, name, alias and previous symbols.

get_gene_cross_references

Gene → NCBI / Ensembl / UniProt / RefSeq / MANE / OMIM / … identifiers.

resolve_gene_by_xref

External ID → HGNC gene (the reverse mapping).

get_gene_group

Browse a gene family by group ID or name.

get_server_capabilities

Discovery surface: tools, signatures, workflows, vocabulary.

get_hgnc_diagnostics

Loaded release, record counts, freshness, data-source status.

serverInfo.name is hgnc-link, and leaf tool names are intentionally unprefixed per the GeneFoundry Tool-Naming Standard v1. The canonical gateway namespace token is hgnc: behind genefoundry-router these surface as hgnc_<tool> (e.g. hgnc_resolve_symbol).

Every response carries _meta.next_commands — a ready-to-call {tool, arguments} list, on success and on error — and honours response_mode ∈ {minimal, compact, standard, full} (default compact). See Usage.

Data & provenance

  • Source — the HGNC bulk downloads (hgnc_complete_set.json + withdrawn.txt) from genenames.org, built into a local SQLite index. Queries are served from that index; there are no per-request REST round-trips.

  • Refresh — HGNC publishes Tuesdays and Fridays. hgnc-link-data refresh is the cron entry point and is conditional (an unchanged dump returns 304, so no rebuild); the in-app scheduler is off by default. See Data.

  • Licence — HGNC data is released with no usage restrictions (effectively public domain / CC0). Attribution is requested but not required.

  • Citation — Seal RL, Braschi B, Gray K, Jones TEM, Tweedie S, Haim-Vilmovsky L, Bruford EA. Genenames.org: the HGNC resources in 2023. Nucleic Acids Res. 2023;51(D1):D1003-D1009. doi:10.1093/nar/gkac888. RRID:SCR_002827.

Documentation

  • Usage — canonical workflows, response_mode, chaining, ambiguity and withdrawn-ID semantics, the hgnc:// resources.

  • Configuration — every HGNC_LINK_* variable, the transports, and the Host / Origin / CORS boundary.

  • Data — the bulk dumps, the index build, freshness, and the (unwired) live REST client.

  • Deployment — cron and systemd refresh, and the Docker path.

  • Architecture — the ingest → SQLite → service → MCP planes, and the schema.

  • Design spec — why it is shaped this way.

Contributing

See AGENTS.md for engineering conventions — the error taxonomy, the next_commands contract, and how to add a tool. make ci-local is the definition-of-done gate: format, lint, line budget, README standard, mypy strict, and tests.

License

MIT © hgnc-link contributors. HGNC data carries no usage restrictions (effectively CC0); the attribution cited above is requested but not required.

Available Tools

9 tools
get_geneGet Gene RecordA
Read-onlyIdempotent

Return the full HGNC record for a gene, resolved from an HGNC id, current symbol, previous symbol, or alias. Includes name, status, locus group/type, location, aliases/previous symbols, gene groups, and all cross-references. response_mode controls verbosity (compact drops dates/provenance; minimal keeps identity + anchor ids). Signature: get_gene(query, response_mode=).

Inputs: query (required), response_mode.

get_gene_cross_referencesGet Gene Cross-ReferencesA
Read-onlyIdempotent

Return external database cross-references for a gene (forward identifier mapping): NCBI Gene, Ensembl, UniProt, RefSeq, MANE Select, OMIM, UCSC, VEGA, CCDS, MGI, RGD, Orphanet, COSMIC, PubMed. response_mode sets the default field set: minimal=NCBI+Ensembl ids; compact (default)=the high-value ids (NCBI, Ensembl, UniProt, RefSeq, MANE Select, OMIM, CCDS); standard/full=every populated field. databases optionally filters to specific sources by field key OR friendly label (e.g. 'mane', 'ncbi', 'uniprot') and OVERRIDES the response_mode tier; an unknown key is rejected with invalid_input + did-you-mean. Resolve the gene from an id/symbol/alias first. Signature: get_gene_cross_references(query, databases=, response_mode=).

Inputs: query (required), databases, response_mode.

get_gene_groupGet Gene GroupA
Read-onlyIdempotent

Browse a HGNC gene group/family by numeric group id (e.g. '1157') or by name (e.g. 'RAF family'). Returns the member genes as symbol-ordered summaries. Members are paginated with limit + offset; the response carries member_count, returned, truncated, and next_offset, and (when truncated) a next_commands entry that fetches the next page. A name matching several groups returns the candidate groups so you can re-call with a specific id. Signature: get_gene_group(group, limit=, offset=, response_mode=).

Inputs: group (required), limit, offset, response_mode.

get_hgnc_diagnosticsGet HGNC DiagnosticsA
Read-onlyIdempotent

Report the local HGNC index status: whether the data is built, the loaded release date, gene/withdrawn counts, schema version, and when it was built. Use this to confirm freshness or diagnose an unavailable-data error. Signature: get_hgnc_diagnostics().

Inputs: no named parameters.

get_server_capabilitiesGet Server CapabilitiesA
Read-onlyIdempotent

Return the hgnc-link discovery surface. detail='summary' (default) is light: identity/build/HGNC release, the tool list WITH call signatures, accepted argument aliases, response modes, recommended workflows, error taxonomy, and limits. detail='full' adds vocabularies (locus groups, status values, match types) and the cross-reference database catalogue. Call this first in a cold session, or read hgnc://tools / hgnc://capabilities. Signature: get_server_capabilities(detail=).

Inputs: detail.

resolve_gene_by_xrefResolve Gene by Cross-ReferenceA
Read-onlyIdempotent

Reverse identifier mapping: find the HGNC gene(s) for an external database id. source is the database (entrez_id/ncbi, ensembl_gene_id, uniprot, refseq, mane_select, omim, ucsc, vega, ccds, mgi, rgd) and value is the id (e.g. source='ensembl_gene_id', value='ENSG00000157764'). A version suffix is tolerated (ENSG00000012048.23 resolves like ENSG00000012048), and a MANE Select transcript (ENST…/NM_…) resolves back to its gene. Signature: resolve_gene_by_xref(source, value, response_mode=).

Inputs: value (required), source (required), response_mode.

resolve_symbolResolve Gene SymbolA
Read-onlyIdempotent

Resolve any gene symbol or HGNC id to its canonical record. Accepts a current symbol, a previous (withdrawn) symbol, an alias, or an HGNC id in either form (HGNC:1100 or 1100), case-insensitively. Returns {hgnc_id, approved_symbol, match_type (hgnc_id|current|previous|alias)}. An alias shared by several genes returns an ambiguous_query error with the candidate list (not silently picked); a withdrawn/merged symbol returns a not_found error that redirects to the successor record. Signature: resolve_symbol(query, response_mode=).

Inputs: query (required), response_mode.

resolve_symbols_batchResolve Gene Symbols (Batch)A
Read-onlyIdempotent

Resolve a batch of gene symbols / HGNC ids in one call (max 200). Each entry is resolved with the same current->previous->alias cascade as resolve_symbol; an individual miss or withdrawal never fails the batch (it is marked unresolved / obsolete in that entry). Returns per-query results plus resolved/unresolved counts. Signature: resolve_symbols_batch(queries, response_mode=).

Inputs: queries (required), response_mode.

search_genesSearch GenesA
Read-onlyIdempotent

Free-text search over gene symbols, names, aliases, and previous symbols (FTS, relevance-ranked). Returns ranked {hgnc_id, symbol, name, locus_type, score} summaries. Nomenclature-only: there is NO disease/phenotype semantics, so a descriptive query (e.g. 'polycystin kidney') only matches words present in a gene's nomenclature. Use resolve_symbol for an exact symbol/id; use this for partial names. Signature: search_genes(query, limit=, response_mode=).

Inputs: query (required), limit, response_mode.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.6/5.0

    Scored across 9 tools

    Disambiguation5/5

    All nine tools have clearly distinct purposes: gene retrieval, cross-references, group browsing, diagnostics, capabilities, reverse lookup, single/batch symbol resolution, and free-text search. There is no overlap or ambiguity between any two tools.

    Naming Consistency5/5

    Tool names follow a consistent verb_noun pattern (e.g., get_gene, resolve_symbol, search_genes). The verbs are either get, resolve, or search, each clearly indicating the action, and the nouns specify the target. No mixing of conventions.

    Tool Count5/5

    With 9 tools, the server is well-scoped for the HGNC nomenclature domain. Each tool serves a distinct and necessary function (lookup, batch, search, cross-references, etc.), and the count is neither too sparse nor overwhelming.

    Completeness5/5

    The tool surface covers all core operations for a gene nomenclature service: single and batch resolution, forward and reverse cross-reference mapping, group browsing, free-text search, and server diagnostics/capabilities. There are no obvious missing operations for the stated purpose.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      ▎ Provides 32 tools for plant-genomics locus lookup across 11 free public backends (Ensembl Plants, Phytozome, UniProtKB, Europe PMC, QuickGO, NCBI BLAST, Gramene, KEGG, STRING-DB, ATTED-II, BAR). Takes a TAIR-style locus plus optional organism and returns gene metadata, functional/pathway annotation, interactions, co-expression, and literature — in single-locus, batch, and cross-source synthesis.
      58
      106 PyPI
      8
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Unified genomic track, peak, and sequence retrieval tool for ENCODE, ChIP-Atlas, ReMap, GEO, and SRA/ENA with unified metadata, resolved DOI/PMID provenance, and direct FASTQ download without SRA toolkit.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables functional enrichment analysis of gene lists against multiple pathway and ontology databases, plus gene/protein identifier conversion and cross-species ortholog mapping.
      116 npm
      MIT