mcp-server-lammps
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-server-lammps: A LAMMPS MCP server
Status: In active development — not yet published to PyPI. Install from source with
uv run.
Overview
A Model Context Protocol server for LAMMPS (Large-scale Atomic/Molecular Massively Parallel Simulator). This server allows Large Language Models to interact with LAMMPS to run simulations, validate scripts, manage files, and analyze output logs.
Tools
submit_scriptSubmit and execute a LAMMPS input script.
Inputs:
script_content: Full LAMMPS input script text.script_name: Saved input script filename (default:in.lammps).log_file: Log filename (default:log.lammps).
read_logExtract thermodynamic and timing/performance data from a log file.
Inputs:
log_file: Path to log (default:log.lammps).extract_performance: Include loop/performance summary (default:true).
read_outputRead output file content (data/dump/custom text output).
Inputs:
filepath: Path to output file.
restartManage binary restart files.
Inputs:
restart_file: Path to restart file.action:data,info, ordump.output_file: Required fordataanddump.
Related MCP server: MCP-GMX-VMD
Debug script
A fast smoke-test script is provided at tests/debug_mcp_server.lmp.
Typical workflow:
Start the server with a writable
--working-directory.Call
submit_scriptwith the contents oftests/debug_mcp_server.lmp.Call
read_logforlog.lammps.Call
read_outputfordebug_out/state.data.Call
restartwithrestart_file=debug_out/state.restartandaction=info.
Installation
From source (recommended during development)
# Clone the repository
git clone <repo-url>
cd lammps
# Run directly via uv (stdio mode — default)
uv run --directory /path/to/lammps mcp-server-lammps
# Or with options
uv run --directory /path/to/lammps mcp-server-lammps \
--lammps-binary /path/to/lmp \
--working-directory /path/to/simulationsUsage
Stdio mode (default)
The server runs over stdio by default, suitable for local MCP clients like Claude Desktop:
uv run --directory /path/to/lammps mcp-server-lammps \
--lammps-binary /path/to/lmp \
--working-directory /path/to/simulationsRemote HTTP mode (serve subcommand)
For remote deployment, use the serve subcommand which runs the server over StreamableHTTP:
# Bearer token required (token printed to stderr at startup)
uv run --directory /path/to/lammps mcp-server-lammps serve \
--host 0.0.0.0 --port 8000
# No authentication (not recommended for public networks)
uv run --directory /path/to/lammps mcp-server-lammps serve --skip-auth
# LAN IPs bypass auth; others need Bearer token
uv run --directory /path/to/lammps mcp-server-lammps serve \
--allowed-ips 192.168.0.0/16 \
--allowed-ips 10.0.0.0/8Auth modes
Mode | Flag | Behavior |
Bearer token (default) | (none) | Auto-generated token printed to stderr; clients must send |
Skip auth |
| No authentication required — use only on trusted networks |
IP allowlist |
| Listed IPs/CIDRs bypass auth; others require Bearer token. Can be specified multiple times |
Configuration
Usage with Claude Desktop
Add this to your claude_desktop_config.json:
"mcpServers": {
"lammps": {
"command": "uv",
"args": [
"run",
"--directory", "/path/to/lammps",
"mcp-server-lammps",
"--lammps-binary", "/path/to/lmp",
"--working-directory", "/path/to/simulations"
]
}
}Windows Configuration
On Windows, ensure you escape backslashes in paths correctly (use double backslashes):
"mcpServers": {
"lammps": {
"command": "uv",
"args": [
"run",
"--directory", "D:\\DEV\\repos\\lammps",
"mcp-server-lammps",
"--lammps-binary", "C:\\Program Files\\LAMMPS\\bin\\lmp.exe",
"--working-directory", "D:\\Simulations\\WorkDir"
]
}
}Make sure the lammps-binary path points to your LAMMPS executable (e.g., lmp_serial, lmp_mpi). You can also specify an MPI command string if you want to run in parallel by default, e.g., mpiexec -np 4 lmp_mpi.
The working-directory is where simulations will be run and where the server looks for files. All file paths provided to tools must be within this directory.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
LLM Orchestration Agent (Mcp)
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
LLM Orchestration Agent (Openai)
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceA Model Context Protocol server that enables AI assistants to interact with LAMMPS for molecular dynamics simulations through natural language commands.13Apache 2.0
- AlicenseNot gradedqualityCmaintenanceIntegrates GROMACS molecular dynamics simulations with VMD visualization, enabling setup, execution, analysis, and 3D visualization of molecular dynamics workflows through natural language.24MIT
- FlicenseBqualityDmaintenanceProvides computational chemistry tools for LLMs, enabling molecular operations like SMILES processing and geometry manipulation via a modular agent and tool system.9-
- AlicenseAqualityDmaintenanceAn MCP server for computational materials science that enables AI assistants to generate LAMMPS simulations, parse outputs, analyze nematic order, detect plastic rearrangements, and estimate viscosity through 12 specialized tools.121MIT