CoolFace
Apppublic

musharna/plant-genomics-mcp

sourceHugging Facemitupdated 1mo agoView on Hugging Face
0likes
App README

🌱 Plant Genomics MCP

Plant-genomics locus lookup across Ensembl Plants, UniProtKB, QuickGO, Europe PMC, Gramene, STRING-DB and g:Profiler — usable from the UI on this page, or callable by your agent as an MCP server. All sources are free and public; no API key, no account.

This Space is a front-end over `plant-genomics-mcp`, which ships 50 tools over stdio. The eight below are the ones given a UI here.

Tools

toolwhat it answerssource
gene_report"Tell me about this gene" — a full Markdown dossier6 backends, in parallel
ensembl_plants_lookup_locusCoordinates, strand, biotype, descriptionEnsembl Plants
resolve_locus_to_uniprotCanonical protein record for a locusUniProtKB
locus_go_annotationsGO terms for one gene, rolled up by aspectQuickGO (EBI)
go_enrichmentWhat a gene set is enriched forg:Profiler
locus_literaturePapers mentioning the locusEurope PMC
gramene_homologsOrthologs and paralogsGramene compara
string_interactionsProtein–protein partners, with per-channel scoresSTRING-DB

locus_go_annotations and go_enrichment are easy to confuse and answer different questions: the first takes one locus and returns its terms, the second takes a gene list and returns what that list is over-represented for — the question you actually have about a differential-expression cluster.

Connect an agent

The MCP endpoint is /gradio_api/mcp/; the tool schema is browsable at /gradio_api/mcp/schema.

json
{
  "mcpServers": {
    "plant-genomics": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://musharna-plant-genomics-mcp.hf.space/gradio_api/mcp/",
        "--transport",
        "streamable-http"
      ]
    }
  }
}

For the full 50-tool surface, run it locally over stdio instead — no network hop, no Space cold start:

bash
uvx --from plant-genomics-mcp plant-genomics-mcp

⚠️ On latency

These are live public APIs and their response times are not under this Space's control. Ensembl Plants in particular is highly variable: measured 0.14 s, 25.8 s and 32.7 s for the same call on different loci within one session, against 2.7 s for a direct request to the same endpoint. Repeat queries within a running instance are served from an in-process cache.

gene_report fans out to six backends in parallel, so it is bounded by the slowest leg — typically ~20 s. That is the upstream floor, not overhead added here. A slow call is usually not a hang; budget for it.

A Space also cold-starts after inactivity, which is separate from and additional to the above.

Errors

Failures are raised, not silently swallowed. The library's typed errors survive to the MCP payload with their class name intact — a locus with no UniProt entry returns isError: true and [NotFoundError] UniProt has no entry for gene=… organism_id=… rather than an empty result that would read as "no annotations".

Implementation note

app.py imports the domain modules of plant_genomics_mcp (the data-source clients) and deliberately never imports plant_genomics_mcp.server. That module is a stdio MCP server in its own right; importing it here would stand up a second MCP server inside the Gradio process. Gradio is the transport, the library supplies the domain layer, and one shared httpx.AsyncClient is reused across calls.

See requirements.txt for why plant-genomics-mcp is pinned to 1.20.0 rather than 1.21.0 — short version: Gradio's MCP server requires mcp<2, 1.21.0 migrated its own transport to mcp>=2, and every domain module this Space uses is byte-identical between the two releases.

Provenance

Unofficial with respect to every data source listed. Not affiliated with, endorsed by, or sponsored by EMBL-EBI, Ensembl, UniProt, Gramene, STRING-DB, g:Profiler or their host institutions. Each source carries its own terms and citation requirements — cite the underlying databases, not this Space, when you publish.