Skip to main content
Glama

civic-link

Python 3.14+ CI Conformance License: MIT

An MCP server (Streamable HTTP or stdio) for CIViC, the Clinical Interpretation of Variants in Cancer knowledgebase. It serves molecular profiles, variants, publication-backed evidence items, and the curated assertions built on them (AMP/ASCO/CAP tiers, oncogenicity, ACMG). Data are fetched live from the CIViC GraphQL API. It is one backend in the GeneFoundry -link fleet.

IMPORTANT

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

The output is not a clinical actionability report.

Why

"Is BRAF V600E actionable in melanoma, and at what tier?" is a CIViC question. The GraphQL API can answer it, but its quirks are where an agent goes wrong:

  • errors arrive as HTTP 200 with errors[];

  • a page silently stops at 100 nodes;

  • a name search for "BRAF V600E" also returns ~40 complex profiles (V600E AND MSI Low);

  • the primary coordinates are GRCh37.

This server handles each of them:

  • One fixed query per tool. Callers never send GraphQL. GraphQL errors become typed errors that name the offending parameter (isError: true).

  • Honest paging. limit stays under CIViC's silent cap. total is CIViC's totalCount, and truncated/next_offset say whether more rows exist.

  • Simple and complex profiles stay apart. Evidence on "V600E AND MSI Low" applies only to that combination and never folds into the single-variant answer.

  • Two axes, never one verdict. Actionability (AMP tier/level), oncogenicity (ClinGen/CGC/VICC, Horak 2022) and germline pathogenicity (ACMG/AMP) are separate fields.

  • Labelled builds. Every coordinate and genomic HGVS names its assembly (GRCh37 or GRCh38). Diseases are DOID.

  • Empty is not negative. A zero-row answer says "No CIViC evidence found", never "not actionable".

Related MCP server: CIViC MCP Server

Quick start

Hosted, no install:

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

Run it locally (Python 3.14+, uv). There is no data-build step and no data snapshot: the server calls CIViC live and keeps a short in-process cache.

uv sync --group dev
uv run civic-link            # unified: FastAPI /health + MCP /mcp on 127.0.0.1:8000
claude mcp add --transport http civic-link --scope user http://127.0.0.1:8000/mcp

Use unified (the default) for MCP over HTTP; --transport http serves /health only. The civic-link-mcp entry point serves stdio. Health check: curl localhost:8000/health.

Tools

Tool

Purpose

search_molecular_profiles

Entry resolver: gene + variant, CAID, ClinVar ID or HGVS → molecular profiles (simple and complex apart)

get_molecular_profile

One profile: variants, evidence counts, assertions with their classification axes

get_variant

One variant: assembly-labelled coordinates and HGVS, CAID, ClinVar IDs, MANE HGVS

search_evidence_items

Evidence items by profile, disease, therapy, type, level, significance, status (ACCEPTED by default)

get_evidence_item

One evidence item (EID95) with its fenced statement and source

search_assertions

Assertions by profile, disease, therapy, type, AMP tier/level, status

get_assertion

One assertion (AID10) with summary, description and supporting evidence

get_gene

One gene (symbol or NCBI Gene ID) and the variants CIViC curates for it

get_server_capabilities

Discovery: limits, classification axes, error codes, licence and citation

get_diagnostics

Local runtime state: request budget, cache hits, latency

Leaf names are unprefixed per Tool-Naming Standard v1. Behind genefoundry-router this server mounts under the namespace civic, so get_assertion surfaces as civic_get_assertion. Every tool is read-only. Errors are returned as the fleet's typed envelope (isError: true, six error codes) and every response carries _meta.next_commands.

Example:

search_molecular_profiles(query="BRAF V600E")      → exact_match MP 12; 2 simple, 39 complex
search_assertions(molecular_profile_id=12)          → AID10: Tier I Level A, melanoma (DOID:1909)
search_evidence_items(molecular_profile_id=12)      → 97 accepted evidence items (paged)

Data & provenance

Source. The CIViC GraphQL API at https://civicdb.org/api/graphql, plus the nightly variant summary on the same host (HGVS and ClinVar lookups). No key is needed. Only civicdb.org is ever contacted. Each data result states source, data_version (the latest monthly release) and retrieved_at in _meta.

