pharmacogenomics-guidelines-mcp-server

v0.2.0 pre-1.0

Find pharmacogenomics guidelines, translate diplotypes, and retrieve prescribing recommendations via MCP. STDIO or Streamable HTTP.

pharmacogenomics-guidelines.caseyjhand.com/mcp
claude mcp add --transport http pharmacogenomics-guidelines-mcp-server https://pharmacogenomics-guidelines.caseyjhand.com/mcp
codex mcp add pharmacogenomics-guidelines-mcp-server --url https://pharmacogenomics-guidelines.caseyjhand.com/mcp
{
  "mcpServers": {
    "pharmacogenomics-guidelines-mcp-server": {
      "url": "https://pharmacogenomics-guidelines.caseyjhand.com/mcp"
    }
  }
}
gemini mcp add --transport http pharmacogenomics-guidelines-mcp-server https://pharmacogenomics-guidelines.caseyjhand.com/mcp
{
  "mcpServers": {
    "pharmacogenomics-guidelines-mcp-server": {
      "command": "bunx",
      "args": [
        "mcp-remote",
        "https://pharmacogenomics-guidelines.caseyjhand.com/mcp"
      ]
    }
  }
}
{
  "mcpServers": {
    "pharmacogenomics-guidelines-mcp-server": {
      "type": "http",
      "url": "https://pharmacogenomics-guidelines.caseyjhand.com/mcp"
    }
  }
}
curl -X POST https://pharmacogenomics-guidelines.caseyjhand.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1.0.0"}}}'

Tools

6

pgx_search_pairs

open-world

Search evaluated gene–drug pairs by gene, literal drug-name substring, exact drug/RxNorm/ATC identifiers, evaluation level or testing label. Filters combine with AND; identifiers never fall back to name-only search. Results include source drug identifiers and guideline links for pgx_get_guideline. A pair evaluation is not a prescribing recommendation. Follow nextOffset to continue.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "pgx_search_pairs",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "geneSymbol": {
      "description": "Exact gene symbol, case-insensitive input; blank means unset.",
      "type": "string",
      "maxLength": 100
    },
    "drugName": {
      "description": "Literal case-insensitive drug-name substring; blank means unset.",
      "type": "string",
      "maxLength": 200
    },
    "drugId": {
      "description": "Exact drugId returned by pgx_search_pairs; blank means unset.",
      "type": "string",
      "maxLength": 200
    },
    "rxnormId": {
      "description": "Decimal RxNorm ID, optionally prefixed RxNorm:; blank means unset.",
      "type": "string",
      "pattern": "^(?:\\s*|\\s*(?:RxNorm:)?\\d+\\s*)$"
    },
    "atcId": {
      "description": "Exact ATC code (1–7 letters/digits), optionally prefixed ATC:; blank means unset.",
      "type": "string",
      "pattern": "^(?:\\s*|\\s*(?:ATC:)?[a-z\\d]{1,7}\\s*)$"
    },
    "cpicLevel": {
      "description": "Exact source CPIC evaluation level, not a prescribing recommendation.",
      "type": "string",
      "enum": [
        "A",
        "A/B",
        "B",
        "B/C",
        "C",
        "C/D",
        "D",
        "Retired"
      ]
    },
    "provisional": {
      "description": "Filter by source provisional flag.",
      "type": "boolean"
    },
    "pgxTesting": {
      "description": "ClinPGx label-annotation testing level; not an FDA label.",
      "type": "string",
      "enum": [
        "Actionable PGx",
        "Informative PGx",
        "No Clinical PGx",
        "Testing Recommended",
        "Testing Required"
      ]
    },
    "usedForRecommendation": {
      "description": "Whether the source marks the pair as used for a recommendation.",
      "type": "string",
      "enum": [
        "Yes",
        "No"
      ]
    },
    "includeRetired": {
      "default": false,
      "description": "Include Retired pairs; also included when cpicLevel is Retired.",
      "type": "boolean"
    },
    "limit": {
      "default": 25,
      "description": "Maximum rows to return (1–100; default 25).",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "offset": {
      "default": 0,
      "description": "Zero-based offset; use nextOffset to continue (default 0).",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "includeRetired",
    "limit",
    "offset"
  ],
  "additionalProperties": false
}
view source ↗

pgx_get_guideline

open-world

