mcp-genelab
v1.0.0MCP server for querying the NASA GeneLab Knowledge Graph with specialist tools for differential gene expression, DNA methylation, and organism abundance…
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
create_session
Start a session and obtain the `session_id` that EVERY other tool on this server requires. WHEN TO USE THIS TOOL: Call this ONCE at the beginning of a conversation, before any other mcp-genelab tool. Also call it again whenever a tool replies that the session is unknown or expired. WHY: This server runs as a single shared process serving many users at once. The session id is the only thing that keeps YOUR output directory and YOUR generated plots (retrievable via `fetch_plot`, `get_save_script` and the `plot://{s…
end_session
End a session immediately, discarding its output-directory setting and all plots it holds. Optional — sessions also expire on their own. Call it when the user is done, to free server memory promptly. After this, a new `create_session()` is needed before further tool calls.
| Parameter | Type | Description |
|---|---|---|
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |
fetch_plot
Re-fetch the PNG bytes of a plot previously generated IN THIS SESSION. WHEN TO USE THIS TOOL: Call this when you need the canonical PNG bytes for a plot that's already been generated. Common cases: - The inline image in the original plot tool response was corrupted or didn't render in the client. - You need the bytes for a downstream step (e.g. embedding in a transcript, saving to a side file, base64-encoding for an external API). - The user asked to see the plot again without re-running the…
| Parameter | Type | Description |
|---|---|---|
filename * | string | Suggested filename of a previously generated plot (e.g. 'venn_expression_2way_OSD-244.png'). Look at the most recent create_volcano_plot or create_venn_diagram response — the filename appears in the… |
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |
get_neo4j_schema
List all nodes, their attributes and their relationships to other nodes in the neo4j database. If this fails with a message that includes "Neo.ClientError.Procedure.ProcedureNotFound" suggest that the user install and enable the APOC plugin.
| Parameter | Type | Description |
|---|---|---|
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |
set_output_directory
Configure the output directory for files generated in THIS SESSION. WHEN TO USE THIS TOOL: Call this tool at the START of a session (right after create_session), before any tool that produces a downloadable file (create_volcano_plot, create_venn_diagram, or any tool that emits a CSV). The path you specify is where the user wants finished files to end up on THEIR OWN local machine. WHAT IT DOES: Stores the provided path string in the server's session-scoped state (keyed on your session_id — other sessions cannot see or…
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path on the USER's local machine where output files (volcano plots, Venn diagrams, CSV exports) should be saved. Examples: '/Users/jane/Downloads', '/home/jane/Downloads', 'C:/Users/Jane/Down… |
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |
get_output_directory
Return the currently-configured output directory for this session. Returns the path previously set by set_output_directory in the same session, or a note explaining that no path has been set yet (and how to set one).
| Parameter | Type | Description |
|---|---|---|
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |
get_save_script
Return guidance for saving a plot generated in THIS SESSION to the user's local filesystem. WHEN TO USE THIS TOOL: Call this only when the user explicitly asks for save guidance for a specific plot — for example, "how do I save the volcano plot to my Downloads folder?" or "I can't right-click — give me another way to save the plot." By default plot tools (create_volcano_plot, create_venn_diagram) return only a SHORT save hint to keep response sizes manageable. The detailed save options are delivered on demand via this…
| Parameter | Type | Description |
|---|---|---|
filename | Suggested filename of a recently generated plot (e.g. 'volcano_plot_OSD-244_expression_30_days_vs_60_days.png'). Look at the most recent create_volcano_plot or create_venn_diagram response — the fil… | |
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |
query
FALLBACK Cypher executor. Use this ONLY when no specialist tool covers the question. DO NOT call this tool when the question matches one of these patterns — call the named tool instead, EVEN IF you think Cypher would be more flexible: - "up/down-regulated genes", "DEGs", "differential expression", "log2fc rankings", "top N up/downregulated genes for assay X" → find_differentially_expressed_genes(assay_id=...) - "hyper/hypo-methylated regions", "DMRs", "methylation_diff", "hypermethylated promoter regions", "all D…
| Parameter | Type | Description |
|---|---|---|
query * | string | The Cypher query to execute. |
params | The parameters to pass to the Cypher query. | |
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |
get_node_metadata
Get metadata for all nodes from MetaNode nodes in the knowledge graph.
| Parameter | Type | Description |
|---|---|---|
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |
get_relationship_metadata
Get descriptions of properties of all relationships in the knowledge graph.
| Parameter | Type | Description |
|---|---|---|
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |
get_study_info
USE THIS TOOL (not the `query` tool) for any study-metadata question: "what assays does study X have", "tell me about OSD-267", project title, description, host organism, missions, factor space, or any inventory of a study's assays. Falling back to `query` for these reproduces the work this tool already does and loses the formatted markdown + inline CSV side-channel. Return detailed information about a study, including its assays with their technology and measurement types. This tool queries the GeneLab KG for: 1) Study metada…
| Parameter | Type | Description |
|---|---|---|
study_id * | string | Study identifier (e.g., 'OSD-267') |
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |
select_assays
USE THIS TOOL (not the `query` tool) for ANY question about the groups a study contains, and to resolve a factor-pair condition into the matching assay identifier(s): - "What groups / conditions / control and experimental (treatment) groups are in OSD-48?", "which comparisons or factors does this study have?", "what was compared against what?" — call with just `study_id` (list mode). The numbered factor menu it returns IS the list of groups: each entry is one experimental group (a set of factor values such…
| Parameter | Type | Description |
|---|---|---|
selection | ||
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… | |
study_id |
find_differentially_expressed_genes
USE THIS TOOL (not the `query` tool) for any "up/down-regulated genes", "DEGs", or "differential expression" question for a single assay. The `query` tool can express the same Cypher, but using it for this category loses the formatted markdown tables, the inline CSV side-channel, the proper adj_p_value handling, and the parallel execution of the count queries this tool already provides correctly. Return the top-N up- and down-regulated genes for a given assay_id. This tool runs two queries on the GeneLab KG: 1) Top-N upregula…
| Parameter | Type | Description |
|---|---|---|
assay_id * | string | Assay identifier (e.g., 'OSD-253-6c5f9f37b9cb2ebeb2743875af4bdc86') |
adj_p_threshold | number | Adjusted p-value threshold for significance (default: 0.05). Only genes with adj_p_value <= this value are returned. |
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… | |
top_n | How many genes to display for each of up- and down-regulated lists. Pass None (or omit) to return ALL genes passing the adj_p_value filter rather than a top-N — useful when the user asks for 'all si… |
find_differentially_methylated_regions
USE THIS TOOL (not the `query` tool) for any "hyper/hypo-methylated regions", "DMRs", or "differential methylation" question — including all-rows requests, promoter/exon/intron-filtered methylation queries, and pooling methylation across replicate assays. Falling back to `query` for this category reproduces the work this tool already does (proper IS-NOT-NULL guards, gene-symbol join, parallel count queries, location filtering, deterministic CSV emission) and loses the formatted markdown + inline CSV side-channel. Return hyper-…
| Parameter | Type | Description |
|---|---|---|
assay_id * | Assay identifier, or a list of assay identifiers to pool. Pass a single string (e.g. 'OSD-48-968c...') to query one assay. Pass a list (e.g. ['OSD-48-968c...', 'OSD-48-4dc1...']) to pool results acros… | |
dist_to_feature_max | MethylationRegion distance filter. When set, return only regions whose dist_to_feature (bp to the nearest annotated gene feature) is <= this value. None (default) imposes no distance filter. Useful fo… | |
in_exon | MethylationRegion location filter. When True, return only regions overlapping an exon (mr.in_exon = true). When False, exclude exon-overlapping regions. None (default) imposes no exon filter. Combines… | |
in_intron | MethylationRegion location filter. When True, return only regions overlapping an intron (mr.in_intron = true). When False, exclude intron-overlapping regions. None (default) imposes no intron filter.… | |
in_promoter | MethylationRegion location filter. When True, return only regions overlapping a gene promoter (mr.in_promoter = true). When False, exclude promoter-overlapping regions (mr.in_promoter = false). None (… | |
methylation_diff_threshold | number | Minimum |methylation_diff| magnitude (in percentage points) required for a row to be kept (default: 0.0 = any change). Hypermethylated rows must have methylation_diff > methylation_diff_threshold; hyp… |
q_value_threshold | number | q-value threshold for significance (default: 0.05). Only regions with q_value <= this value are returned. |
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… | |
top_n | How many regions to display for each of hyper- and hypo-methylated lists. Pass None (or omit) to return ALL rows passing the filters rather than a top-N — useful when the user asks for 'all hypermet… |
find_differentially_abundant_organisms
USE THIS TOOL (not the `query` tool) for any "differentially abundant organisms", DESeq2/ANCOM-BC abundance, or "increased/decreased abundance" question for a single assay. The `query` tool can express the same Cypher, but using it for this category loses the formatted markdown tables, the inline CSV side-channel, the method-aware significance filtering (DESeq2 adj_p_value vs. ANCOM-BC q_value), and the safe lnfc handling that avoids silently dropping DESeq2 rows (where lnfc IS NULL would fail a naive `lnfc > 0` filter).…
| Parameter | Type | Description |
|---|---|---|
assay_id * | string | Assay identifier (e.g., 'OSD-253-6c5f9f37b9cb2ebeb2743875af4bdc86') |
adj_p_threshold | number | Adjusted p-value threshold for DESeq2 abundance assays (default: 0.05). Applied to rows with adj_p_value populated. |
lnfc_threshold | Optional minimum |lnfc| magnitude. Only applied to rows with lnfc populated (ANCOM-BC). DESeq2 rows are not filtered by this parameter. Leave unset (None) to skip lnfc filtering entirely. | |
log2fc_threshold | number | Minimum |log2fc| magnitude required for a row to be kept (default: 0.0 = any change). Applies to BOTH DESeq2 and ANCOM-BC rows since log2fc is populated for both methods. |
q_value_threshold | number | q-value threshold for ANCOM-BC abundance assays (default: 0.05). Applied to rows with q_value populated. |
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… | |
top_n | How many organisms to display for each of increased and decreased abundance lists. Pass None (or omit) to return ALL organisms passing the magnitude + significance filters rather than a top-N — usef… |
find_common_differentially_expressed_genes
USE THIS TOOL (not the `query` tool) for any "common DEGs across assays", "genes upregulated in BOTH assays", "shared up/downregulated genes", or any cross-assay DE intersection question. Falling back to `query` for this category reproduces the per-assay fetch + inner-join logic this tool already does correctly (parallel fetches via the driver's connection pool, |log2fc| > threshold filtering, separate up vs. down intersections) and loses the formatted markdown tables, the inline CSV side-channel, and…
| Parameter | Type | Description |
|---|---|---|
assay_ids * | array | List of assay identifiers (e.g., ['OSD-253-abc123', 'OSD-253-def456']) |
adj_p_threshold | number | Adjusted p-value threshold for significance (default: 0.05, max value: 0.1) |
log2fc_threshold | number | Log2 fold change threshold for filtering genes (default: 1.0 = 2-fold change) |
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |
find_common_differentially_methylated_regions
USE THIS TOOL (not the `query` tool) for any "common DMRs across assays", "genes hypermethylated in BOTH assays", "shared hyper/hypomethylated regions", or any cross-assay methylation intersection question — including promoter/exon/intron-filtered and distance-bounded variants. Falling back to `query` for this category reproduces the per-assay fetch + inner-join logic this tool already does correctly (parallel fetches, MethylationRegion location filtering applied during the Cypher so the common set…
| Parameter | Type | Description |
|---|---|---|
assay_ids * | array | List of assay identifiers for methylation comparisons |
dist_to_feature_max | MethylationRegion distance filter. When set, restrict to regions with dist_to_feature <= this value (bp). None (default) imposes no distance filter. | |
in_exon | MethylationRegion location filter (True / False / None). See in_promoter. | |
in_intron | MethylationRegion location filter (True / False / None). See in_promoter. | |
in_promoter | MethylationRegion location filter. When True, restrict to regions overlapping a gene promoter. When False, exclude promoter-overlapping regions. None (default) imposes no promoter filter. Applied duri… | |
methylation_diff_threshold | number | Methylation difference threshold (default: 0.0 = any change) |
q_value_threshold | number | q-value threshold for significance (default: 0.05) |
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |
find_common_differentially_abundant_organisms
USE THIS TOOL (not the `query` tool) for any "common differentially abundant organisms across assays", "organisms increased in BOTH assays", "shared abundance signals across methods" (e.g. DESeq2 vs ANCOM-BC concordance), or any cross-assay abundance intersection question. Falling back to `query` for this category reproduces the per-assay fetch + inner-join logic this tool already does correctly (parallel fetches, method-aware significance filtering, lnfc handling that doesn't drop DESeq2 rows, sepa…
| Parameter | Type | Description |
|---|---|---|
assay_ids * | array | List of assay identifiers for abundance comparisons (e.g., different methods like DESeq2, ANCOM-BC) |
adj_p_threshold | number | Adjusted p-value threshold for DESeq2 abundance assays (default: 0.05). Applied to rows with adj_p_value populated. |
lnfc_threshold | Optional minimum |lnfc| magnitude. Only applied to rows with lnfc populated (ANCOM-BC). DESeq2 rows are not filtered by this parameter. Leave unset (None) to skip lnfc filtering entirely. | |
log2fc_threshold | number | Minimum |log2fc| magnitude for filtering organisms (default: 0.0 = any change). Applied to BOTH DESeq2 and ANCOM-BC rows since log2fc is populated for both methods. |
q_value_threshold | number | q-value threshold for ANCOM-BC abundance assays (default: 0.05). Applied to rows with q_value populated. |
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |
find_common_de_genes_overlapping_dm_regions
USE THIS TOOL (not the `query` tool) for any "expression-methylation coupling", "classical epigenetic silencing", "DE genes that are also DM", "downregulated genes with promoter hypermethylation", or any cross-type intersection between differential expression and differential methylation. Falling back to `query` for this category reproduces the four-quadrant intersection logic this tool already does correctly (parallel DE+DM fetches across DIFFERENT assays, pooled-methylation aggregation when multip…
| Parameter | Type | Description |
|---|---|---|
expression_assay_id * | string | Assay identifier for differential expression data |
methylation_assay_id * | Assay identifier for differential methylation data, or a list of identifiers to pool. Pass a single string to use one methylation assay (most common). Pass a list (e.g. ['OSD-48-968c...', 'OSD-48-4dc1… | |
adj_p_threshold | number | Adjusted p-value threshold for DE genes (default: 0.05) |
dist_to_feature_max | MethylationRegion distance filter. When set, only DM regions with dist_to_feature <= this value (bp) contribute to the methylated-gene set. None (default) imposes no distance filter. | |
in_exon | MethylationRegion location filter (True / False / None). See in_promoter. | |
in_intron | MethylationRegion location filter (True / False / None). See in_promoter. | |
in_promoter | MethylationRegion location filter applied to the DM side of the overlap. When True, only DM regions overlapping a promoter contribute to the methylated-gene set. Use this for classical epigenetic-sile… | |
log2fc_threshold | number | Log2 fold change threshold for DE genes (default: 1.0) |
methylation_diff_threshold | number | Methylation diff threshold for DM regions (default: 0.0) |
q_value_threshold | number | q-value threshold for DM regions (default: 0.05) |
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |
create_volcano_plot
Create a volcano plot for differential data from the given assay. Works for three differential measurement types: - 'expression': -[MEASURED_DIFFERENTIAL_EXPRESSION_ASmMG]-> MGene x = log2fc, y = -log10(adj_p_value), labels = gene symbol Magnitude filter: log2fc_threshold (default 1.0 = 2-fold) - 'methylation': -[MEASURED_DIFFERENTIAL_METHYLATION_ASmMR]-> MethylationRegion x = methylation_diff, y = -log10(q_value), labels = gene symbol (joined via METHYL…
| Parameter | Type | Description |
|---|---|---|
assay_id * | string | Assay identifier (e.g., 'OSD-253-6c5f9f37b9cb2ebeb2743875af4bdc86') |
adj_p_threshold | number | Adjusted p-value (DESeq2) / q-value (ANCOM-BC, methylation) threshold for significance. For abundance, both fields are checked in a method-aware way. |
data_type | string | Which kind of differential data to plot. Options: 'expression' (differentially expressed genes), 'methylation' (differentially methylated regions), 'abundance' (differentially abundant organisms; work… |
figsize_height | integer | Figure height in inches |
figsize_width | integer | Figure width in inches |
label_avoid_overlap | boolean | If True, use adjustText to reposition labels to avoid overlap. Disable on very large assays for faster rendering. |
log2fc_threshold | number | Log2 fold change threshold (default 1.0 = 2-fold). Applies to data_type='expression' and data_type='abundance'. Ignored for data_type='methylation' (use methylation_diff_threshold instead). |
methylation_diff_threshold | number | Methylation difference threshold in percentage points (default 10.0 = |diff| > 10%). Applies only to data_type='methylation'. Ignored for other data types. |
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… | |
top_n | integer | How many significant points to label in the plot (selected by smallest p/q-value). |
create_venn_diagram
Create Venn diagrams comparing differential data between 2 or 3 assays. Supports multiple data types: - 'expression': Compares differentially expressed genes (upregulated/downregulated by log2fc) - 'methylation': Compares differentially methylated genes (hypermethylated/hypomethylated by methylation_diff) - 'abundance': Compares differentially abundant organisms (increased/decreased by log2fc; works for both DESeq2 and ANCOM-BC) - 'expression_methylation': Cross-comparison showing directional overlaps between differentially expressed genes…
| Parameter | Type | Description |
|---|---|---|
assay_id_1 * | string | First assay identifier |
assay_id_2 * | string | Second assay identifier |
adj_p_threshold | number | Adjusted p-value threshold (default: 0.05). Applied to expression assays and to DESeq2 abundance rows. |
assay_id_3 | Third assay identifier (optional, for 3-way Venn diagram) | |
data_type | string | Type of data to compare. Options: 'expression' (differentially expressed genes), 'methylation' (differentially methylated genes), 'abundance' (differentially abundant organisms), 'expression_methylati… |
direction_pair | string | For data_type='expression_methylation' only: which directional overlap(s) to render. 'all' (default) renders a 2x2 grid of all four biologically meaningful combinations: hypermethylated+downregulated… |
dist_to_feature_max | MethylationRegion distance filter (data_type='methylation' or 'expression_methylation' only). When set, only include methylation regions whose dist_to_feature (distance in bp to the nearest gene featu… | |
figsize_height | integer | Figure height in inches |
figsize_width | integer | Figure width in inches |
in_exon | MethylationRegion location filter (data_type='methylation' or 'expression_methylation' only). When True, only include methylation regions overlapping an exon. When False, exclude exon-overlapping regi… | |
in_intron | MethylationRegion location filter (data_type='methylation' or 'expression_methylation' only). When True, only include methylation regions overlapping an intron. When False, exclude intron-overlapping… | |
in_promoter | MethylationRegion location filter (data_type='methylation' or 'expression_methylation' only). When True, only include methylation regions overlapping a gene promoter. When False, exclude promoter-over… | |
lnfc_threshold | Optional minimum |lnfc| magnitude for the 'abundance' data type. Only applied to rows with lnfc populated (ANCOM-BC). DESeq2 rows are not filtered by this parameter. Ignored for non-abundance data typ… | |
log2fc_threshold | number | Log2 fold change threshold for filtering genes (used for expression and abundance data types) |
methylation_diff_threshold | number | Methylation difference threshold for filtering regions (used for methylation data type, default 0.0 means any change) |
q_value_threshold | number | q-value threshold (default: 0.05). Applied to methylation assays and to ANCOM-BC abundance rows. |
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |
clean_mermaid_diagram
Clean a Mermaid class diagram by removing unwanted elements. This tool removes: - All note statements that would render as unreadable yellow boxes - Empty curly braces from class definitions (handles both single-line and multi-line) - Strings after newline characters (e.g., truncates "ClassName extra" to "ClassName") Args: mermaid_content: The raw Mermaid class diagram content Returns: Cleaned Mermaid content with note statements, empty braces, and post-newline strings removed
| Parameter | Type | Description |
|---|---|---|
mermaid_content * | string | |
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |
create_chat_transcript
Prompt for creating a chat transcript in markdown format with user prompts and Claude responses.
| Parameter | Type | Description |
|---|---|---|
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |
visualize_schema
Prompt for visualizing the knowledge graph schema using a Mermaid class diagram.
| Parameter | Type | Description |
|---|---|---|
session_id | Session id returned by `create_session()`. This server serves many users from one process; the session id is what keeps your output directory and generated plots private to you. Pass the SAME value on… |