home / mcp / mcp lammps server
LAMMPS MCP Server for molecular dynamics
Configuration
View docs{
"mcpServers": {
"chenghao-wu-mcp_lammps": {
"command": "python",
"args": [
"-m",
"mcp_lammps.server"
],
"env": {
"MCP_LAMMPS_WORK_DIR": "/path/to/workspace",
"MCP_LAMMPS_LOG_LEVEL": "INFO"
}
}
}
}You can run an MCP LAMMPS Server to manage and automate molecular dynamics simulations using LAMMPS. This server provides a standardized interface so you can configure, execute, monitor, and analyze simulations through simple prompts, making it easier to integrate AI-driven workflows into your computational materials work.
You will interact with the MCP LAMMPS Server through an MCP client. Start the server, then issue natural language prompts to set up simulations, run equilibration and production phases, monitor progress in real time, and fetch results for analysis. You can define multi-step workflows that automate setup, execution, and post-processing without manually editing input files.
Follow these steps to install and run the MCP LAMMPS Server on your machine.
# Prerequisites
# Ensure you have Python 3.9 or higher
# Install LAMMPS with Python interface (as required by your setup)
# Install RDKit for molecular processing
# Install Packmol for organic liquid box creation
# Clone the MCP LAMMPS repository
git clone https://github.com/mcp-lammps/mcp-lammps.git
cd mcp-lammps
# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install Python dependencies
pip install -r requirements.txt
# Install in development mode
pip install -e .
# Run the MCP LAMMPS server
python -m mcp_lammps.serverThe server supports configuration via environment variables. You can adjust logging and working directory to fit your environment.
export MCP_LAMMPS_LOG_LEVEL=INFO
export MCP_LAMMPS_WORK_DIR=/path/to/workspace
python -m mcp_lammps.serverTools to configure and prepare simulations, including SMILES processing and initial structure generation.
Tools to manage simulation lifecycles, including starting, pausing, resuming, and stopping runs.
Tools to analyze trajectories and compute properties from MD simulations.
Real-time monitoring tools to track progress and key system properties.
Specialized tools for handling organic molecules and GAFF-based workflows.