Skip to main content
Glama
reactome-mcp
by tc2fh

reactome-mcp

An MCP server that gives coding agents first-class access to the Reactome pathway database — search, look up, traverse, export to SBML/SBGN, and run gene-set pathway-enrichment analysis, all from the chat.

Python 3.12+ MCP License: MIT

Built with the official Python MCP SDK (FastMCP) over stdio. It wraps both Reactome REST services:

  • ContentService — full-text search, entity/pathway lookup, hierarchy traversal, participants, complex subunits, interactors, and SBML/SBGN/diagram export.

  • AnalysisService — submit a gene/protein list and get back ranked, enriched pathways with p-value/FDR.

Because it speaks plain MCP over stdio (no vendor-specific extensions), it works with any MCP-capable agent — Claude Code, Codex, Cursor, and others. Only the registration command differs.


Quickstart

Requires uv (which manages Python ≥ 3.12 for you).

git clone https://github.com/tc2fh/reactome-mcp.git
cd reactome-mcp
uv sync                     # install runtime deps
uv run reactome-mcp         # boots the server on stdio (Ctrl+C to exit)

Then register it with your agent (see below) and ask it something like:

"Run Reactome enrichment on TP53, EGFR, BRCA1, MDM2, CDKN1A and list the 5 most significant pathways with their FDR."


Related MCP server: reactome-mcp

Register with your agent

The server is a standard stdio MCP server launched with uv run reactome-mcp. Run these from inside the cloned directory.

Claude Code

claude mcp add reactome -- uv --directory "$PWD" run reactome-mcp

Codex

codex mcp add reactome -- uv --directory "$PWD" run reactome-mcp

…or add a table to ~/.codex/config.toml:

[mcp_servers.reactome]
command = "uv"
args = ["run", "--directory", "/absolute/path/to/reactome-mcp", "reactome-mcp"]

Cursor — add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "reactome": {
      "command": "uv",
      "args": ["run", "--directory", "/absolute/path/to/reactome-mcp", "reactome-mcp"]
    }
  }
}

Any other MCP client (Windsurf, Cline, Zed, Pi, …) — point it at the same stdio command. A ready-to-edit example lives in .mcp.json:

{
  "mcpServers": {
    "reactome": {
      "type": "stdio",
      "command": "uv",
      "args": ["run", "--directory", "/absolute/path/to/reactome-mcp", "reactome-mcp"],
      "env": {}
    }
  }
}

Tools

All tools are async, return JSON-shaped dicts (or a path string for downloads), and degrade to {"error": ...} rather than raising on HTTP/network failures.

Search & lookup

Tool

Signature

Purpose

search

(query, species=None, types=None, rows=10, start=0, cluster=True)

Solr free-text search; returns flattened, highlight-stripped entries + per-type counts.

get_entry

(stable_id, enhanced=False, attribute=None, max_chars=50000)

Full record for any object by stable id/dbId; size-guarded; attribute fetches one field.

get_entries

(stable_ids)

Batch lookup for up to 20 identifiers at once.

Pathway hierarchy & participants

Tool

Signature

Purpose

list_top_level_pathways

(species)

Top-level pathways (browser entry points) for a species name/taxId.

list_pathway_events

(stable_id)

All sub-pathways and reactions contained in a pathway (recursive).

get_event_ancestors

(stable_id)

Paths from an event up to its top-level pathway(s) — breadcrumbs.

get_event_participants

(stable_id)

Physical entities (+ their reference entities) in a reaction/pathway.

find_pathways_for_entity

(stable_id, species=None, all_forms=False)

Which lower-level pathways contain a given molecule/complex.

Entities, interactors, reference data

Tool

Signature

Purpose

get_complex_subunits

(stable_id, exclude_structures=False)

Recursively list the subunits of a complex.

get_interactors

(accession, page=-1, page_size=-1)

Curated IntAct protein–protein interactors for an accession.

list_species

(main_only=True)

Species annotated in Reactome (name, taxId, abbreviation).

list_diseases

()

Diseases (Disease Ontology terms) annotated in Reactome.

Exporters

Tool

Signature

Purpose

get_event_sbml

(stable_id, fmt="sbml", max_chars=50000)

