MCP GeneLab Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| NEO4J_URI | Yes | URI of the Neo4j instance (e.g., bolt://localhost:7687) | |
| NEO4J_USER | Yes | Username for Neo4j authentication | |
| NEO4J_PASSWORD | Yes | Password for Neo4j authentication |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| create_sessionA | Start a session and obtain the 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 LIFETIME: A session expires after a period of inactivity (default 60 min) or an absolute maximum age (default 8 h), whichever comes first. Expired sessions drop their plots; regenerate them under a new session. RETURNS:
A short message containing |
| end_sessionA | 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 |
| fetch_plotA | 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:
WHAT THIS TOOL DOES NOT DO: It does NOT re-render the plot. It returns the same bytes that were registered when the plot was originally generated. If the underlying data has changed, re-run the plot tool itself (create_volcano_plot, create_venn_diagram); don't expect fetch_plot to pick up new data. EQUIVALENT RESOURCE URI:
This tool returns the same bytes that REGISTRY BOUNDS: Each session holds its last 8 plots (FIFO eviction). Older plots, and plots from other or expired sessions, return a clear "not in registry" error and need to be regenerated by re-running the source plot tool under the current session. |
| get_neo4j_schemaA | 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. |
| set_output_directoryA | 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 change it). Every subsequent file-producing tool in this session uses this path:
IMPORTANT — DEPLOYMENT REALITY:
When this MCP server is deployed remotely (ECS Fargate or any other
container service), it runs in a container whose filesystem is NOT
reachable from the user's machine. The server CANNOT write a file
directly to the user's local disk over the network — no MCP server in
a container can. The path you set here is a suggestion that propagates
through the response in three ways, any of which lets the user save
the file locally:
(a) The plot is returned inline as ImageContent and renders in any
MCP client that displays images (Claude Desktop, Cursor, Cline,
Claude.ai web, ChatGPT, Gemini, etc.). The user can right-click
and "Save Image As" — most clients default to the user's
Downloads folder, which is usually what was asked for.
(b) The path you set appears in the save guidance in the response.
LLM clients with local filesystem access (Claude Code, Cursor,
Cline, Claude Desktop with a filesystem MCP server) can write
the file at exactly this path, re-fetching the canonical bytes
via VALIDATION: The path is stored as-is (the server does not verify it exists on the user's machine — it has no way to do so from inside a container). If you pass a relative path or an obviously malformed string the server will accept it; the failure will surface when the user tries to save the file locally. |
| get_output_directoryA | 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). |
| get_save_scriptA | 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 tool, so they don't burn conversation context unless the user actually wants them. HOW IT WORKS: Each plot tool registers the PNG bytes of the plot it generated in the calling session's registry (up to the last 8 plots; older entries are evicted FIFO). Calling this tool with the plot's suggested filename returns a markdown block with three save options:
The response itself contains no PNG bytes — only references to the plot:// resource URI and the fetch_plot tool, both of which deliver the bytes through a separate request. LISTING AVAILABLE PLOTS:
Call this tool with no |
| queryA | 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:
If you only have a study identifier and need assay IDs, call
The specialist tools return formatted markdown tables AND an inline CSV
side-channel that this Only call this tool for ad-hoc Cypher that the specialist tools cannot express: schema exploration, custom multi-hop traversals, exotic aggregations, or one-off counts the specialists don't expose. OUTPUT FORMAT - CRITICAL:
The response begins with a EDGE PROPERTIES - CRITICAL: Many relationships in this knowledge graph have properties stored as edge attributes (data ON the relationship itself). MEASURED_DIFFERENTIAL_EXPRESSION_ASmMG: log2fc, adj_p_value, group_mean_1, group_stdev_1, group_mean_2, group_stdev_2 MEASURED_DIFFERENTIAL_METHYLATION_ASmMR: methylation_diff, q_value, group_mean_1, group_stdev_1, group_mean_2, group_stdev_2 MEASURED_DIFFERENTIAL_ABUNDANCE_ASmO: log2fc, lnfc, q_value, adj_p_value, group_mean_1, group_stdev_1, group_mean_2, group_stdev_2 ABUNDANCE EDGE - METHOD-AWARE FIELDS (CRITICAL for correct queries):
The MEASURED_DIFFERENTIAL_ABUNDANCE_ASmO edge stores different fields depending
on which differential analysis method produced the row. Use
To filter by significance in a method-agnostic way, OR both fields together: WHERE r.log2fc > 0 AND ( (r.adj_p_value IS NOT NULL AND r.adj_p_value <= 0.05) OR (r.q_value IS NOT NULL AND r.q_value <= 0.05) ) Filtering on RELATIONSHIP DIRECTIONS (always use directed arrows in queries): (Assay)-[:MEASURED_DIFFERENTIAL_EXPRESSION_ASmMG]->(MGene) (Assay)-[:MEASURED_DIFFERENTIAL_METHYLATION_ASmMR]->(MethylationRegion) (Assay)-[:MEASURED_DIFFERENTIAL_ABUNDANCE_ASmO]->(Organism) (MGene)-[:METHYLATED_IN_MGmMR]->(MethylationRegion) (Study)-[:PERFORMED_SpAS]->(Assay) (Mission)-[:CONDUCTED_MIcS]->(Study) NODE PROPERTIES - CRITICAL (use EXACTLY these property names, no others exist): MGene: identifier, symbol, name, organism, taxonomy MethylationRegion: identifier, name, chromosome, start, end, in_promoter, in_exon, in_intron, dist_to_feature Assay: identifier, name, technology, measurement, differential_analysis_method, factors_1, factors_2, material_1, material_2, material_id_1, material_id_2, material_name_1, material_name_2, factor_space_1, factor_space_2 Study: identifier, name, project_title, project_type, description, organism, taxonomy, host_organism, host_strain Mission: identifier, name, flight_program, space_program, start_date, end_date Organism: identifier, name COMMON PROPERTY NAME MISTAKES - NEVER USE THESE: WRONG: mg.gene_symbol RIGHT: mg.symbol WRONG: mg.gene_name RIGHT: mg.name WRONG: g.gene_symbol RIGHT: g.symbol WRONG: g.gene_name RIGHT: g.name |
| get_node_metadataB | Get metadata for all nodes from MetaNode nodes in the knowledge graph. |
| get_relationship_metadataB | Get descriptions of properties of all relationships in the knowledge graph. |
| get_study_infoA | USE THIS TOOL (not the Return detailed information about a study, including its assays with their technology and measurement types. This tool queries the GeneLab KG for:
For example, OSD-267 should return that it has both 16S and ITS amplicon sequencing data. |
| select_assaysA | USE THIS TOOL (not the
Falling back to List and select assays for a study and render the response in markdown format. First call (selection=None):
Second call (selection='i,j,k,l,...,m,n'):
|
| find_differentially_expressed_genesA | USE THIS TOOL (not the The Return the top-N up- and down-regulated genes for a given assay_id. This tool runs two queries on the GeneLab KG:
Returning all passing rows:
Pass Results include gene symbol, gene name, log2 fold change, adjusted p-value, and group means and standard deviations for each condition. |
| find_differentially_methylated_regionsA | USE THIS TOOL (not the
Return hyper- and hypo-methylated regions for one or more assays. This tool runs two queries on the GeneLab KG:
Pooling across assays:
Pass a list to Returning all passing rows:
Pass MethylationRegion location filters (in_promoter, in_exon, in_intron, dist_to_feature_max) are applied DURING the Cypher query. This means when a user asks for "top hypermethylated regions in the promoter", pass in_promoter=True and the tool will correctly rank within the promoter universe. Do NOT post-filter the unfiltered top-N — that produces wrong results because regions outside the filter (e.g. non-promoter regions) occupy slots in the unfiltered top-N and displace correctly-ranked filtered regions. Multiple filters combine with AND, so in_promoter=True with in_intron=False returns promoter regions that are not intronic. WHEN TO USE THIS TOOL vs. direct Cypher via the |
| find_differentially_abundant_organismsA | USE THIS TOOL (not the The Return the top-N organisms with increased and decreased differential abundance for a given assay_id. Direction (increase vs. decrease) and ranking use log2fc, which is populated for BOTH DESeq2 and ANCOM-BC abundance edges in the GeneLab KG. log2fc is therefore used as the universal direction/ordering field and as the default magnitude filter. The lnfc property is only populated for ANCOM-BC edges (DESeq2 leaves it null). It is returned in the result for reference and can be used as an additional magnitude filter via the lnfc_threshold parameter. log2fc is the direction filter because it is populated for both DESeq2 and ANCOM-BC rows; using lnfc for direction would null-filter every DESeq2 row out of the result. Significance filtering is method-aware:
Magnitude filtering:
This tool runs two queries on the GeneLab KG:
Results include organism name, log2fc, lnfc, q-value, adj-p-value, and group means and standard deviations. |
| find_common_differentially_expressed_genesA | USE THIS TOOL (not the Find common differentially expressed genes across multiple assays. This function:
|
| find_common_differentially_methylated_regionsA | USE THIS TOOL (not the Find common differentially methylated genes across multiple assays. This function:
Use the location filter parameters rather than post-filtering — they are applied during the Cypher query so the common gene set reflects the filtered universe correctly. |
| find_common_differentially_abundant_organismsA | USE THIS TOOL (not the Find common differentially abundant organisms across multiple assays. Useful for comparing results from different analysis methods (e.g., DESeq2 vs ANCOM-BC 1 vs ANCOM-BC 2) to identify organisms consistently detected as differentially abundant. Direction (increase vs. decrease) and ranking use log2fc, which is populated for BOTH DESeq2 and ANCOM-BC edges in the GeneLab KG. log2fc is therefore the universal magnitude filter (log2fc_threshold); lnfc is ANCOM-BC-only and would null-filter every DESeq2 row if used for direction. Significance filtering is method-aware:
Magnitude filtering:
This function:
|
| find_common_de_genes_overlapping_dm_regionsA | USE THIS TOOL (not the Find differentially expressed genes that overlap with differentially methylated regions. This cross-analysis tool:
For the classical epigenetic-silencing question — promoter hypermethylation reducing expression — pass in_promoter=True. When a study has replicate methylation assays (e.g. OSD-48 has two methylKit assays for the same Space Flight vs. Ground Control comparison), pass them as a list to capture the combined methylation evidence on the methylation side of the intersection. |
| create_volcano_plotA | Create a volcano plot for differential data from the given assay. Works for three differential measurement types:
Points are colored by significance:
Returns a markdown summary, an inline PNG image (if small enough), and the saved file path. Designed to handle assays with thousands of features without timing out. |
| create_venn_diagramA | Create Venn diagrams comparing differential data between 2 or 3 assays. Supports multiple data types:
Creates side-by-side Venn diagrams showing:
For 'expression_methylation' mode, this tool computes FOUR directional overlaps so the user can see which kind of expression–methylation coupling is happening. By default (direction_pair='all') it renders all four as a 2x2 grid:
Methylation region location filters (for data_type='methylation' and the methylation side of 'expression_methylation'):
Significance filtering:
Magnitude filtering for 'abundance':
Returns a link to the plot and summary statistics. |
| clean_mermaid_diagramA | Clean a Mermaid class diagram by removing unwanted elements. extra" to "ClassName") |
| create_chat_transcriptC | Prompt for creating a chat transcript in markdown format with user prompts and Claude responses. |
| visualize_schemaB | Prompt for visualizing the knowledge graph schema using a Mermaid class diagram. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 24 tools
The find_* specialists are cleanly separated by data type (expression/methylation/abundance) and by scope (single vs common vs cross-type overlap), and `query` has explicit routing rules to prevent misuse. However, the schema/metadata cluster (get_node_metadata, get_neo4j_schema, get_relationship_metadata) and the plot-saving pair (fetch_plot, get_save_script) overlap enough that selection could be fuzzy. The lengthy descriptions largely resolve this, so only a couple of pairs are confusable.
Consistent snake_case throughout, and most names follow a verb_noun pattern (get_study_info, create_session, find_differentially_expressed_genes, set_output_directory, create_venn_diagram). Minor deviations exist: `query` is a bare verb with no object, and `visualize_schema`/`clean_mermaid_diagram` break the get/find/create cadence. Overall predictable with small inconsistencies.
At 24 tools the surface is heavy, sitting in the borderline range. Most clusters (7 find_* analyses, session/output management, schema metadata) are justified by the genuinely broad domain, but a few tools like create_chat_transcript, clean_mermaid_diagram, and visualize_schema feel auxiliary to the core KG-analysis purpose. The count is reasonable but slightly overweight.
Coverage is strong: single-assay and cross-assay analyses for all three differential data types, a DE/DM coupling tool, study/assay resolution, schema introspection, plotting, and a general Cypher fallback. The main gap is study discovery — there is no tool to search or list studies, so an agent must already know a study_id (e.g. OSD-267) or fall back to raw Cypher to find one.