Kappybara MCP Server
An MCP (Model Context Protocol) server for running Kappa simulations using the Kappybara package. This allows LLMs to run rule-based simulations of molecular interaction systems directly.
Python packages used:
FastMCP -- deployed on https://kappybara.fastmcp.app/mcp
Features
Run Kappa Simulations: Execute Kappa models with customizable parameters using kappybara
CSV Output: Get simulation results as CSV data for easy analysis
Example Models: Built-in example models (reversible binding, linear polymerization)
Pure Python: Uses the kappybara Python library for all simulations
Installation
Clone or download this repository
Install dependencies:
Usage
Running the MCP Server
Using with Claude Desktop
Available Tools
run_kappa_simulation
Run a Kappa simulation and return results with stdout, stderr, and CSV output.
Parameters:
kappa_code
(string, required): The Kappa model code to simulatetime_limit
(float, default: 100.0): Maximum simulation timepoints
(int, default: 200): Number of data points to collectseed
(int, optional): Random seed for reproducibility
Returns: JSON string with three fields:
stdout
: Standard output from the simulationstderr
: Standard error output (warnings, errors)output
: CSV data with simulation results
Example:
Available Resources
kappa://examples/simple
A simple reversible binding model (kappybara syntax).
kappa://examples/polymerization
A linear polymerization model (kappybara syntax).
Kappa Language Basics (Kappybara Syntax)
Kappybara uses a specific syntax for Kappa models. Here's a quick reference:
Basic Syntax
Binding Sites
[.]
- unbound site[1]
,[2]
, etc. - bound sites (bond labels)[_]
- wildcard for any binding state
Example: Reversible Binding
Development
Project Structure
Testing
Run the test example:
How It Works
The MCP server exposes Kappa simulation capabilities through the Model Context Protocol
LLMs can call the
run_kappa_simulation
tool with Kappa code (using kappybara syntax) and parametersThe server uses the Kappybara Python library to parse the model and run the simulation
Results are returned as JSON with stdout, stderr, and CSV output that can be analyzed or visualized
References
License
MIT
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables LLMs to run rule-based molecular interaction simulations using the Kappa language through the Kappybara package. Returns simulation results as CSV data for analysis of biochemical systems and molecular binding dynamics.