An MCP (Model Context Protocol) server that provides comprehensive tools for interacting with EnzymeML documents through the EnzymeML Suite desktop application. This server enables AI assistants and other MCP-compatible clients to read, modify, search, and visualize biochemical data stored in EnzymeML format.
EnzymeML is a standardized data format for representing enzymatic reactions and experimental data in computational biology and biochemistry. This MCP server acts as a bridge between AI assistants and the EnzymeML Suite desktop application, allowing you to programmatically interact with EnzymeML documents, search external databases for biochemical entities, and generate visualizations of experimental measurements.
The server communicates with the EnzymeML Suite application running on your local machine and provides a rich set of tools for document manipulation, database searching, and data visualization. All data is exchanged using the TOON (Tree Object Oriented Notation) format, which provides a structured and efficient way to represent complex biochemical data.
- Document Overview: Generate high-level overviews of EnzymeML document structure and relationships, essential for understanding how different components are connected before performing edits
- Full Document Reading: Read complete EnzymeML document structures excluding measurements for optimal performance
- Measurement Data Access: Specifically fetch detailed experimental measurement data including time series, concentrations, and measured values
- Intelligent Document Extension: Merge new data into existing EnzymeML documents with automatic validation and consistency checks. Supports both adding new items and performing surgical edits to existing items identified by ID
- Selective Element Removal: Remove specific elements from documents including complete objects (vessels, proteins, small molecules, reactions, parameters, complexes) or partial removal within reactions (reactants, products, modifiers)
- UniProt Search: Search the UniProt Knowledgebase for proteins with support for Boolean operators (AND, OR, NOT) and field-based filtering (accession, EC number, organism, protein name, sequence, etc.)
- PubChem Search: Search the PubChem database for small molecules with Boolean operators and field-based filtering (name, formula, InChI, InChIKey, SMILES, mass, etc.). Preferred over ChEBI for small molecule searches
- ChEBI Search: Search the ChEBI database for small molecules when PubChem results are insufficient
- Measurement Plotting: Generate SVG plots of measurements from EnzymeML documents. Can plot all measurements or a specified subset by measurement IDs, returning images in MultiImageResponse format
Before using this MCP server, ensure you have the following installed:
- Rust: The Rust programming language and Cargo package manager (version 1.70 or later recommended). Install from rustup.rs
- EnzymeML Suite: The EnzymeML Suite desktop application must be installed and running on your local machine. The server communicates with the Suite application to access EnzymeML documents
- MCP Client: An MCP-compatible client application (such as Cursor, Claude Desktop, or other MCP implementations) to connect to this server
To build the EnzymeML MCP server from source, follow these steps:
-
Clone the repository (if you haven't already):
git clone <repository-url> cd enzymeml-mcp
-
Build the project using Cargo:
cargo build --release
This will compile the server and create an executable at
target/release/enzymeml-mcp. -
For development builds (faster compilation, larger binary):
cargo build
Development builds are located at
target/debug/enzymeml-mcp.
The EnzymeML MCP server uses stdio (standard input/output) transport for communication with MCP clients. The server is designed to be launched by MCP-compatible clients and communicates via JSON-RPC messages over stdin/stdout.
To test the server manually, you can run it directly:
cargo run --releaseHowever, note that the server expects JSON-RPC messages on stdin and will not produce useful output without a proper MCP client connection.
For Cursor, you might configure the server in your MCP settings file:
{
"mcpServers": {
"enzymeml": {
"command": "/path/to/enzymeml-mcp/target/release/enzymeml-mcp",
"args": []
}
}
}For Claude Desktop, add to your claude_desktop_config.json:
{
"mcpServers": {
"enzymeml": {
"command": "/path/to/enzymeml-mcp/target/release/enzymeml-mcp",
"args": []
}
}
}Important: Replace /path/to/enzymeml-mcp with the actual path to your compiled binary.
The server exposes the following tools for interacting with EnzymeML documents:
Lists all EnzymeML documents available from the Suite application, returned in TOON format. Useful for discovering which documents are available when working with multiple documents.
Generates a high-level overview of the EnzymeML document structure and relationships in TOON format. Essential for understanding document structure before performing edits or when you need to understand how components are connected.
Reads the complete EnzymeML document structure from the Suite desktop application, excluding measurements for performance. Returns data in TOON format. Use read_measurements if you specifically need measurement data.
Specifically fetches measurement data from the EnzymeML document, including time series, concentrations, and measured values. Returns detailed experimental data in TOON format.
Intelligently merges new data into the existing EnzymeML document. Supports both adding new items and performing surgical edits to existing items (identified by ID). Performs automatic validation and consistency checks. Always ask for confirmation before submitting changes.
Selectively removes elements from the EnzymeML document. Supports complete removal of objects (vessels, proteins, small molecules, reactions, parameters, complexes) and partial removal within reactions (reactants, products, modifiers). Requires knowledge of existing IDs from enzymeml_document_overview.
Searches the UniProt Knowledgebase for proteins. Supports Boolean operators (AND, OR, NOT) and field-based filtering. Filterable fields include accession, EC number, organism name, protein name, and sequence.
Searches the PubChem database for small molecules. Supports Boolean operators and field-based filtering (name, formula, InChI, InChIKey, SMILES, mass, etc.). Preferred over ChEBI for small molecule searches.
Searches the ChEBI database for small molecules. Supports Boolean operators and field-based filtering. Use when PubChem results are insufficient.
Generates SVG plots of measurements from the EnzymeML document. Can plot all measurements or a specified subset by measurement IDs. Returns a list of images in MultiImageResponse format.
When working with EnzymeML documents through this MCP server, follow this recommended workflow:
- Start with instructions: Call
how_to_use_the_enzymeml_suiteto understand the available tools and their usage patterns - List available documents: Use
list_documentsto see what documents are available (if working with multiple documents) - Get document overview: Always call
enzymeml_document_overviewbefore performing any modifications to understand the document structure and discover existing IDs - Search external databases: Before adding new proteins or small molecules, search UniProt, PubChem, or ChEBI to enrich your data with standardized metadata
- Read document data: Use
read_enzymeml_documentorread_measurementsas needed to access specific data - Modify documents: Use
extend_enzymeml_documentfor additions and edits, orremove_from_enzymeml_documentfor removals. Always verify IDs exist before modifications - Visualize data: Use
plot_measurementsto generate visualizations of experimental measurements
This project relies on the following key dependencies:
- rmcp: Model Context Protocol implementation for Rust
- enzymeml: Rust library for working with EnzymeML documents (from the EnzymeML organization)
- tokio: Async runtime for Rust
- toon-format: TOON format encoding and decoding
- reqwest: HTTP client for external database API calls
- quill: Plotting library for generating SVG visualizations
See Cargo.toml for the complete list of dependencies and their versions.