Skip to main content
Glama

Enrichr MCP Server

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$ < 0.05) for LLM tools to interpret.

Smithery

Installation

Claude Desktop

Download the latest MCPB bundle (.mcpb file) and install it via ☰ (top left) -> File -> Settings, then drag and drop the file into the Settings window.

Cursor / VS Code

Use the buttons below to install with default settings:

Install MCP Server Add to VS Code Add to VS Code Insiders

Claude Code

claude mcp add enrichr-mcp-server -- npx -y enrichr-mcp-server

Or install as a Claude Code plugin:

/plugin install enrichr-mcp-server

Smithery

npx -y @smithery/cli install enrichr-mcp-server --client claude

Manual Configuration

Add to your MCP client config (e.g., .cursor/mcp.json):

{
  "mcpServers": {
    "enrichr-server": {
      "command": "npx",
      "args": ["-y", "enrichr-mcp-server"]
    }
  }
}

Related MCP server: expression-atlas

Features

  • Two Tools: enrichr_analysis for running enrichment, suggest_libraries for discovering relevant libraries

  • Custom Background Correction: Test against your own background gene set (e.g. only the genes expressed in your assay) instead of the whole genome

  • Live Library Catalog: The library list is fetched from Enrichr at runtime, so new releases appear automatically and retired libraries are never suggested

  • Guided Workflow: enrichment_analysis prompt for end-to-end analysis with interpretation

  • 22 Library Categories: Programmatic category mapping for all libraries (pathways, cancer, kinases, etc.)

  • Parallel Library Queries: All libraries queried in parallel for fast multi-database analysis

  • Structured Output: Returns both human-readable text and structured JSON for programmatic use

  • Configurable Output Formats: Detailed, compact, or minimal to manage token usage

  • TSV Export: Save complete results to TSV files

Tools

suggest_libraries

Discover the most relevant Enrichr libraries for a research question. Use this before enrichr_analysis to pick the best libraries for your specific topic. Searches Enrichr's live library catalog, so it never recommends a library that Enrichr has retired. When two libraries are equally relevant, the newer vintage ranks first (GO_Biological_Process_2026 over ..._2021).

Parameters:

  • query (required): Research context (e.g., "DNA repair", "breast cancer drug resistance")

  • category (optional): Filter by category (e.g., cancer, pathways, kinases)

  • maxResults (optional): Max results to return (default: 10, max: 50)

Returns:

  • Ranked list of libraries with relevance scores, categories, and descriptions

  • Structured JSON with suggestions array

enrichr_analysis

Perform enrichment analysis across multiple Enrichr libraries in parallel.

Parameters:

  • genes (required): Array of gene symbols (e.g., ["TP53", "BRCA1", "EGFR"]) — minimum 2

  • libraries (optional): Array of Enrichr library names to query (defaults to configured libraries)

  • background (optional): Custom background gene set — minimum 20 genes. See below.

  • description (optional): Description for the gene list

  • maxTerms (optional): Maximum terms per library (default: 50)

  • format (optional): Output format: detailed, compact, minimal

  • outputFile (optional): Path to save complete results as TSV file

Returns:

  • Text content with formatted significant terms (name, p-values, odds ratio, combined score, overlapping genes)

  • Structured JSON output with full result data, including backgroundCorrected per library

Background correction

By default Enrichr tests your gene list against the whole genome. If your genes were drawn from a restricted universe — only the genes expressed in your tissue, or a targeted panel — the whole-genome default overstates significance, often by many orders of magnitude. Pass background with the universe the list was drawn from:

{
  "genes": ["TP53", "BRCA1", "ATM", "CHEK2"],
  "background": ["TP53", "BRCA1", "ATM", "CHEK2", "ACTB", "GAPDH", "..."],
  "libraries": ["GO_Biological_Process_2026"]
}

The difference is not cosmetic. For a 16-gene DNA-damage list, the top GO term moves from an adjusted p of 1.2e-16 (whole genome) to 1.8e-5 (48-gene background), and the number of "significant" terms drops from 359 to 10.

Background correction runs against Enrichr's separate speedrichr service, which is intermittently unavailable. Failures are retried; if they persist, the library falls back to uncorrected whole-genome p-values, and the result is flagged backgroundCorrected: false with a loud WARNING in the text output. A fallback result is never presented as if it were background-corrected.

Resources

URI

Description

enrichr://libraries

Full library catalog organized by category

enrichr://libraries/{category}