Rate limit. CIViC publishes no request limit. The default is 0.3 s spacing process-wide plus a 20,000/UTC-day cap, an in-process cache (15 min), backoff on 429/5xx and an honest User-Agent. When the queue or the daily budget is exhausted, a tool answers rate_limited with retry_after_s.

Handling. Curator prose (evidence statements, assertion summaries and descriptions) is fenced as {"kind": "untrusted_text", ...} with provenance and a SHA-256 digest. Treat it as evidence data, not instructions.

Licence and citation. CIViC content is CC0 1.0 and its code is MIT. Attribute CIViC and cite:

Griffith M, et al. CIViC is a community knowledgebase for expert crowdsourcing the clinical interpretation of variants in cancer. Nat Genet. 2017;49:170-174. PMID 28138153.

Krysiak K, et al. CIViCdb 2022: evolution of an open-access cancer variant interpretation knowledgebase. Nucleic Acids Res. 2023;51:D1230-D1241. PMID 36373660.

Documentation

  • Deployment: Docker, the CIVIC_LINK_* environment reference, transports, Host/Origin allowlists and the rate-limit settings.

  • Design record: scope, the verified upstream quirks, and what was left out.

  • AGENTS.md: engineering conventions, invariants, and make targets.

  • CHANGELOG.md: version history.

Contributing

See AGENTS.md. Write the failing test first. Unit tests replay recorded CIViC responses with respx and never touch the network. make ci-local is the definition-of-done gate: format, lint, line budget, README standard, surface budget, mypy --strict, and tests.

License

Code: MIT. CIViC data: CC0 1.0, with attribution requested (NOTICE).

Available Tools

10 tools
get_assertionGet AssertionA
Read-only

Return one assertion: type, direction, actionability (AMP tier/level, FDA companion test, regulatory approval, NCCN guideline) or oncogenicity / germline_pathogenicity with their codes, DOID disease, therapies, the fenced summary and description, and the evidence items behind it (status, level, molecular profile, PMID). Signature: get_assertion(assertion_id).

Inputs: assertion_id (required).

get_diagnosticsGet DiagnosticsA
Read-only