Export a pathway/reaction to SBML or SBGN inline; head/tail truncation past max_chars.

download_export

(stable_id, kind="event", ext="sbml", save_dir="./reactome_downloads")

Stream an export to disk (event→sbml/sbgn, diagram/reaction/fireworks→png/svg, document→pdf).

Enrichment analysis

Tool

Signature

Purpose

analyze_identifiers

(identifiers, projection=True, species=None, sort_by="ENTITIES_PVALUE", p_value=1.0, page_size=20, page=1, include_interactors=False)

Submit a gene/protein list; returns a token + ranked enriched pathways with pValue/FDR.

get_analysis_results

(token, species=None, sort_by="ENTITIES_PVALUE", p_value=1.0, page=1, page_size=20, resource="TOTAL")

Page/sort/filter a prior analysis by its token (no re-submission).

get_analysis_not_found

(token, page=0, page_size=40)

Identifiers from the submission that did not map to Reactome.

Design notes

  • Reactome stable ids look like R-HSA-69278; numeric dbIds and plain accessions (e.g. P04637) are also accepted. Path identifiers are validated so they can't escape the intended endpoint.

  • search strips Reactome's Solr <span class="highlighting"> markup and flattens the clustered results[] → entries[] shape into one list.

  • get_entry and get_event_sbml are size-guarded so multi-MB records / SBML never flood the chat — they point you to download_export, which streams to disk.

  • analyze_identifiers returns a token; reuse it with get_analysis_results / get_analysis_not_found to page and inspect without re-running the analysis.


Example prompts

  1. Search + lookup — "Search Reactome for TP53, then look up 'Transcriptional Regulation by TP53' and summarise what it does."

  2. Enrichment — "Run Reactome enrichment on TP53, EGFR, BRCA1, MDM2, CDKN1A and list the 5 most significant pathways with their FDR."

  3. SBML export — "Find 'Cell Cycle Checkpoints', export its SBML to ./reactome_downloads, and tell me how many species and reactions it defines."

  4. Hierarchy — "List the top-level human pathways, then drill into 'Cell Cycle' and show its contained events."


Development

uv sync --extra dev     # install test deps (pytest, pytest-asyncio, respx)
uv run pytest           # offline suite — every request is mocked via respx

The suite (tests/) runs entirely offline against captured fixtures in samples/, so it needs no network. Smoke-test the live server in any of these ways:

uv run reactome-mcp                          # console script
uv run python -m reactome_mcp                # module entry point
uv run python server.py                      # source-checkout shim
uv run mcp dev src/reactome_mcp/server.py    # MCP Inspector dev UI
reactome-mcp/
├── src/reactome_mcp/   # installable package (server.py = all tools + helpers)
├── server.py           # source-checkout compatibility shim
├── tests/              # offline pytest suite (respx-mocked)
├── samples/            # captured API responses used as fixtures
├── pyproject.toml      # uv-managed project
└── .mcp.json           # example stdio MCP config

Acknowledgements

Powered by Reactome, a free, open-source, open-access, curated and peer-reviewed pathway database. Please cite Reactome when publishing work that uses this data — see https://reactome.org/cite.

This project is not affiliated with or endorsed by the Reactome team.

License

MIT © Tien Comlekoglu

Available Tools

17 tools
analyze_identifiersA

Run pathway over-representation analysis on a gene/protein list.

Submits identifiers (gene symbols, UniProt/ENSEMBL accessions, etc.) to the
Reactome AnalysisService and returns the most enriched pathways with their
statistics. Reuse the returned `token` with `get_analysis_results` to
page/sort/filter without re-submitting.

Args:
    identifiers: A list, or whitespace/comma-separated string, of
        identifiers (e.g. "TP53 EGFR BRCA1 MDM2 CDKN1A").
    projection: If True (default), project non-human identifiers onto human
        pathways (uses `/identifiers/projection`).
    species: Optional species filter for the results.
    sort_by: One of ENTITIES_PVALUE, ENTITIES_FDR, ENTITIES_RATIO, etc.
    p_value: Keep pathways with entity p-value <= this (default 1.0 = all).
    page_size: Pathways per page (default 20).
    page: 1-based page number.
    include_interactors: Expand the analysis with IntAct interactors.

