fairchem-mcp
The fairchem-mcp server enables LLM agents to interactively drive atomistic simulations using FAIRChem/ASE — with live monitoring and mid-flight steering — rather than batch script execution.
Calculator / Model Management
Load FAIRChem UMA/eSEN models (resident in-memory), attach EMT (fast, no GPU needed), or attach LAMMPS for classical force engines. Models stay loaded across calls.
Structure Building & Loading
Declaratively build bulk crystals, molecules, or surfaces (
build_structure), or load from any ASE-readable file — CIF, XYZ, POSCAR, trajectory, etc. (load_structure).
Simulation Launching (all run in the background)
Relaxation: Geometry optimization (FIRE, LBFGS, BFGS), optional cell relaxation
MD: NVT Langevin or NVE with configurable temperature and timestep
NEB: Nudged Elastic Band for reaction barriers; configurable images, interpolation, climbing image
Transition state searches: Dimer method, Sella (RFO + approximate Hessian), POUNCE (eigenvector following)
Phonons: Finite-displacement; returns frequencies, imaginary mode count, stability flag
EOS scan: Cell strain → fit V0, E0, bulk modulus
Elastic tensor: Stress-vs-strain C_ij, VRH moduli, Born stability criteria
Convex hull: Formation energies and phase stability analysis
Minima search: Multiple distinct local minima via deflation/flooding/basinhopping with deduplication by energy and RMSD/fingerprint
Live Monitoring
get_status— current step, energy, max force, and trend verdict (decreasing/plateaued/stuck/diverging)get_trajectory— recent energy/force history (last N snapshots)get_results— final outputs (NEB barriers, phonon frequencies, EOS fit, elastic tensor, distinct minima, etc.)
Mid-Flight Steering
steersupports:pause/resume/abort,set_fmax,switch_optimizer(while preserving positions),set_temperature(MD),set_climb(NEB climbing image)
Code Introspection & Escape Hatch
introspect— inspect signatures and docstrings of installed APIs or live session objectsexecute— run arbitrary Python in the shared persistent session namespaceinspect_expr— evaluate a Python expression and return its repr
Only one job runs at a time, serializing GPU/model access.
Click on "Install 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., "@fairchem-mcpRun relaxation on Cu fcc with EMT and show status"
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.
fairchem-mcp
An agent-steerable MCP server for FAIRChem and ASE simulations.
Most LLM-driven simulation today is batch: the agent writes a script, runs it,
waits, and reads the output. fairchem-mcp makes it interactive. The model is
loaded once and kept resident; relaxations and MD run in the background; and the
agent can watch a simulation as it runs and steer it mid-flight — switch the
optimizer when it stalls, tighten fmax, change temperature, pause, or abort.
Why
Resident model. Load a UMA/eSEN model once; reuse it across every call. No reloading the model (seconds–minutes) on each run.
Live monitoring.
get_statusreturns step, energy, max force, and atrendverdict (decreasing/plateaued/stuck/diverging) so the agent can decide whether to intervene.Mid-flight steering.
steercanpause/resume/abort,set_fmax,switch_optimizer, orset_temperatureon a running job. Switching optimizer carries the atomic positions over — it just rebuilds the driver.Hybrid namespace. High-level tools (
start_relaxation, …) and theexecute/inspect_exprescape hatch share one Python namespace, so the agent can drop to raw Python on the very same liveAtoms.Code awareness.
introspectreads the installed API (real signatures and docstrings) and live objects viajedi— not possibly-stale docs.
Related MCP server: MOF Tools MCP Server
Install
pip install -e . # core: mcp + ase + jedi + numpy (works with EMT)
pip install -e ".[fairchem]" # add FAIRChem (torch + models) for UMA/eSEN
pip install -e ".[lammps]" # add LAMMPS as a classical force engine
pip install -e ".[saddles]" # add Sella + POUNCE for transition-state searchesASE, numpy, jedi and mcp are core dependencies (installed automatically) — the server is fully usable out of the box with the built-in EMT calculator.
FAIRChem (optional)
pip install -e ".[fairchem]" pulls in fairchem-core (PyTorch + models). To
actually load a UMA model you also need:
a Hugging Face account with approved access to the
facebook/UMAmodel repository, andhuggingface-cli login(orHF_TOKEN) set;PyTorch for your platform (CUDA build for GPU; CPU works but is slower).
Everything except load_model works with a plain ASE calculator (attach_emt),
so you can develop and test without a GPU or model.
LAMMPS (optional)
pip install -e ".[lammps]" installs the lammps Python package. LAMMPS is used
as a force engine (classical potentials) while ASE drives the dynamics, so
attach_lammps works with every steerable job (MD, relaxation, NEB, phonons,
EOS, minima search).
macOS note (Homebrew MPICH): the PyPI lammps wheel links
@rpath/libmpi.12.dylib and libpmpi.12.dylib, which the dynamic loader can't
find by default. If you have Homebrew's mpich (brew install mpich),
attach_lammps auto-symlinks those libs into the lammps package directory
on first use. If that can't be applied (read-only install, non-Homebrew MPI),
either symlink them yourself or export before launching the server:
export DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/lib:$DYLD_FALLBACK_LIBRARY_PATHVerify with: python -c "from lammps import lammps; lammps(cmdargs=['-log','none','-screen','none']).close(); print('ok')".
Transition-state searches (optional)
pip install -e ".[saddles]" adds two extra saddle-point backends:
sella (a rational-function ASE optimizer)
and pounce-solver (multistart
eigenvector following). The dimer method (start_saddle_search) is pure ASE
and needs neither. See examples/saddles/ for all three.
Register with Claude Code
Add to your MCP config (see examples/claude_mcp_config.json):
{
"mcpServers": {
"fairchem": { "command": "fairchem-mcp" }
}
}Tools
Tool | Purpose |
| List FAIRChem pretrained models |
| Load a UMA/eSEN model as a resident calculator |
| Attach a fast EMT calculator (no GPU/model) |
| Attach LAMMPS (classical potentials) as the force engine |
| Make/register an ASE structure |
| Launch a background relaxation / MD (returns a |
| Launch a steerable nudged-elastic-band (reaction barrier) |
| Transition state via the dimer method (Hessian-free) |
| Transition state via Sella (RFO + approximate Hessian) |
| Enumerate saddles by Morse index (POUNCE eigenvector following) |
| Launch a finite-displacement phonon calculation |
| Scan cell strain → fit equation of state (V0, E0, bulk modulus) |
| Stress-vs-strain → elastic tensor (C_ij), VRH moduli, Born stability |
| Formation energies + convex hull (phase stability, energy above hull) |
| Find multiple distinct relaxed geometries via deflation/flooding |
| Observe a running job |
| Final results: NEB barrier/energies, phonon frequencies & stability, distinct minima, EOS fit |
|
|
| Signatures/docstrings/members of installed code or live objects |
| Run/eval Python in the shared session namespace |
Resources: sim://models, sim://job/{id}/status, sim://job/{id}/trajectory.
Example flow
attach_emt() -> calc_1
build_structure({"kind":"bulk","name":"Cu","crystalstructure":"fcc",
"a":3.6,"repeat":[2,2,2],"rattle":0.2}) -> struct_1
start_relaxation("struct_1","calc_1",optimizer="FIRE",fmax=0.01) -> job_1
get_status("job_1") -> {status:"running", trend:{label:"stuck", ...}}
steer("job_1","switch_optimizer",optimizer="LBFGS")
get_status("job_1") -> {status:"converged", ...}
introspect("atoms", live=True) -> live object signature/docstringFinding multiple relaxed geometries
start_minima_search finds several distinct local minima of the PES — useful
for surface adsorption sites, cluster isomers, or conformers. It relaxes
repeatedly from the starting structure on a PES biased to repel the minima
already found, then polishes each escape on the true PES:
kernel="flooding"(default) adds Gaussian bumps (sigmaÅ,amplitudeeV);kernel="deflation"adds inverse-distance poles (eta,power). Both are best for fixed-frame problems (an adsorbate on a frozen slab, an anchored conformer).kernel="basinhopping"(random kick + relax + Metropolis accept) is the right tool for free clusters / nanoparticles, whose rigid-body rotation defeats a spatial bias. Pair it withcomparator="fingerprint"(see below).New minima are deduplicated by energy (
energy_tol) plus a structurecomparator:"rmsd"(raw coords, frame-dependent — fine for a fixed frame) or"fingerprint"(sorted pairwise distances; rotation/translation/permutation invariant — use for free clusters and molecules, or rotated copies get miscounted as distinct). Each accepted minimum is registered as its own structure.
This reuses the escape mechanism from POUNCE's find_minima (deflation /
flooding) but drives it with ASE's gradient optimizers — the right inner solver
for a PES — so each escape relaxation is a normal steerable job (watch the trend,
switch_optimizer, set_fmax, pause/abort). POUNCE's interior-point solver is
deliberately not used as the inner relaxer.
Examples
examples/catalysis/ has four end-to-end catalysis
workflows — adsorption energy, adsorption-site search, diffusion-barrier NEB, and
surface-stability phonons — each as a runnable script and an MCP tool-call
walkthrough. They run on EMT out of the box; set FAIRCHEM_MCP_EXAMPLE_MODEL for
UMA.
examples/saddles/ covers the three single-ended
transition-state routes — dimer, Sella, and POUNCE eigenvector following — on one
shared system so you can compare them.
examples/alloys/ builds up to alloy design: the elastic
stiffness tensor (start_elastic_scan), the formation-energy convex hull
(start_convex_hull), and a design loop that gates candidates on stability then
ranks the survivors by a mechanical property.
Safety
execute / inspect_expr run arbitrary Python in-process. This is a trusted
local developer tool — do not expose it to untrusted input or over a network.
Notes
Only one job runs at a time (serializes model/GPU access).
All optimizers/integrators use
logfile=None; the stdio transport reserves stdout for the MCP protocol.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jkitchin/fairchem-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server