Retrieve guideline coverage by source ID, exact gene symbol or exact drug name/ID. Default summary pages complete guideline records with exact drugCount/pairCount. view=drugs or pairs requires by=id and pages only that related collection, retaining its guideline descriptor. Ambiguous drug names page candidates for retry with drugId. Follow page.nextOffset; the 24,000-byte soft budget cuts only between complete rows, with oversizedRow for an indivisible exception. Missing coverage is found=false. Consult linked guidelines before clinical use.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "pgx_get_guideline",
    "arguments": {
      "by": "<by>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "view": {
      "default": "summary",
      "description": "Summary pages guideline descriptors; drugs or pairs requires by=id and pages only that related collection.",
      "type": "string",
      "enum": [
        "summary",
        "drugs",
        "pairs"
      ]
    },
    "by": {
      "type": "string",
      "enum": [
        "id",
        "gene",
        "drug"
      ],
      "description": "id requires guidelineId; gene requires geneSymbol; drug requires exactly one exact drugName or drugId. Other selectors must be omitted."
    },
    "guidelineId": {
      "description": "Positive source guideline ID from pgx_get_guideline by=gene or by=drug results; no valid ID range is inferred.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "geneSymbol": {
      "description": "Gene symbol for by=gene; blank means unset.",
      "type": "string",
      "maxLength": 100
    },
    "drugName": {
      "description": "Exact case-insensitive source drug name for by=drug; blank means unset.",
      "type": "string",
      "maxLength": 200
    },
    "drugId": {
      "description": "Exact drugId returned by pgx_search_pairs; blank means unset.",
      "type": "string",
      "maxLength": 200
    },
    "limit": {
      "default": 25,
      "description": "Positive safe-integer row limit; values above 100 are clamped to 100 with a notice (default 25).",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "offset": {
      "default": 0,
      "description": "Zero-based offset; use nextOffset to continue (default 0).",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "view",
    "by",
    "limit",
    "offset"
  ],
  "additionalProperties": false
}
view source ↗

pgx_lookup_diplotype

open-world

Translate a CPIC-supported diplotype or allele-status result for one gene. Supply geneSymbol and exact diplotype notation, including star alleles, named HLA positive/negative statuses, or non-star sequences; use pgx_search_alleles and pgx_list_reference with topic phenotypes to inspect supported values. Exact lookup precedes bounded reverse-order or status aliases. Multiple source rows remain ambiguous; no activity score or missing gene result is inferred.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "pgx_lookup_diplotype",
    "arguments": {
      "geneSymbol": "<geneSymbol>",
      "diplotype": "<diplotype>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "geneSymbol": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "Gene symbol, such as CYP2C19 or HLA-B; outer whitespace is ignored."
    },
    "diplotype": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500,
      "description": "Exact source diplotype or allele-specific status, such as *1/*2 or *15:02 positive."
    }
  },
  "required": [
    "geneSymbol",
    "diplotype"
  ],
  "additionalProperties": false
}
view source ↗

pgx_get_recommendations

open-world

