Kappybara MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Kappybara MCP Serversimulate reversible binding of proteins A and B over 50 seconds"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: SMILES Visualizer MCP Server
Installation
Clone or download this repository
Install dependencies:
pip install -r requirements.txtUsage
Running the MCP Server
fastmcp run main.pyUsing with Claude Desktop
fastmcp install claude-desktop main.pyAvailable 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:
kappa_code = """
%init: 100 A(x[.])
%init: 100 B(x[.])
%obs: 'AB' |A(x[1]), B(x[1])|
A(x[.]), B(x[.]) <-> A(x[1]), B(x[1]) @ 1, 1
"""
result = run_kappa_simulation(kappa_code, time_limit=50, points=100)
# Result is a JSON string like:
# {
# "stdout": "",
# "stderr": "",
# "output": "time,AB\n0.0,0\n0.01,1\n..."
# }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
%init: 100 AgentName(site1[.], site2[state]) # Initialize agents
%obs: 'Observable' |pattern| # Define observable
pattern -> pattern @ rate # Define rule (irreversible)
pattern <-> pattern @ rate1, rate2 # Define rule (reversible)Binding Sites
[.]- unbound site[1],[2], etc. - bound sites (bond labels)[_]- wildcard for any binding state
Example: Reversible Binding
%init: 100 A(x[.])
%init: 100 B(x[.])
%obs: 'A_free' |A(x[.])|
%obs: 'B_free' |B(x[.])|
%obs: 'AB_complex' |A(x[1]), B(x[1])|
// Reversible binding with forward rate 0.001 and reverse rate 0.1
A(x[.]), B(x[.]) <-> A(x[1]), B(x[1]) @ 0.001, 0.1Development
Project Structure
kappybara-mcp/
├── main.py # MCP server implementation
├── requirements.txt # Python dependencies
├── README.md # This file
└── test_example.py # Example test/demo scriptTesting
Run the test example:
python test_example.pyHow It Works
The MCP server exposes Kappa simulation capabilities through the Model Context Protocol
LLMs can call the
run_kappa_simulationtool 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 deployed
Maintenance
Related MCP Connectors
Conversational what-if simulation: build, diagnose and compare Petri-net models; CC0 catalog.
Privacy-preserving synthetic health data generation. FHIR R4/R5 compliant.
Agent-to-Agent (A2A) + Model Context Protocol (MCP) hub for peptides.
Provide detailed Pokémon data and information through a standardized MCP interface. Enable LLMs an…
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI agents to search the Chemspace API for synthesizable building blocks and screening compounds using exact matches, substructure searches, and similarity searches by SMILES strings.31MIT
- FlicenseNot gradedqualityDmaintenanceEnables molecular visualization and analysis from SMILES strings using multiple rendering approaches (RDKit, NetworkX, Plotly, matplotlib), providing detailed molecular properties, validation, and batch processing capabilities for chemical structures.-
- FlicenseBqualityDmaintenanceProvides computational chemistry tools for LLMs, enabling molecular operations like SMILES processing and geometry manipulation via a modular agent and tool system.9-
- AlicenseAqualityCmaintenanceEnables AI assistants to analyze CSV files by providing statistical analysis and structural summaries via MCP tools.2MIT