rnaseq-mcp
Click on "Deploy 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., "@rnaseq-mcp Compare treated vs control and show volcano plot"
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.
rnaseq-mcp
Server MCP per l'analisi di dati Bulk RNA-seq tramite agenti LLM. Permette di interrogare un dataset in linguaggio naturale. Esegue codice R e Python in un container Docker isolato, con anonimizzazione automatica dei campioni e controllo sulla privacy degli output.
Prerequisiti
Docker
Python ≥ 3.11
Un client MCP compatibile (es. Claude Code, Mistral Vibe o qualsiasi agente che supporti il protocollo MCP)
Related MCP server: DROMA MCP Server
Quickstart
1. Build del container
cd container
docker build -t rnaseq-executor:latest .Nel container vengono installati pacchetti di R (DESeq2, edgeR, limma, clusterProfiler, fgsea) e le librerie di annotazione (org.Hs.eg.db, org.Mm.eg.db) per garantire funzionalita offline.
2. Installazione del server
pip install -e .3. Configurazione del client MCP
Registra il server nel tuo client MCP con questi parametri:
Parametro | Valore |
Comando |
|
| percorso assoluto a |
| percorso assoluto a |
I file di input consistono in 2 CSV:
counts.csv— matrice geni × campioni (gene ID come indice di riga)metadata.csv— tabella campioni × variabili (stesso indice dicounts.csv)
4. Utilizzo
Una volta connesso il server, i tool disponibili sono:
Tool | Descrizione |
| Elenca i file in |
| Anteprima di un CSV |
| Esegue codice R (sessione persistente) |
| Esegue codice Python (namespace persistente) |
| Recupera i risultati da |
| Stato della sessione e pacchetti disponibili |
| Azzera container, stato e output |
Esempio di sessione:
Analizza i dati RNA-seq in /data confrontando treated vs control,
correggi per batch e genera volcano plot e heatmap.Viene fornito un esempio prompt di sistema in prompts/system_prompt.md.
Privacy
All'avvio, il server:
Rimuove le colonne di metadati con identificatori personali (nomi, ID campione, barcode, ecc.)
Rinomina i campioni con alias anonimi
S1, S2, ..., SNBlocca l'esportazione di matrici per-campione (count, PCA) come CSV
Mappatura dei campioni
La corrispondenza S1 → nome_reale viene scritta su host nel file:
/tmp/rnaseq-<session_id>/host_only/sample_mapping.jsonIl file non è montato nel container e non è accessibile tramite i tool MCP — il modello non può mai risalire ai nomi originali. Il formato è:
{ "S1": "nome_originale_1", "S2": "nome_originale_2", ... }Il file viene eliminato alla chiusura del server (o alla chiamata di reset_session). Per conservarlo, copialo manualmente prima di terminare la sessione:
cp /tmp/rnaseq-*/host_only/sample_mapping.json ./sample_mapping.jsonOutput
I file scritti in /output dal codice R/Python sono montati su host nella directory:
/tmp/rnaseq-<session_id>/output/Sono accessibili direttamente dal filesystem dell'host durante tutta la sessione, senza dover passare per il tool get_outputs. Quest'ultimo è utile principalmente per restituire i risultati al modello (ad es. per leggere una tabella CSV o visualizzare un plot nel contesto della conversazione).
I file vengono eliminati alla chiusura del server o alla chiamata di reset_session. Per conservarli:
cp -r /tmp/rnaseq-*/output/ ./risultati/Pacchetti R disponibili
DESeq2, edgeR, limma, ggplot2, pheatmap, ComplexHeatmap, EnhancedVolcano, clusterProfiler, fgsea, msigdbr, org.Hs.eg.db, org.Mm.eg.db, AnnotationDbi
Licenza
MIT License — Copyright (c) 2026 Stefano Barbi
Available Tools
7 toolsdescribe_sessionA
Return R sessionInfo(), available Python symbols, and files already produced in /output. Useful at the start of a session to confirm what packages are available.
Inputs: no named parameters. Returns: result
execute_pythonA
Execute Python code in the isolated analysis container. The Python namespace is PERSISTENT across calls.
OUTPUT RULES (same as execute_r):
Write to /output ONLY aggregated results (gene/pathway level).
Do NOT write per-sample matrices as CSV.
Plots saved with matplotlib/seaborn: plt.savefig("/output/.png").
If the server blocks a CSV, produce an aggregated equivalent instead.
Available packages: pydeseq2, pandas, numpy, matplotlib, seaborn, scipy, statsmodels.
Inputs: code (required). Returns: result
execute_rA
Execute R code in the isolated analysis container. The R session is PERSISTENT: objects defined in earlier calls remain available.
OUTPUT RULES (enforced server-side — follow them in your code):
Write to /output ONLY aggregated results: DE tables (log2FC, pvalue, padj per gene), pathway scores, group-level summary statistics, model coefficients.
Do NOT write per-sample matrices (normalized counts, raw counts, PCA coordinates) as CSV/TSV to /output. Keep them in R memory for intermediate computation.
Plots (PNG) showing sample-level data are permitted — use anonymous labels (S1, S2, ...).
ggsave() and png() write to /output/; use descriptive names.
If the server blocks a CSV file, revise your code to export an aggregated version.
Available R packages: DESeq2, edgeR, limma, ggplot2, pheatmap, ComplexHeatmap, EnhancedVolcano, ggrepel, patchwork, clusterProfiler, fgsea, msigdbr, org.Hs.eg.db, org.Mm.eg.db, AnnotationDbi. No internet access — use org.Hs.eg.db instead of biomaRt for gene annotation.
Inputs: code (required). Returns: result
get_outputsA
Retrieve all files written to /output during this session. CSV files containing per-sample data are blocked and replaced with an explanatory message. Images (PNG) are returned as base64-encoded strings.
Inputs: no named parameters. Returns: result
list_data_filesA
List files available in /data (anonymized counts and metadata).
Inputs: no named parameters. Returns: result
read_tableA
Read the first n_rows of a CSV/TSV file from /data and return it as a markdown table. Useful for inspecting column names, sample aliases, and group labels before writing analysis code.
Inputs: filename (required), n_rows. Returns: result
reset_sessionA
Destroy the current Docker container and start a fresh one with the same anonymized data. Use this to clear all in-memory R/Python state and /output files.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool has a clear, distinct purpose: environment inspection, code execution per language, output retrieval, data exploration (listing and reading), and session reset. No two tools overlap in functionality.
All tool names follow a consistent verb_noun pattern (e.g., describe_session, execute_python, list_data_files). The naming is predictable and easy to interpret.
With 7 tools, the server covers all essential activities for RNA-seq analysis: environment setup, code execution, data exploration, output retrieval, and session management. The count is well-scoped and not excessive.
The tool surface provides a solid foundation for RNA-seq analysis: data listing, reading, execution in both R and Python with relevant packages, output retrieval, and reset. A minor gap is the lack of a direct quality control or standard pipeline tool, but the execution tools suffice.
Maintenance
Related MCP Connectors
Query, explore, and manage your databases through natural conversation.
Ask questions in plain language, get answers from your business database. No SQL required.
Knowledge graph ingestion, entity search, ontology analysis, and CoPass scoring.
Query BigQuery, Snowflake, Redshift & Azure Synapse with natural language
Related MCP Servers
- AlicenseCqualityDmaintenanceAn MCP server that enables single-cell RNA sequencing analysis through natural language, supporting data processing, visualization, and analysis tasks without requiring coding knowledge.5212BSD 3-Clause
- AlicenseNot gradedqualityDmaintenanceEnables natural language interactions with cancer pharmacogenomics data through the DROMA platform, supporting drug-omics association analysis, dataset management, molecular profile loading, and treatment response analysis across multiple research projects.1Mozilla Public 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables scRNA-Seq analysis through natural language, providing tools for data preprocessing, clustering, and biological visualization. It supports both predefined function execution and a flexible code mode powered by a Jupyter backend for automated single-cell transcriptomics workflows.16 PyPI16BSD 3-Clause
- FlicenseNot gradedqualityDmaintenanceProvides a natural language interface for single-cell RNA-Seq analysis using the decoupleR framework. It enables users to perform biological pathway inference, data clustering, and visualization through MCP-compatible AI clients.31 PyPI4-