Browse CPIC recommendations in drug mode with one exact drugName or drugId. Match across drugs in results mode with geneResults or geneSymbol plus phenotype/activityScore, or genotype mode with 1–10 uniquely resolved gene/diplotype entries. Both matching modes accept an optional drug. Use pgx_list_reference topic phenotypes for source values. Every matched prerequisite must be explicit; omitted genes are never normal or negative. Preserve populations, scores, classifications and source text. Follow page.nextOffset and incompletePage.nextOffset independently; consult linked guidelines before clinical use.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "pgx_get_recommendations",
    "arguments": {
      "mode": "<mode>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "drug",
        "genotype",
        "results"
      ],
      "description": "drug requires one drugName or drugId; genotype requires genotype; results requires geneResults or geneSymbol with phenotype/activityScore. Genotype/results optionally accept one drug selector."
    },
    "drugName": {
      "description": "Exact case-insensitive drug name; obtain names with pgx_search_pairs. Blank means unset.",
      "type": "string",
      "maxLength": 200
    },
    "drugId": {
      "description": "Exact drugId returned by pgx_search_pairs; blank means unset.",
      "type": "string",
      "maxLength": 200
    },
    "geneSymbol": {
      "description": "Gene for a scalar result or exploratory gene filter. Required for a scalar result when the drug has multiple genes.",
      "type": "string",
      "maxLength": 100
    },
    "phenotype": {
      "description": "Source phenotype for geneSymbol; inspect pgx_list_reference topic phenotypes. Excludes activityScore and geneResults.",
      "type": "string",
      "maxLength": 500
    },
    "activityScore": {
      "description": "Source activity score for geneSymbol; excludes phenotype and geneResults.",
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500,
          "description": "Exact source decimal or nonnumeric score label; blank means unset."
        },
        {
          "type": "number",
          "description": "A supplied numeric source score; no score is calculated."
        }
      ]
    },
    "geneResults": {
      "description": "Explicit results for 1–10 genes; excludes scalar geneSymbol, phenotype, activityScore and genotype.",
      "type": "object",
      "propertyNames": {
        "type": "string",
        "minLength": 1,
        "maxLength": 100,
        "description": "Gene symbol, normalized to uppercase."
      },
      "additionalProperties": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "phenotype",
                "description": "Match the source phenotype, retaining every matching score."
              },
              "value": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500,
                "description": "Exact source result or activity-score string; outer whitespace is ignored."
              }
            },
            "required": [
              "kind",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "activityScore",
                "description": "Match a source activity score by exact decimal equivalence."
              },
              "value": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500,
                "description": "Exact source result or activity-score string; outer whitespace is ignored."
              }
            },
            "required": [
              "kind",
              "value"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "const": "alleleStatus",
                "description": "Match one named allele status, including its allele identity."
              },
              "value": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500,
                "description": "Exact source result or activity-score string; outer whitespace is ignored."
              }
            },
            "required": [
              "kind",
              "value"
            ],
            "additionalProperties": false
          }
        ],
        "description": "An explicit gene result; distinct kinds are never inferred from one another."
      }
    },
    "genotype": {
      "description": "Required in genotype mode: 1–10 explicit gene/diplotype entries. Every entry must resolve uniquely before lookup.",
      "type": "object",
      "propertyNames": {
        "type": "string",
        "minLength": 1,
        "maxLength": 100,
        "description": "Gene symbol, normalized to uppercase."
      },
      "additionalProperties": {
        "type": "string",
        "minLength": 1,
        "maxLength": 500,
        "description": "Source-supported diplotype or named allele-status notation."
      }
    },
    "population": {
      "description": "Exact source population after outer whitespace trimming; all matching rows are retained.",
      "type": "string",
      "maxLength": 200
    },
    "limit": {
      "default": 10,
      "description": "Maximum recommendations to return (1–50; default 10).",
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    },
    "offset": {
      "default": 0,
      "description": "Zero-based offset; use nextOffset to continue (default 0).",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "incompleteLimit": {
      "default": 25,
      "description": "Maximum incomplete diagnostics per page (default 25; maximum 100).",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "incompleteOffset": {
      "default": 0,
      "description": "Independent zero-based incomplete diagnostic offset; follow incompletePage.nextOffset.",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "mode",
    "limit",
    "offset",
    "incompleteLimit",
    "incompleteOffset"
  ],
  "additionalProperties": false
}
view source ↗

pgx_search_alleles

open-world

Inspect CPIC allele function, evidence, definition metadata and complete population frequencies for geneSymbol. Name matches literally first, then a matching gene prefix before a star allele may be removed; clinicalFunctionalStatus matches literal text case-insensitively. Discover genes with pgx_list_reference. Definitions are metadata, not variant interpretation. Frequencies are source fractions; inferred frequencies are not observations and do not establish individual risk. Pages have a 24,000-byte complete-result soft budget; an indivisible exception sets oversizedRow. Continue with page.nextOffset.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "pgx_search_alleles",
    "arguments": {
      "geneSymbol": "<geneSymbol>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "geneSymbol": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "Gene symbol, such as CYP2C19 or HLA-B; outer whitespace is ignored."
    },
    "name": {
      "description": "Exact source allele name; blank means unset.",
      "type": "string",
      "maxLength": 500
    },
    "clinicalFunctionalStatus": {
      "description": "Case-insensitive literal source clinical functional status; blank means unset.",
      "type": "string",
      "maxLength": 100
    },
    "limit": {
      "default": 25,
      "description": "Positive safe-integer row limit; values above 100 are clamped to 100 with a notice (default 25).",
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "offset": {
      "default": 0,
      "description": "Zero-based offset; use nextOffset to continue (default 0).",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "geneSymbol",
    "limit",
    "offset"
  ],
  "additionalProperties": false
}
view source ↗

pgx_list_reference

open-world

Inspect gene symbols, gene-specific source results, CPIC levels, ClinPGx testing labels, recommendation classifications and input formats. phenotypes requires geneSymbol and preserves distinct activity-score rows, frequencies and consultation text. Live genes/phenotypes support paging; static topics return their complete vocabulary without upstream requests. Use returned values in subsequent discovery, diplotype and recommendation calls.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "pgx_list_reference",
    "arguments": {
      "topic": "<topic>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "topic": {
      "type": "string",
      "enum": [
        "genes",
        "phenotypes",
        "cpic_levels",
        "pgx_testing",
        "classifications",
        "input_formats"
      ],
      "description": "genes lists source gene records; phenotypes requires geneSymbol and lists full gene-result rows; other topics return verified static vocabulary."
    },
    "geneSymbol": {
      "description": "Exact gene symbol; required for phenotypes, optional for genes, omit for static topics.",
      "type": "string",
      "maxLength": 100
    },
    "limit": {
      "default": 25,
      "description": "Maximum rows to return (1–100; default 25).",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "offset": {
      "default": 0,
      "description": "Zero-based offset; use nextOffset to continue (default 0).",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "topic",
    "limit",
    "offset"
  ],
  "additionalProperties": false
}
view source ↗