Libraries for a specific category (e.g., enrichr://libraries/cancer)

Prompts

enrichment_analysis

Guided workflow for gene set enrichment analysis. Accepts a gene list and optional research context, then walks through library selection, analysis, and interpretation.

Arguments:

  • genes (required): Gene symbols, comma or newline separated

  • context (optional): Research context for library selection (triggers suggest_libraries step)

Library Categories

All 200+ libraries are organized into 22 categories:

Category

Examples

transcription

ChEA_2022, ENCODE_TF_ChIP-seq_2015, TRANSFAC_and_JASPAR_PWMs

pathways

KEGG_2021_Human, Reactome_2022, WikiPathways_2023_Human, MSigDB_Hallmark_2020

ontologies

GO_Biological_Process_2025, GO_Molecular_Function_2025, Human_Phenotype_Ontology

diseases_drugs

GWAS_Catalog_2023, DrugBank_2022, OMIM_Disease, DisGeNET

cell_types

GTEx_Tissue_Expression_Up, CellMarker_2024, Tabula_Sapiens

microRNAs

TargetScan_microRNA_2017, miRTarBase_2022, MiRDB_2019

epigenetics

Epigenomics_Roadmap_HM_ChIP-seq, JASPAR_2022, Cistrome_2023

kinases

KEA_2015, PhosphoSitePlus_2023, PTMsigDB_2023

gene_perturbations

LINCS_L1000_CRISPR_KO_Consensus_Sigs, CRISPR_GenomeWide_2023

metabolomics

HMDB_Metabolites, Metabolomics_Workbench_2023, SMPDB_2023

aging

Aging_Perturbations_from_GEO_down, GenAge_2023, Longevity_Map_2023

protein_families

InterPro_Domains_2019, Pfam_Domains_2019, UniProt_Keywords_2023

computational

Enrichr_Submissions_TF-Gene_Coocurrence, ARCHS4_TF_Coexp

literature

Rummagene_signatures, AutoRIF, GeneRIF

cancer

COSMIC_Cancer_Gene_Census, TCGA_Mutations_2023, OncoKB_2023, GDSC_2023

single_cell

Human_Cell_Landscape, scRNAseq_Datasets_2023, SingleCellSignatures_2023

chromosome

Chromosome_Location, Chromosome_Location_hg19

protein_interactions

STRING_Interactions_2023, BioGRID_2023, IntAct_2023, MINT_2023

structural

PDB_Structural_Annotations, AlphaFold_2023

immunology

ImmuneSigDB, ImmPort_2023, Immunological_Signatures_MSigDB

development

ESCAPE, Developmental_Signatures_2023

other

MSigDB_Computational, HGNC_Gene_Families, Open_Targets_2023

Use suggest_libraries to search across all categories, or read enrichr://libraries/{category} for the full list in any category.

Configuration

Command Line Options

Option

Short

Description

Default

--libraries <libs>

-l

Comma-separated list of Enrichr libraries to query

pop

--max-terms <num>

-m

Maximum terms to show per library

50

--format <format>

-f

Output format: detailed, compact, minimal

detailed

--output <file>

-o

Save complete results to TSV file

(none)

--compact

-c

Use compact format (same as --format compact)

(flag)

--minimal

Use minimal format (same as --format minimal)

(flag)

--help

-h

Show help message

(flag)

Format Options

  • detailed: Full details including p-values, odds ratios, and gene lists (default)

  • compact: Term name + p-value + gene count (saves ~50% tokens)

  • minimal: Just term name + p-value (saves ~80% tokens)

Environment Variables

Variable

Description

Example

ENRICHR_LIBRARIES

Comma-separated list of libraries

GO_Biological_Process_2025,KEGG_2021_Human

ENRICHR_MAX_TERMS

Maximum terms per library

20

ENRICHR_FORMAT

Output format

compact

ENRICHR_OUTPUT_FILE

TSV output file path

/tmp/enrichr_results.tsv

Note: CLI arguments take precedence over environment variables.

Multiple Server Instances

Set up different instances for different research contexts:

{
  "mcpServers": {
    "enrichr-pathways": {
      "command": "npx",
      "args": ["-y", "enrichr-mcp-server", "-l", "GO_Biological_Process_2025,KEGG_2021_Human,Reactome_2022"]
    },
    "enrichr-disease": {
      "command": "npx",
      "args": ["-y", "enrichr-mcp-server", "-l", "Human_Phenotype_Ontology,OMIM_Disease,ClinVar_2019"]
    }
  }
}

When using the default -l pop configuration:

Library

Description

GO_Biological_Process_2026

Current Gene Ontology biological process terms.

KEGG_2026

Current KEGG metabolic and signaling pathways.

Reactome_Pathways_2024

Current Reactome release — curated, peer-reviewed pathways.

MSigDB_Hallmark_2020

Hallmark gene sets representing well-defined biological states and processes.

ChEA_2022

ChIP-seq experiments identifying transcription factor-gene interactions.

GWAS_Catalog_2025

Genome-wide association study results linking genes to traits.

Human_Phenotype_Ontology

Standardized vocabulary of phenotypic abnormalities associated with human diseases.

PPI_Hub_Proteins

Highly connected hub proteins from protein-protein interaction networks.

DGIdb_Drug_Targets_2024

Drug-gene interactions from the Drug Gene Interaction Database.

CellMarker_2024

Manually curated cell type markers for human and mouse.

API Details

This server uses the Enrichr API:

  • Add List: https://maayanlab.cloud/Enrichr/addList

  • Enrichment: https://maayanlab.cloud/Enrichr/enrich

  • Library Catalog: https://maayanlab.cloud/Enrichr/datasetStatistics — fetched at runtime and cached for 24h, so the library list is never stale

  • Background-corrected enrichment: https://maayanlab.cloud/speedrichr/api/{addList,addbackground,backgroundenrich}

  • Supported Libraries: Every library Enrichr currently serves (228 at time of writing)

Note: Enrichr emits bare Infinity literals for the odds ratio when a term's overlap with the background is complete — which is not valid JSON. This server parses those responses correctly; a naive JSON.parse on the raw response will throw.

Development

npm run build          # Build TypeScript
npm test               # Run tests (unit + integration + MCP protocol)
npm run test:watch     # Run tests in watch mode
npm run watch          # Auto-rebuild on file changes
npm run inspector      # Debug with MCP inspector

Requirements

  • Node.js 18+

  • Internet connection for Enrichr API access

License

MIT

References

  • 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).

  • 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.

  • 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.90

  • Enrichr

  • Model Context Protocol

  • MCP TypeScript SDK