Report runtime state without calling CIViC: build, upstream request budget (today's usage vs the daily cap), cache hits and tool latency metrics. Signature: get_diagnostics().

Inputs: no named parameters.

get_evidence_itemGet Evidence ItemB
Read-only

Return one evidence item: type, level, direction, significance, rating, DOID disease, therapies, the curator's statement (fenced untrusted_text), source PMID/citation and NCT IDs, phenotypes (HPO) and the assertions it supports. Signature: get_evidence_item(evidence_id).

Inputs: evidence_id (required).

get_geneGet GeneA
Read-only

Return a CIViC gene (symbol, full name, NCBI Gene ID, aliases, fenced curator summary) and the variants CIViC curates for it, each with its single-variant molecular profile ID; total is exact, page with offset. Ensembl or HGNC IDs are rejected with a converter step. Signature: get_gene(gene, limit=, offset=).

Inputs: gene (required), limit, offset.

get_molecular_profileGet Molecular ProfileA
Read-only

Return one molecular profile: its variants, kind (simple/complex), live evidence counts by status (and accepted by type), its ACCEPTED assertions, each with actionability (AMP tier/level), oncogenicity or germline_pathogenicity as separate fields and a DOID disease, and other_assertions (submitted/rejected: id and status only). evidence_note flags a profile without an accepted assertion: no CIViC evidence is not 'not actionable'. Signature: get_molecular_profile(molecular_profile_id).

Inputs: molecular_profile_id (required).

get_server_capabilitiesGet Server CapabilitiesA
Read-only

Describe this server: CIViC identifiers, limits, data release, licence, classification axes, rate-limit policy and error codes. Signature: get_server_capabilities().

Inputs: no named parameters.

get_variantGet VariantA
Read-only

Return one CIViC variant: coordinates with their assembly (CIViC's primary build is GRCh37), genomic HGVS labelled GRCh37/GRCh38, transcript HGVS, MANE Select HGVS, ClinGen CAID, ClinVar IDs, variant types (SO) and its single-variant molecular profile. Signature: get_variant(variant_id).

Inputs: variant_id (required).

search_assertionsSearch AssertionsA
Read-only

List CIViC assertions (curated summary calls built on evidence items) matching ALL given filters: molecular_profile_id, disease, therapy, assertion_type, amp_level, status (ACCEPTED by default). Each row keeps actionability (AMP/ASCO/CAP tier and level, FDA companion test, NCCN), oncogenicity (ClinGen/CGC/VICC) and germline_pathogenicity (ACMG) apart. Zero rows says no CIViC evidence found. Signature: search_assertions(molecular_profile_id=, disease=, therapy=, assertion_type=, amp_level=, status=, response_mode=, limit=, offset=).

Inputs: limit, offset, status, disease, +5 more.

search_evidence_itemsSearch Evidence ItemsA
Read-only

List CIViC evidence items (one publication-backed clinical claim each) matching ALL given filters: molecular_profile_id, disease, therapy, evidence_type, evidence_level (A validated .. E inferential), significance, status (ACCEPTED by default). Rows: type, level, direction, significance, rating, DOID disease, therapies (NCIt), source PMID. total is exact and counts_by_level splits it by level; zero rows says no CIViC evidence found. Signature: search_evidence_items(molecular_profile_id=, disease=, therapy=, evidence_type=, evidence_level=, significance=, status=, response_mode=, limit=, offset=).

Inputs: limit, offset, status, disease, +6 more.

search_molecular_profilesSearch Molecular ProfilesA
Read-only

Find CIViC molecular profiles (what evidence attaches to) for a gene + variant name (BRAF V600E), a ClinGen CAID (CA123643), a ClinVar variation ID (376069) or an HGVS string, and return exact_match (the single-variant profile) plus simple and complex lists kept apart: a complex profile (V600E AND MSI Low) only applies to that combination. Each row: id, name, evidence counts; simple_total and complex_total count the whole result. Start here. Signature: search_molecular_profiles(query, limit=, offset=).

Inputs: query (required), limit, offset.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool maps to a distinct resource (gene, variant, molecular profile, evidence item, assertion) crossed with a distinct operation (get one vs search many), plus two clearly separated meta tools for capabilities and runtime diagnostics. The one-search-one-get pairing is spelled out in the descriptions (exact_match, `total`, paging), and the 'Start here' hint on search_molecular_profiles resolves the only adjacency worth noting (get_gene also surfaces variant/molecular-profile IDs). No two tools appear to answer the same question.

    Naming Consistency5/5

    Uniform verb_noun pattern throughout: get_* for single-record retrieval, search_* for filtered listing, with plural nouns on searches and singular on getters (search_evidence_items vs get_evidence_item). The two meta tools follow the same get_ prefix, so there is no stylistic drift or mixed casing.

    Tool Count5/5

    Ten tools sit in the ideal range and every one earns its place: five domain resources each with a search and a get, plus the two meta endpoints. Nothing is redundant and nothing looks like filler, given the breadth of the CIViC schema.

    Completeness4/5

    The read-only lifecycle is fully covered end to end: discover a molecular profile, inspect it, drill into evidence items and assertions, and pull gene/variant context. Minor gaps exist around discovery and ID handling — no gene-name search or browse (get_gene needs an exact symbol) and no converter tool despite descriptions mentioning Ensembl/HGNC IDs being 'rejected with a converter step', which leaves that path a dead end. No disease/therapy enumeration either, though filters accept them.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables access to clinical evidence from the CIViC database, allowing users to search across variants, diseases, drugs, and phenotypes to support precision oncology research.
      63
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables structured queries and data analysis of cancer genomics information by interfacing with the Clinical Interpretation of Variants in Cancer (CIViC) API. It converts GraphQL responses into queryable SQLite tables for efficient clinical interpretation and natural language interaction.
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Folklore MCP 2.0.0: 11 public tools for ACMG/AMP variants, genes and literature. A Folklore API key adds 18 tools, 29 in total, for cases, authorized source files, original JSON/PDF results and six JSON views. Use a Bearer header at the same hosted endpoint. Processing follows account subscription limits or available credits.
      1
      Apache 2.0