Returns:
    Dict with `token`, `pathwaysFound`, `identifiersNotFound`, and
    `pathways` (each `{stId, name, species, entitiesFound, entitiesTotal,
    pValue, fdr, reactionsFound, reactionsTotal}`), plus resource/species
    summaries and any `warnings`.

Inputs: identifiers (required), page, p_value, sort_by, +4 more.

download_exportA

Stream a Reactome export to local disk and return the absolute path.

Use this for any non-trivial payload (full SBML/SBGN, PDF documents, large
diagram images) instead of pulling it into the chat.

Args:
    stable_id: Event/diagram/reaction stable id; for `kind="fireworks"` a
        species name or taxId.
    kind: One of "event" (sbml/sbgn), "diagram" (png/jpg/gif/svg),
        "document" (pdf), "reaction" (png/jpg/gif/svg), or "fireworks"
        (png/jpg/gif/svg, species-level overview).
    ext: File extension valid for the chosen `kind`.
    save_dir: Local directory to save into; created if absent.

Returns:
    Absolute path to the saved file, or a string starting with "ERROR:".

Inputs: stable_id (required), ext, kind, save_dir. Returns: result

find_pathways_for_entityA

Find the lower-level pathways that contain a given physical entity.

The inverse of `list_pathway_events`: given a molecule/complex, which
pathways involve it?

Args:
    stable_id: PhysicalEntity stable id, e.g. "R-HSA-199420".
    species: Optional species name/taxId filter.
    all_forms: If True, also match every other form of the entity (e.g.
        phosphorylated/cleaved variants sharing a ReferenceEntity).

Returns:
    Dict `{count, pathways}` of Pathway records that contain the entity.

Inputs: stable_id (required), species, all_forms.

get_analysis_not_foundA

List the submitted identifiers that did not map to any Reactome entity.

Args:
    token: The `token` returned by `analyze_identifiers`.
    page: Zero-based page number.
    page_size: Identifiers per page.

Returns:
    Dict `{count, notFound}` of the unmapped identifiers.

Inputs: token (required), page, page_size.

get_analysis_resultsA

Retrieve (page/sort/filter) the results of a prior analysis by token.

Args:
    token: The `token` returned by `analyze_identifiers`.
    species: Optional species filter.
    sort_by: Sort key (e.g. ENTITIES_PVALUE, ENTITIES_FDR).
    p_value: Keep pathways with entity p-value <= this.
    page: 1-based page number.
    page_size: Pathways per page.
    resource: Identifier resource to score against (default "TOTAL").

Returns:
    Same shape as `analyze_identifiers`.

Inputs: token (required), page, p_value, sort_by, +3 more.

get_complex_subunitsA

List the subunits that constitute a complex (recursively).

Args:
    stable_id: Complex stable id, e.g. "R-HSA-83538".
    exclude_structures: If True, omit structural sub-complexes.

Returns:
    Dict `{count, subunits}` of the constituent PhysicalEntities.

Inputs: stable_id (required), exclude_structures.

get_entriesA

Batch-fetch records for several identifiers in one call (max 20).

Args:
    stable_ids: A list of identifiers, or a comma/whitespace-separated
        string (e.g. "R-HSA-69278, R-HSA-69620").

Returns:
    Dict `{count, entries}` where `entries` is the list of matched records.

Inputs: stable_ids (required).

get_entryA

Fetch the full record for any Reactome object by identifier.

Works for pathways, reactions, physical entities, complexes, regulators,
etc. Use `attribute` to retrieve a single field cheaply, or `enhanced` to
include indirect references.

Args:
    stable_id: Reactome stable id (e.g. "R-HSA-69278") or numeric dbId.
    enhanced: If True, query the `/data/query/enhanced/{id}` variant.
    attribute: If set, fetch only this attribute (e.g. "displayName",
        "speciesName", "stIdVersion").
    max_chars: Size guard. If the JSON exceeds this, large nested fields
        are replaced with a summary (default 50000).

Returns:
    The object's JSON record (name, displayName, schemaClass, definition,
    species, compartments, literatureReferences, etc.), size-guarded; or
    `{stId, attribute, value}` when `attribute` is given.

Inputs: stable_id (required), enhanced, attribute, max_chars.

