CI

CIViC MCP Server for Clinical Variant Interpretations

Access CIViC MCP server for clinical variant interpretations and genomic evidence to support cancer research and precision oncology.

Quick Install
npx -y @QuentinCody/civic-mcp-server

Overview

The CIViC MCP Server exposes clinical variant interpretations and linked genomic evidence from the CIViC knowledgebase through a Model Context Protocol (MCP)–compatible HTTP API. Its purpose is to make curated cancer variant data readily available as structured context that can be consumed by downstream services, model-driven applications, or interactive assistants used in precision oncology and cancer research.

By packaging CIViC content into MCP-style context objects and offering search and retrieval endpoints, the server streamlines integration of evidence-backed interpretations into pipelines that require reliable, up-to-date variant annotations. Developers can use this server to pull targeted context for prompting large language models (LLMs), powering clinical decision support tools, or enriching research dashboards with provenance-aware genomic evidence.

Features

  • Exposes CIViC clinical variant interpretations and supporting evidence as MCP-style context objects
  • Full-text and structured search over variants, genes, and evidence records
  • HTTP API suitable for programmatic consumption by LLM prompt-generation services and microservices
  • Docker-friendly deployment for reproducible local and cloud environments
  • Configurable data source and connection parameters to integrate with existing CIViC instances or mirrored datasets
  • Lightweight caching and pagination to support low-latency retrieval in production use

Installation / Configuration

Minimum steps to get the server running locally. The repo supports running from source or as a container. Replace placeholders with values from your environment or the repository README.

Clone the repository:

git clone https://github.com/QuentinCody/civic-mcp-server.git
cd civic-mcp-server

Install dependencies and run (if the project uses Node / Python—check repository README for exact commands):

# Example for a Node-based project
npm install
npm run build
npm start

Run with Docker (recommended for testing and deployment):

# Build the image
docker build -t civic-mcp-server .

# Run the container (example)
docker run -d \
  -p 8080:8080 \
  -e PORT=8080 \
  -e DATABASE_URL="postgres://user:pass@db:5432/civic" \
  -e CIVIC_API_TOKEN="your_token_here" \
  --name civic-mcp-server \
  civic-mcp-server

Typical environment variables (example table — check repo for exact names):

VariablePurposeExample
PORTHTTP port for server8080
DATABASE_URLDatabase connection string for variant/evidence storagepostgres://user:pass@host:5432/db
CIVIC_API_TOKENOptional token for upstream CIViC API accessabcd1234
MCP_BASE_PATHBase path for MCP endpoints/mcp

If the repository includes migrations, run them before starting:

# Example commands—replace with actual migration tool used by the project
npm run migrate
# or
alembic upgrade head

Available Resources

  • Project repository: https://github.com/QuentinCody/civic-mcp-server
  • CIViC knowledgebase: https://civicdb.org
  • Model Context Protocol (MCP) specification: (refer to the MCP spec linked from the repo or project documentation)
  • Example client integrations and sample scripts can typically be found in the repo’s examples/ or docs/ directory

Use Cases

  1. LLM-assisted variant interpretation

    • Scenario: A clinical assistant needs concise, evidence-backed context to answer questions about a variant (e.g., TP53 R175H).
    • Flow: Query the MCP server for context objects matching the variant, attach the interpretation and key evidence to the LLM prompt to ground responses with provenance.

    Example (illustrative curl):

    curl "http://localhost:8080/mcp/context?gene=TP53&variant=R175H" \
      -H "Accept: application/json"
    

    Example response (illustrative):

    {
      "id": "variant-123",
      "name": "TP53 R175H",
      "interpretation": "Likely pathogenic",
      "evidence_count": 12,
      "evidence": [
        { "evidence_id": "EID001", "summary": "Association with therapy X", "citation": "PMID:..." }
      ]
    }
    
  2. Research cohort annotation

    • Scenario: A genomics pipeline annotates VCFs with clinical interpretations for downstream analysis.
    • Flow: For each variant, call the MCP server to retrieve canonical interpretation and evidence and append structured annotations to VCF/JSON output.
  3. Clinical dashboard and search

    • Scenario: A molecular tumor board dashboard provides searchable access to curated CIViC evidence.
    • Flow: Use the server’s search endpoints to implement autosuggest, filters by gene/variant/disease, and to display provenance-linked evidence summaries.
  4. Automated triage and alerting

    • Scenario: Monitoring pipelines detect variants of interest and automatically fetch supporting CIViC evidence to trigger clinical review.
    • Flow: Use programmatic access to quickly surface high-confidence interpretations and links to primary literature.

Notes for Developers

  • Consult the repository README and docs for exact API routes, authentication requirements, and schema definitions before integrating.
  • The server is intended to be a context provider rather than an authoritative clinical decision-making engine—use it to augment workflows with evidence-backed context and ensure downstream systems apply appropriate clinical validation.
  • For production deployments, secure access to the server (TLS, authentication), configure persistent storage, and set up monitoring for performance and data freshness.