A Model Context Protocol (MCP) server that provides gene set enrichment analysis using the Enrichr API. This server supports all available gene set libraries from Enrichr and returns only statistically significant results (corrected-$p$ File -> Settings and drag and drop the downloaded file into the Settings window. Use the button below to install the MCP server to Cursor, VS Code, or VS Code Insi
Add this skill
npx mdskills install tianqitang1/enrichr-mcp-serverProfessional bioinformatics MCP server with comprehensive gene enrichment analysis and excellent documentation
1<!--2 * @Author: tianqitang1 Tianqi.Tang@ucsf.edu3 * @Date: 2025-06-03 14:18:584 * @LastEditors: tianqitang1 Tianqi.Tang@ucsf.edu5 * @LastEditTime: 2025-06-29 06:46:596 * @FilePath: /enrichr-mcp-server/README.md7-->8# Enrichr MCP Server910<div align="center">11 <img src="icon.svg" alt="Enrichr MCP Server Icon" width="128" height="128">12</div>1314A Model Context Protocol (MCP) server that provides gene set enrichment analysis using the [Enrichr](https://maayanlab.cloud/Enrichr/) API. This server supports all available gene set libraries from Enrichr and returns only statistically significant results (corrected-$p$ < 0.05) for LLM tools to interpret.1516## Installation1718For Claude Desktop, please download the [Desktop Extension](https://github.com/tianqitang1/enrichr-mcp-server/releases/latest) and install it by clicking `☰ (top left) -> File -> Settings` and drag and drop the downloaded file into the `Settings` window.1920Use the button below to install the MCP server to Cursor, VS Code, or VS Code Insiders with default settings.2122[](https://cursor.com/install-mcp?name=enrichr-mcp-server&config=eyJjb21tYW5kIjoibnB4IC15IGVucmljaHItbWNwLXNlcnZlciAtLWNvbXBhY3QgLS1tYXgtdGVybXMgMTAwIn0%3D)23[](https://vscode.dev/redirect?url=vscode%3Amcp/install%3F%257B%2522name%2522%253A%2522enrichr-mcp-server%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522enrichr-mcp-server%2522%252C%2522--compact%2522%252C%2522--max-terms%2522%252C%2522100%2522%255D%257D)24[](https://vscode.dev/redirect?url=vscode-insiders%3Amcp/install%3F%257B%2522name%2522%253A%2522enrichr-mcp-server%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522enrichr-mcp-server%2522%252C%2522--compact%2522%252C%2522--max-terms%2522%252C%2522100%2522%255D%257D)252627For Claude Code, use the following command:28```bash29claude mcp add enrichr-mcp-server -- npx -y enrichr-mcp-server30```3132## Features3334- **Multi-Library Enrichment Analysis**: Query multiple Enrichr libraries simultaneously (GO, pathways, diseases, tissues, drugs, etc.)35- **Comprehensive Library Support**: Access to hundreds of gene set libraries from Enrichr including:36 - Gene Ontology (Biological Process, Molecular Function, Cellular Component)37 - Pathway databases (KEGG, Reactome, WikiPathways, BioCarta, MSigDB)38 - Disease/Phenotype databases (Human Phenotype Ontology, GWAS Catalog)39 - Tissue/Cell type libraries (GTEx, Human Cell Atlas, ARCHS4)40 - Drug/Chemical libraries (DrugMatrix, L1000, TG-GATEs)41 - Transcription Factor targets (ChEA, ENCODE)42 - MicroRNA targets (TargetScan, miRTarBase)43- **GO Enrichment Analysis**: Specialized tool for GO Biological Process enrichment analysis (I use this a lot, so I made it a tool)444546## Configuration4748### MCP Client Configuration4950Add this server to your MCP client configuration (e.g., `.cursor/mcp.json`):5152#### Basic Configuration (Popular Libraries by Default)53With the default configuration the server will query a curated list of popular libraries.54```json55{56 "mcpServers": {57 "enrichr-server": {58 "command": "npx",59 "args": ["-y", "enrichr-mcp-server"]60 }61 }62}63```6465#### Custom Available Libraries Configuration6667You can configure libraries that are available for the LLM to use using CLI arguments in your MCP configuration:6869```json70{71 "mcpServers": {72 "enrichr-popular": {73 "command": "npx",74 "args": ["-y", "enrichr-mcp-server", "--libraries", "pop"]75 }, // This will make the most popular libraries available to the LLM, namely GO_Biological_Process_2025, KEGG_2021_Human, Reactome_2022, MSigDB_Hallmark_2020, ChEA_2022, GWAS_Catalog_2023, Human_Phenotype_Ontology, STRING_Interactions_2023, DrugBank_2022, CellMarker_202476 "enrichr-pathways": {77 "command": "npx",78 "args": ["-y", "enrichr-mcp-server", "-l", "GO_Biological_Process_2025,KEGG_2021_Human,Reactome_2022"]79 },80 "enrichr-disease": {81 "command": "npx",82 "args": ["-y", "enrichr-mcp-server", "--libraries", "Human_Phenotype_Ontology,OMIM_Disease,ClinVar_2019"]83 }84 }85}86```8788### Command Line Options8990Adjust the CLI options to your needs, unreasonable settings might exceed the context window of the LLM and confuse it, so choose wisely:9192| Option | Short | Description | Default |93|--------|-------|-------------|---------|94| `--libraries <libs>` | `-l` | Comma-separated list of Enrichr libraries to query | `pop` |95| `--max-terms <num>` | `-m` | Maximum terms to show per library | `50` |96| `--format <format>` | `-f` | Output format: `detailed`, `compact`, `minimal` | `detailed` |97| `--output <file>` | `-o` | Save complete results to TSV file | _(none)_ |98| `--compact` | `-c` | Use compact format (same as `--format compact`) | _(flag)_ |99| `--minimal` | | Use minimal format (same as `--format minimal`) | _(flag)_ |100| `--help` | `-h` | Show help message | _(flag)_ |101102#### Format Options103- **`detailed`**: Full details including p-values, odds ratios, and gene lists (default)104- **`compact`**: Term name + p-value + gene count (saves ~50% tokens)105- **`minimal`**: Just term name + p-value (saves ~80% tokens)106107#### Examples108109For a full list of commands, options, and usage examples, run the server with the `--help` flag. This is the most up-to-date source of information.110111```bash112# Show the help message113npx enrichr-mcp-server --help114```115116### Environment Variables117118You can also configure the server via environment variables:119120| Variable | Description | Example |121|----------|-------------|---------|122| `ENRICHR_LIBRARIES` | Comma-separated list of libraries to query | `GO_Biological_Process_2025,KEGG_2021_Human` |123| `ENRICHR_MAX_TERMS` | Maximum terms per library | `20` |124| `ENRICHR_FORMAT` | Output format (`detailed`/`compact`/`minimal`) | `compact` |125| `ENRICHR_OUTPUT_FILE` | TSV output file path | `/tmp/enrichr_results.tsv` |126127**Note**: CLI arguments take precedence over environment variables when both are specified.128129130### Popular Libraries131132This table lists the libraries included when using the `-l pop` flag.133134| Library | Description |135|---------|-------------|136| `GO_Biological_Process_2025` | Gene Ontology terms describing biological objectives accomplished by gene products. |137| `KEGG_2021_Human` | Metabolic and signaling pathways from Kyoto Encyclopedia of Genes and Genomes for human. |138| `Reactome_2022` | Curated and peer-reviewed pathways from Reactome covering signaling, metabolism, gene expression, and disease. |139| `MSigDB_Hallmark_2020` | Hallmark gene sets representing well-defined biological states and processes from MSigDB. |140| `ChEA_2022` | ChIP-seq experiments from GEO, ENCODE, and publications identifying transcription factor-gene interactions from human and mouse. |141| `GWAS_Catalog_2023` | Genome-wide association study results from NHGRI-EBI GWAS Catalog linking genes to traits. |142| `Human_Phenotype_Ontology` | Standardized vocabulary of phenotypic abnormalities associated with human diseases. |143| `STRING_Interactions_2023` | Protein interactions from STRING database including experimental and predicted. |144| `DrugBank_2022` | Drug targets from DrugBank including approved drugs and experimental compounds. |145| `CellMarker_2024` | Manually curated cell type markers from CellMarker database for human and mouse. |146147For a complete list of available libraries, visit the [Enrichr Libraries page](https://maayanlab.cloud/Enrichr/#libraries).148149### Benefits of Library Configuration1501511. **Simplified Tool Calls**: When libraries aren't specified in tool calls, your configured libraries are used1522. **Consistent Results**: Ensures consistent library usage across different queries1533. **Multiple Configurations**: Set up different MCP server instances for different research contexts1544. **Override Capability**: Individual tool calls can still specify different libraries when needed155156## Usage157158The server provides two tools:159160### `enrichr_analysis` (Recommended for multi-library analysis)161162Performs enrichment analysis across multiple specified Enrichr libraries.163164**Parameters:**165- `genes` (required): Array of gene symbols (e.g., ["TP53", "BRCA1", "EGFR"])166- `libraries` (optional): Array of Enrichr library names to query (defaults to configured libraries)167- `description` (optional): Description for the gene list (default: "Gene list for enrichment analysis")168- `maxTerms` (optional): Maximum number of terms to show per library (default: 50)169- `format` (optional): Output format: `detailed`, `compact`, `minimal` (default: `detailed`)170- `outputFile` (optional): Path to save complete results as TSV file171172### `go_bp_enrichment`173174Performs Gene Ontology (GO) Biological Process enrichment analysis to understand biological functions and processes overrepresented in your gene list. Perfect for interpreting gene expression data, identifying significant biological processes, and uncovering functional implications of genes from RNA-seq, microarray, or other high-throughput experiments.175176**Parameters:**177- `genes` (required): Array of gene symbols (e.g., ["TP53", "BRCA1", "EGFR"])178- `description` (optional): Description for the gene list (default: "Gene list for GO BP enrichment")179- `outputFile` (optional): Path to save complete results as TSV file180181**Returns:**182All tools return formatted text with significant terms including:183- Library name and summary statistics184- Term name and identifier185- Adjusted P-value and raw P-value (scientific notation)186- Odds ratio and combined score187- Overlapping genes with counts188189## Available Library Categories190191Enrichr contains hundreds of gene set libraries organized into categories:192193- **Gene Ontology**: Biological processes, molecular functions, cellular components194- **Pathways**: KEGG, Reactome, WikiPathways, BioCarta, NCI, HumanCyc, Panther195- **Disease/Phenotype**: HPO, OMIM, ClinVar, GWAS Catalog, DisGeNET196- **Tissues/Cell Types**: GTEx, Human Cell Atlas, ARCHS4, Mouse Gene Atlas197- **Transcription Factors**: ChEA, ENCODE, TRANSFAC, JASPAR198- **MicroRNA Targets**: TargetScan, miRTarBase, microRNA.org199- **Drug/Chemical**: DrugMatrix, L1000, TG-GATEs, CTD200- **Protein Interactions**: BioGRID, STRING, hu.MAP201- **Literature Mining**: PubMed, Geneshot, Co-expression202- **Evolutionary**: Cross-species homologs, phylogenetic profiles203204For a complete list of available libraries, visit the [Enrichr Libraries page](https://maayanlab.cloud/Enrichr/#libraries).205206## API Details207208This server uses the Enrichr API:209- **Add List Endpoint**: `https://maayanlab.cloud/Enrichr/addList`210- **Enrichment Endpoint**: `https://maayanlab.cloud/Enrichr/enrich`211- **Supported Libraries**: All libraries available through Enrichr web interface212213## Development214215- **Build**: `npm run build`216- **Watch**: `npm run watch` (rebuilds on file changes)217- **Inspector**: `npm run inspector` (debug with MCP inspector)218219## Requirements220221- Node.js 18+222- TypeScript 5.3+223- Internet connection for Enrichr API access224225## License226227This project follows the same license as the MCP TypeScript SDK.228229## References230231- Chen EY, Tan CM, Kou Y, Duan Q, Wang Z, Meirelles GV, Clark NR, Ma'ayan A. Enrichr: interactive and collaborative HTML5 gene list enrichment analysis tool. BMC Bioinformatics. 2013; 128(14).232233- Kuleshov MV, Jones MR, Rouillard AD, Fernandez NF, Duan Q, Wang Z, Koplev S, Jenkins SL, Jagodnik KM, Lachmann A, McDermott MG, Monteiro CD, Gundersen GW, Ma'ayan A. Enrichr: a comprehensive gene set enrichment analysis web server 2016 update. Nucleic Acids Research. 2016; gkw377.234235- Xie Z, Bailey A, Kuleshov MV, Clarke DJB., Evangelista JE, Jenkins SL, Lachmann A, Wojciechowicz ML, Kropiwnicki E, Jagodnik KM, Jeon M, & Ma'ayan A. Gene set knowledge discovery with Enrichr. Current Protocols, 1, e90. 2021. doi: 10.1002/cpz1.90236237- [Enrichr](https://maayanlab.cloud/Enrichr/)238- [Model Context Protocol](https://modelcontextprotocol.io/)239- [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)240
Full transparency — inspect the skill content before installing.