Available Tools

1 tool
suggest_librariesSuggest Enrichr LibrariesA
Read-only

Suggest relevant Enrichr libraries for a research question. Use this before enrichr_analysis to pick the best libraries for a specific topic.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesResearch context (e.g., 'DNA repair', 'breast cancer drug resistance')
categoryNoFilter by category
maxResultsNoMax results (default: 10)

Output Schema

ParametersJSON Schema
NameRequiredDescription
queryYes
suggestionsYes
totalAvailableYes

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, so the tool is read-only. The description adds that it suggests libraries, consistent with a non-destructive operation. No behavioral contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with purpose, and contains no wasted words. It is appropriately sized for the tool's simplicity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has an output schema, reducing need for return description. The description is sufficient given the tool's straightforward purpose and three parameters, though it could hint at category filtering.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3. The description does not add extra meaning beyond the schema; it only gives a high-level purpose. No parameter-specific elaboration.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool suggests relevant Enrichr libraries for a research question. The verb 'suggest' and resource 'Enrichr libraries' are specific, and it distinguishes itself by positioning as a precursor to enrichr_analysis.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises using this tool before enrichr_analysis to pick best libraries for a topic. It provides clear when-to-use guidance. No sibling tools exist, so no alternative differentiation needed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.4.1
    • Removedenrichr_analysis
    • Removedgo_bp_enrichment
    • Addedsuggest_libraries
  2. 2 tool updatesv0.2.1
    • First observedenrichr_analysis
    • First observedgo_bp_enrichment

TDQS

A3.8/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possible confusion between tools. suggest_libraries has a clearly stated purpose, though the description references enrichr_analysis, which is not provided.

Naming Consistency4/5

The single tool name follows a clean verb_noun pattern, but with only one tool there is not enough repetition to establish a true naming convention.

Tool Count1/5

A single tool called suggest_libraries is an extreme mismatch for an Enrichr server, which should also offer enrichment analysis and related operations. The tool itself even references a missing enrichr_analysis tool.

Completeness1/5

The server is severely incomplete for its stated domain. It only suggests libraries and provides no way to run enrichment analysis or otherwise interact with Enrichr.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables querying the EBI Expression Atlas for gene expression data across species and conditions. Part of the Pipeworx gateway, it provides access to baseline and differential expression studies.
    6 npm
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables coding agents to interact with the Reactome pathway database, including search, lookup, hierarchy traversal, SBML/SBGN export, and gene-set enrichment analysis.
    17
    MIT