get_event_ancestorsA

Retrieve all paths from an event up to its top-level pathway(s).

Useful for building breadcrumbs / locating where a reaction sits.

Args:
    stable_id: Event (pathway or reaction) stable id, e.g. "R-HSA-69620".

Returns:
    Dict `{count, ancestors}` where each ancestor is an ordered path of
    events from the queried event to a top-level pathway.

Inputs: stable_id (required).

get_event_participantsA

List the physical entities that participate in a reaction or pathway.

Args:
    stable_id: Event stable id, e.g. "R-HSA-69620".

Returns:
    Dict `{count, participants}` grouping each participating PhysicalEntity
    with its ReferenceEntities (UniProt/ChEBI/etc. cross-references).

Inputs: stable_id (required).

get_event_sbmlA

Export a pathway/reaction to SBML or SBGN, inline with size guarding.

SBML connects Reactome straight into systems-biology tooling (and the
BioModels workflow). Large exports are head/tail truncated with a pointer
to `download_export` so multi-MB XML never floods the chat.

Args:
    stable_id: Event stable id, e.g. "R-HSA-69620".
    fmt: "sbml" (default) or "sbgn".
    max_chars: Max characters to return inline (default 50000).

Returns:
    Dict with `stId`, `format`, `mimeType`, `total_chars`, `truncated`, and
    either `content` (full text) or `content_head` + `content_tail` +
    `note` when truncated.

Inputs: stable_id (required), fmt, max_chars.

get_interactorsA

Fetch curated protein-protein interactors for an accession (IntAct).

Args:
    accession: A UniProt/ChEBI accession, e.g. "P04637".
    page: 1-based page number; -1 (default) returns all.
    page_size: Page size; -1 (default) returns all.

Returns:
    The interactor summary object, including the list of interacting
    accessions and their interaction scores.

Inputs: accession (required), page, page_size.

list_diseasesA

List the diseases annotated in Reactome.

Returns:
    Dict `{count, diseases}` of Disease records (Disease Ontology terms).

Inputs: no named parameters.

list_pathway_eventsA

List every event (sub-pathway and reaction) contained in a pathway.

Recurses the full sub-tree, so the result is the flattened set of events
beneath the given pathway.

Args:
    stable_id: Pathway stable id, e.g. "R-HSA-69278".

Returns:
    Dict `{count, events}` of Event records (Pathways + ReactionLikeEvents).

Inputs: stable_id (required).

list_speciesA

List the species annotated in Reactome.

Args:
    main_only: If True (default), return only the main curated species;
        otherwise return every species including computational inferences.

Returns:
    Dict `{count, species}` of Species records (name, taxId, abbreviation).

Inputs: main_only.

list_top_level_pathwaysA

List the top-level pathways for a species (the browser's entry points).

Args:
    species: Species name ("Homo sapiens") or NCBI taxId ("9606").

Returns:
    Dict `{count, pathways}` of top-level Pathway records.

Inputs: species (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 17 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action, from listing species and diseases to fetching entries, exports, and analysis. The only slight overlap between get_event_sbml and download_export is clearly delineated by inline vs. file output, so an agent can reliably select the right tool.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun snake_case pattern (e.g., list_diseases, get_analysis_results, find_pathways_for_entity). Even compound names like get_analysis_not_found maintain the convention, with no camelCase or varied verb styles.

    Tool Count4/5

    At 17 tools, the set is slightly above the typical 3-15 range but well-scoped for Reactome's broad functionality. The tools cover searching, browsing, exporting, and analysis without redundancy, so the count feels justified rather than excessive.

    Completeness4/5

    The tool surface covers core Reactome operations: browsing pathways and entities, searching, exporting in multiple formats, and performing over-representation analysis. Minor gaps exist, such as no direct tool for species-wide reaction lists or advanced API features, but agents can work around these with existing tools.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to query clinical genomics databases, retrieve supporting literature, analyze population genetics, and visualize biological pathways.
      18
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Enables AI assistants to search, browse, analyze, and export biological pathway data from Reactome through natural language.
      56
      62 npm
      6
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to query the Reactome biological pathway knowledge-base for pathways, participants, and orthologous events using natural language.
      285 npm
      MIT