MCP GeneLab Server
Executes Cypher queries against Neo4j databases containing the NASA GeneLab Knowledge Graph, enabling natural language querying of differential gene expression, DNA methylation, and other spaceflight experiment data integrated with biomedical knowledge.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP GeneLab Servershow me genes upregulated in mouse liver during spaceflight"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP GeneLab Server
A Model Context Protocol (MCP) server that converts natural language queries into Cypher queries and executes them against the configured Neo4j endpoints. Customized tools provide seamless access to the NASA GeneLab Knowledge Graph (spoke-genelab v0.3.1), enabling AI-assisted analysis of spaceflight experiments and their biological effects. This server allows researchers to query differential gene expression, DNA methylation, and differential organism abundance data from NASA's space biology experiments through natural language interactions with AI assistants like Claude.
The GeneLab Knowledge Graph integrates omics data from NASA's Open Science Data Repository (OSDR), with nodes that can be used as connectors to other knowledge graphs, such as the SPOKE (Scalable Precision Medicine Open Knowledge Engine) knowledge graph. This integration connects spaceflight experimental results with a comprehensive biological context, including genes, proteins, anatomical structures, pathways, and diseases.
This server is part of the NSF-funded Proto-OKN Project (Prototype Open Knowledge Network). It's an extension of the Neo4j Cypher MCP server.
Table of Contents
Related MCP server: SPARQL MCP Server
Building and Querying the SPOKE-GeneLab Knowledge Graph
Presentation
Knowledge Graph Schema (v0.3.1)
The SPOKE-GeneLab KG v0.3.1 contains the following node and relationship types:
Nodes: Study, Mission, Assay, MGene, Gene, MethylationRegion, Organism, Anatomy, CellType
Relationships:
(Mission)-[:CONDUCTED_MIcS]->(Study)— Mission conducted a study(Study)-[:PERFORMED_SpAS]->(Assay)— Study performed an assay(Assay)-[:MEASURED_DIFFERENTIAL_EXPRESSION_ASmMG]->(MGene)— Differential gene expression(Assay)-[:MEASURED_DIFFERENTIAL_METHYLATION_ASmMR]->(MethylationRegion)— Differential methylation(Assay)-[:MEASURED_DIFFERENTIAL_ABUNDANCE_ASmO]->(Organism)— Differential organism abundance(Assay)-[:INVESTIGATED_ASiA]->(Anatomy)— Assay investigated an anatomical structure(Assay)-[:INVESTIGATED_ASiCT]->(CellType)— Assay investigated a cell type(MGene)-[:IS_ORTHOLOG_MGiG]->(Gene)— Model organism gene is ortholog of human gene(MGene)-[:METHYLATED_IN_MGmMR]->(MethylationRegion)— Gene is methylated in a region
Features
Querying & Analysis
Natural Language Querying: Ask questions in plain English — no need to write complex graph queries
NASA GeneLab Queries: Ask questions about spaceflight experiments in the NASA GeneLab knowledge graph
Differential Gene Expression Analysis: Find genes that are upregulated or downregulated in spaceflight conditions compared to ground controls
DNA Methylation Data: Access epigenetic changes observed in spaceflight experiments, including promoter / exon / intron / distance-to-feature filtering
Differential Organism Abundance: Query amplicon/metagenomics data showing changes in microbial community composition during spaceflight (DESeq2 and ANCOM-BC method-aware significance filtering)
Cross-Assay Intersection Analyses: Find features differentially detected across multiple assays — common DEGs, common DMRs, common DA organisms — each direction (up/down, hyper/hypo, increased/decreased) kept separate so the LLM can reason about them independently
Expression-Methylation Coupling: Identify differentially expressed genes whose promoter (or other gene region) is also differentially methylated in matched assays; supports pooled DM evidence across multiple methylation assays
Multi-Organism Support: Query data across multiple model organisms including mice, rats, and other species used in space research
Anatomy & Cell Type Filtering: Filter results by specific anatomical structures (UBERON ontology) or cell types (Cell Ontology) used in experiments
Assay Selection: Browse and filter assays by study, organism, technology, or measurement type
Biomedical Context Integration: Connect spaceflight gene expression changes to pathways, diseases, and other biological knowledge from SPOKE
Federated Queries: Combine data from GeneLab with other Neo4j knowledge graphs for comprehensive biomedical analysis
Visualization
Volcano Plots: Generate volcano plots showing differentially expressed genes / methylated regions / abundant organisms with significance thresholds
Venn Diagrams: Create Venn diagrams comparing differentially expressed genes (or DMRs, or DA organisms) across 2 or 3 assays, including an
expression_methylation2×2 grid variant for paired transcriptomic-epigenomic comparisonsPlot Resource Layer: Every generated plot is exposed as an MCP resource under
plot://<filename>and via afetch_plottool, so clients can retrieve PNG bytes through a separate request from the tool call that produced them. A failed fetch can be retried without re-running the analysisSchema Visualization: Generate visual representations of the knowledge graph schema
Mermaid Class Diagrams: Create and clean Mermaid-format class diagrams of the KG schema
Infrastructure
Read-Only Enforcement: All Neo4j sessions use
READ_ACCESSmode — write operations are rejected at the Bolt protocol level, protecting the knowledge graph from modificationMultiple Transport Modes: Supports STDIO (local), SSE, and Streamable HTTP (remote deployment)
Remote Deployment: Deploy as a web service behind a TLS reverse proxy, accessible via HTTPS URL from any MCP client
Docker Support: Build and deploy as a Docker container for consistent, reproducible environments
Multiple Access Methods: Use through Claude Desktop, VS Code with GitHub Copilot, or any MCP-compatible client
Pre-configured Setup: Ready-to-use mcp-genelab configuration files for a local STDIO connection to the spoke-genelab-v0.3.1 KG (a remote public endpoint is coming soon)
Prerequisites
Before using mcp-genelab, ensure you have:
Client Application: One of the following:
Claude Desktop or claude.ai (Pro or Max subscription) — connect via Settings → Connectors → Add Custom Connector
VS Code with GitHub Copilot — connect via MCP server settings
Any MCP client that supports the STDIO or Streamable HTTP transport
Connection to the spoke-genelab-v0.3.1 knowledge graph via one of the two paths below:
For the local STDIO setup you also need:
Operating System: macOS, Linux, or Windows
Python 3.10+ and the uv package manager
Neo4j Desktop with the spoke-genelab-v0.3.1 KG imported (installation links are provided in Option B)
Quick Start
mcp-genelab can be reached two ways: by connecting to the remote public endpoint (coming soon) or by running mcp-genelab locally with STDIO. Both serve the spoke-genelab-v0.3.1 knowledge graph.
Option A: Connect to the Remote mcp-genelab Server (coming soon)
Status: Coming soon. A public HTTPS endpoint for mcp-genelab is being prepared. When it is live, the URL will be published here and in the mcp-genelab repository. Until then, use Option B to run mcp-genelab locally.
Once the public endpoint is available, you will be able to connect to mcp-genelab without installing anything locally:
Open Claude Desktop (or claude.ai)
Go to Settings → Connectors (or Manage Connectors)
Click Add Custom Connector
Enter:
Name:
mcp-genelabMCP Server URL: the public mcp-genelab endpoint (coming soon)
Click Save
In the chat prompt, click the + button and toggle the mcp-genelab connector on
Then ask a question like: "What organisms are represented in the spoke-genelab-v0.3.1 knowledge graph?"
Option B: Run mcp-genelab Locally with STDIO
Running mcp-genelab locally has two parts: (1) stand up a local Neo4j instance holding the spoke-genelab-v0.3.1 KG, and (2) point mcp-genelab at it via STDIO.
Step 1 — Install Neo4j Desktop and import the spoke-genelab-v0.3.1 KG
Install Neo4j Desktop and create a
spoke-genelabinstance (with the APOC plugin) by following the Neo4j Desktop installation instructions.Import the spoke-genelab-v0.3.1 KG into that instance by following the database import instructions. Name the database exactly
spoke-genelab-v0.3.1and start the instance once the import completes.
Note the Bolt URI (default bolt://localhost:7687), username, and password of your running instance — you will need them in Step 2.
Step 2 — Install uv and configure mcp-genelab
Install uv if you don't already have it:
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"Then configure your MCP client to launch mcp-genelab over STDIO. For Claude Desktop, go to Claude → Settings → Developer → Edit Config and add the following mcp-genelab entry:
{
"mcpServers": {
"spoke-genelab-local": {
"command": "uvx",
"args": ["mcp-genelab"],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "neo4jdemo",
"NEO4J_DATABASE": "spoke-genelab-v0.3.1",
"INSTRUCTIONS": "Query the spoke-genelab-v0.3.1 KG to identify NASA spaceflight experiments containing omics datasets, specifically differential gene expression (transcriptomics), DNA methylation (epigenomics), and Amplicon (metagenomics) data."
}
}
}
}For VS Code with GitHub Copilot, add the same mcp-genelab entry to your .vscode/mcp.json (note the top-level key is servers, not mcpServers):
{
"servers": {
"spoke-genelab-local": {
"command": "uvx",
"args": ["mcp-genelab"],
"env": {
"NEO4J_URI": "bolt://localhost:7687",
"NEO4J_USERNAME": "neo4j",
"NEO4J_PASSWORD": "neo4jdemo",
"NEO4J_DATABASE": "spoke-genelab-v0.3.1",
"INSTRUCTIONS": "Query the spoke-genelab-v0.3.1 KG to identify NASA spaceflight experiments containing omics datasets, specifically differential gene expression (transcriptomics), DNA methylation (epigenomics), and Amplicon (metagenomics) data."
}
}
}
}Note: Set
NEO4J_USERNAME,NEO4J_PASSWORD, andNEO4J_URIto match the Neo4j instance you started in Step 1. Theuvxcommand automatically downloads and runs the latest published mcp-genelab from PyPI. KeepNEO4J_DATABASEset tospoke-genelab-v0.3.1to match the database name you imported.
Configure MCP Tools (Claude Desktop)
From the top menu bar:
1. Select: Claude->Settings->Connectors
2. Click: Configure for the MCP endpoints you want to use
3. Select Tool permissions: Always allowIn the prompt dialog box, click the + button:
1. Turn off Web search
2. Toggle MCP services on/off as neededUse @kg_name to refer to a specific mcp server (for example, @mcp-genelab).
To create a transcript of a chat (see examples below), use the following prompt:
Create a chat transcript.
The transcript can then be downloaded in .md or .pdf format.
Docker Deployment
Build the MCP Server Image
cd mcp-genelab
docker build -t mcp-genelab:latest .Run with Streamable HTTP Transport
docker run \
--name mcp-server \
--publish=127.0.0.1:8000:8000 \
--env NEO4J_URI=bolt://host.docker.internal:7687 \
--env NEO4J_USERNAME=neo4j \
--env NEO4J_PASSWORD=yourpassword \
--env NEO4J_DATABASE=spoke-genelab-v0.3.1 \
--env MCP_TRANSPORT=streamable-http \
--env MCP_HOST=0.0.0.0 \
--env MCP_PORT=8000 \
--detach \
mcp-genelab:latestThe MCP server is then accessible at http://localhost:8000/mcp/.
Environment Variables
Variable | Default | Description |
|
| Neo4j Bolt connection URI |
|
| Neo4j username |
|
| Neo4j password |
|
| Neo4j database name for the spoke-genelab-v0.3.1 KG |
|
| Transport mode: |
|
| HTTP listener host (use |
|
| HTTP listener port |
| (see source) | System instructions for the LLM |
Example Queries
Each link below points to a chat transcript that demonstrates how to use the mcp-genelab server to query and analyze GeneLab data hosted in the spoke-genelab-v0.3.1 Neo4j Knowledge Graph.
Knowledge Graph Overview & Class Diagram
Overview of spoke-genelab v0.3.1
Node and Relationship Metadata Examples
List spoke-genelab-v0.3.1 assay node, properties, and relationships
Differential Expression Analysis with MCP tools
Differential Expression and Differential Methylation Analysis with MCP tools
Differential Abundance Analysis with MCP tools
Cross-Graph Differential Expression and Associated Disease Analysis with MCP tools
OSD-161 DE and spoke-okn disease analysis
Note: To perform this example query, you will need to add the NSF OKN MCP server to your MCP client by following the instructions at https://okn.us/mcp.
MCP Tools Reference
The server exposes 22 tools plus a plot://{filename} resource template. Tools are listed below grouped by category. The specialist tools should be preferred over the generic query tool — server.py's DEFAULT_INSTRUCTIONS carries a TOOL SELECTION POLICY that routes natural-language requests to the right specialist.
Schema & metadata
Tool | Description |
| List all node types, their attributes, and relationships in the knowledge graph |
| Get descriptions of all node types from MetaNode entries |
| Get descriptions of all relationship types and their properties |
| Generate a visual schema diagram of the knowledge graph |
Study / assay browsing
Tool | Description |
| Get detailed information about a specific study and its assays (metadata + assay inventory) |
| Browse and filter assays by study, organism, technology, or measurement; resolve a factor pair to one or more assay IDs |
Single-assay analyses
Tool | Description |
| Find up/downregulated genes for a given assay (DESeq2) |
| Find hyper/hypomethylated regions for a given assay, with optional |
| Find organisms with differential abundance for a given assay (DESeq2 and/or ANCOM-BC) |
Cross-assay analyses
Tool | Description |
| Intersect DEGs across multiple assays (up and down directions kept separate) |
| Intersect DMRs across multiple assays, with optional MethylationRegion filters |
| Intersect differentially abundant organisms across multiple assays |
| Identify DE genes whose promoter (or other region) is also differentially methylated — supports method-aware significance filtering and pooled-DM evidence across multiple methylation assays |
Cypher fallback
Tool | Description |
| Execute a read-only Cypher query on the Neo4j database. Fallback for questions the specialists don't cover — the |
Plot generation, delivery, and saving
Tool / resource | Description |
| Generate a volcano plot of differential expression / methylation / abundance results; PNG returned inline and registered for resource fetch |
| Create a Venn diagram comparing DEGs / DMRs / DA organisms across 2 or 3 assays (also supports the |
| Re-fetch the canonical PNG bytes of a previously generated plot from the in-memory registry (last 8 plots, FIFO eviction). Returns the bytes as an |
| Return a markdown block with multiple save options for a previously generated plot: right-click save, ask-LLM-client-to-save, or fetch via the |
| MCP resource template — clients fetch PNG bytes via |
Output paths
Tool | Description |
| Set the user-facing directory where plots and CSV files should be saved |
| Return the currently configured output directory |
Mermaid & transcript utilities
Tool | Description |
| Clean and validate a Mermaid class diagram of the KG schema |
| Export the current chat as a formatted transcript |
Security
All Neo4j sessions are opened with default_access_mode=READ_ACCESS, which is enforced at the Bolt protocol level by Neo4j. Any write operation is rejected with the error: "Write operations are not allowed for READ transactions." This works on both Community and Enterprise Edition.
As a second layer of defense, the query tool includes a regex-based write filter (_is_write_query()) that catches the Cypher write keywords MERGE, CREATE, SET, DELETE, REMOVE, ADD, and DROP (case-insensitive) before the query is sent to Neo4j. All queries also use session.execute_read() for transaction-level read enforcement. The two layers — server-side regex + Bolt-level READ_ACCESS — protect the knowledge graph from modification even if one layer is bypassed.
Development
Instructions for local development
Testing
The project ships a pytest suite (95 tests across 8 files) that runs offline — no Neo4j connection, no network, no MCP transport. It guards against regressions in tool registration, annotation completeness, routing-policy language in tool docstrings, Cypher invariants (read-only enforcement, conditional LIMIT, lnfc null-safety, MethylationRegion filter propagation, pooled IN $assay_ids clause for cross-assay queries), and the plot resource layer (plot:// URI registration, fetch_plot round-trips, save-instruction size guarantees).
pip install -r mcp-genelab-tests/requirements-test.txt
pytestThe suite runs in roughly 10 seconds and is safe to run on every commit. A GitHub Actions workflow at .github/workflows/test.yml runs the suite on Python 3.10 through 3.13 for every push and pull request. See mcp-genelab-tests/tests/README.md for the per-file breakdown and instructions on adding tests for new tools.
Building and Publishing (maintainers only)
Instructions for building, testing, and publishing the mcp-genelab package on PyPI
API Reference
Troubleshooting
Common Issues
MCP server not appearing in Claude Desktop:
Ensure you've completely quit and restarted Claude Desktop (not just closed the window)
Check that your JSON configuration is valid (attach your config file to a chat and ask it to fix any errors)
Verify that
uvxis installed and accessible in your PATH
Connection errors:
Verify the Neo4j endpoint URL is correct and accessible
For a local Neo4j Desktop instance, ensure the
spoke-genelabinstance is started and thespoke-genelab-v0.3.1database has finished loadingCheck that
NEO4J_DATABASEis set tospoke-genelab-v0.3.1and matches the database name you imported
Write operation rejected:
This is expected behavior. All sessions use READ_ACCESS mode. Write operations (CREATE, MERGE, SET, DELETE) are blocked at the Bolt protocol level.
Performance issues:
Complex Cypher queries may take time to execute
Consider breaking down complex queries into smaller parts
Check the endpoint's documentation for query best practices
License
This project is licensed under the BSD 3-Clause License. See the LICENSE file for details.
Citation
If you use MCP GeneLab in your research, please cite the following works:
@software{rose2026mcp-genelab,
title={MCP GeneLab Server},
author={Rose, P.W. and Saravia-Butler, A.M. and Nelson, C.A. and Shi, Y. and Baranzini, S.E.},
year={2026},
url={https://github.com/sbl-sdsc/mcp-genelab}
}
@software{rose2026spoke-genelab,
title={NASA SPOKE-GeneLab Knowledge Graph},
author={Rose, P.W. and Nelson, C.A. and Saravia-Butler, A.M. and Gebre, S.G. and Soman, K. and Grigorev, K.A. and Sanders, L.M. and Costes, S.V. and Baranzini, S.E.},
year={2026},
url={https://github.com/BaranziniLab/spoke_genelab}
}Related Publications
Nelson, C.A., Rose, P.W., Soman, K., Sanders, L.M., Gebre, S.G., Costes, S.V., Baranzini, S.E. (2025). "Nasa Genelab-Knowledge Graph Fabric Enables Deep Biomedical Analysis of Multi-Omics Datasets." NASA Technical Reports, 20250000723. Link
Sanders, L., Costes, S., Soman, K., Rose, P., Nelson, C., Sawyer, A., Gebre, S., Baranzini, S. (2024). "Biomedical Knowledge Graph Capability for Space Biology Knowledge Gain." 45th COSPAR Scientific Assembly, July 13-21, 2024. Link
Acknowledgments
Funding
This work is supported in part by:
National Science Foundation Award #2333819: "Proto-OKN Theme 1: Connecting Biomedical information on Earth and in Space via the SPOKE knowledge graph"
Related Projects
Proto-OKN Project - Prototype Open Knowledge Network initiative
NSF Open Knowledge Network - 40+ interconnected knowledge graphs supported by NSF
NASA Open Science Data Repository (OSDR) - Repository of multi-modal space life science data
NASA GeneLab KG, spoke-genelab - Git Repository for creating the spoke-geneLab KG v0.3.1
Model Context Protocol - AI assistant integration standard
Original Neo4j Cypher MCP server - Base implementation reference
For questions, issues, or contributions, please visit our GitHub repository.
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sbl-sdsc/mcp-genelab'
If you have feedback or need assistance with the MCP directory API, please join our Discord server